How can i read the whole RGB image pixel by pixel with their values and to check that if pixels have specific value please guide me
1 回表示 (過去 30 日間)
古いコメントを表示
How can i read the whole RGB image pixel by pixel with their values and to check that if pixels have specific value please guide me
0 件のコメント
採用された回答
Chandra Shekhar
2013 年 4 月 27 日
編集済み: Chandra Shekhar
2013 年 4 月 27 日
Suppose your image size is 50*50, then u separate each RGB plane.
image=imread('img.jpg');
R=image(:,:,1); or R=image(1:50,1:50,1);
G=image(:,:,2); or G=image(1:50,1:50,2);
B=image(:,:,3); or B=image(1:50,1:50,3);
by varying row and column of each plane you can check pixel values.
I hope this is answer for your question.
2 件のコメント
Chandra Shekhar
2013 年 4 月 27 日
編集済み: Chandra Shekhar
2013 年 4 月 28 日
I=imread('board.tif');
[m n k]=size(I);
for l=1:k
for i=1:m
for j=1:n
if I(i:j:l)==1
do
else
dont
end
end
end
end
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Read, Write, and Modify Image についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!