how to read the pixels of image and convert it to binary representation?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Anu Sharma
am 27 Mär. 2014
Bearbeitet: Image Analyst
am 27 Mär. 2014
hello., i need ur guidance to read the pixel values of rgb image and convert those to binary representation.,
thanks in advance
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 27 Mär. 2014
You can threshold
binaryImageRed = rgbImage(:,:,1) > someThresholdValueR;
binaryImageGreen = rgbImage(:,:,2) > someThresholdValueG;
binaryImageBlue = rgbImage(:,:,3) > someThresholdValueB;
What are you thinking would be foreground and what is background? I can't tell because you forgot to attach your image.
3 Kommentare
Image Analyst
am 27 Mär. 2014
You should use imshow() instead of disp(). imshow() displays the image while disp spews every pixel value in decimal to the command window (not what you want).
Also, I don't know what the binstring stuff is for. I'd get rid of it.
Image Analyst
am 27 Mär. 2014
Bearbeitet: Image Analyst
am 27 Mär. 2014
Get rid of m too. Then read this: http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer I'll consider this discussion done unless you ask more questions.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Convert Image Type finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!