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 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Ruchi
am 27 Apr. 2013
Beantwortet: Mohamed Muhajir
am 31 Jan. 2017
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 Kommentare
Akzeptierte Antwort
Chandra Shekhar
am 27 Apr. 2013
Bearbeitet: Chandra Shekhar
am 27 Apr. 2013
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 Kommentare
Chandra Shekhar
am 27 Apr. 2013
Bearbeitet: Chandra Shekhar
am 28 Apr. 2013
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
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Read, Write, and Modify Image finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!