placing 3 image pixels in an array from a large image vector

2 ビュー (過去 30 日間)
Avinash Bhatt
Avinash Bhatt 2019 年 5 月 16 日
編集済み: KSSV 2019 年 5 月 16 日
I have a 256X256 image array, I am placing a 3X3 window over it and scanning for uncorrupted pixels. Suppose I got 3 pixels which are uncorrupted which I want to put in a vector form for ex-
I got 3 uncorrupted pixels in Matlab which are
I(i,j)= 49
I(i,j)= 36
I(i,j)= 109
I want to put them in this form :
Z=[49 36 109];
Please provide the matlab code for doing this

採用された回答

KSSV
KSSV 2019 年 5 月 16 日
編集済み: KSSV 2019 年 5 月 16 日
YOu know ths sub-indices (i,j) for the required pixels. Get the index for it and arrange in a vector.
idx = sub2ind(size(I),i,j) ; % I should be a 2D matrix
Z = I(idx) ;

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImages についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by