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

2 次查看(过去 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

采纳的回答

Chandra Shekhar
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 个评论
Ruchi
Ruchi 2013-4-27
Thanks for ur response Actually i need to read pixel values to match whether it is "1" or not.so could you please explain what will be the code for this...

请先登录,再进行评论。

更多回答(1 个)

Mohamed Muhajir
Mohamed Muhajir 2017-1-31
what is a value of a pixel sir

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by