필터 지우기
필터 지우기

how to read the pixels of image and convert it to binary representation?

조회 수: 2 (최근 30일)
hello., i need ur guidance to read the pixel values of rgb image and convert those to binary representation.,
thanks in advance

채택된 답변

Image Analyst
Image Analyst 2014년 3월 27일
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
Image Analyst
Image Analyst 2014년 3월 27일
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
Image Analyst 2014년 3월 27일
편집: Image Analyst 2014년 3월 27일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by