MATLAB: How to convert the obtained pixel value of an image to a 8 bit binary value

MATLAB: How to convert the obtained pixel value of an image to a 8 bit binary value

.

I have found the pixels of an image.But i don’t know how to convert it to binary(8 bit).Can u please help me.

Best Answer

  • PixelsBinaryVector = reshape((dec2bin(PixelsArray, 8) - '0').', 1, [])
  • Add a Comment

    Your email address will not be published. Required fields are marked *