MATLAB: Writing 32 bit images

dip

how can i make 32 bit image in Matlab?

Best Answer

How many color channels are you using, and how many bits do you require for each of the color channels?
Does the file have to be directly decodable by an external viewer as 32 bits, or is it sufficient that you can recover the 32 bits upon reading it in?
Your options:
  • PNG file with bitdepth of 8 (bits per channel) to encode 24 of the bits, and specify a uint8 alpha map for the remaining 8 bits
  • Sun RAS file passed an RGB image that is uint8 per channel, and a uint8 alpha map
  • TIFF with a M x N x 4 uint8 matrix passed in, which would cause TIFF to think of the file as being CMYK
  • PNG with a bitdepth of 16 (per channel) and passing a 3 channel uint16 matrix, resulting in a 48 bit per pixel image