MATLAB: How to read the pixels of image and convert it to binary representation

binaryImage Processing Toolboximage segmentationpixels

hello., i need ur guidance to read the pixel values of rgb image and convert those to binary representation.,
thanks in advance

Best Answer

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.