Gray number values are not 0-255

I’m just using ImageJ for a simple measurement, min/max and mean gray value. However, I’m confused by what these numbers actually represent. Everything I’ve looked at seems to indicate that “0” is black and “255” is white. However, when I measure it I get responses far outside the 0-255 range (for example mean = 2821.393, min = 684, max = 4018). So what are the actual values of white and black? Does a higher number indicate a darker or a lighter color. Can these numbers be compared across images?
Thank you!

Hi @Naomi,
you are correct 0 - means black and 255 means white but it is true for the 8 bit images only, where each pixel in stored in 1 byte of computer memory. In your case, you, most likely, have an image stored in the 16-bit container. For the 16-bit container value 0 still represents black, while value 65535 (2^16-1) represents white.

For the generation of images camera is using an analogue-to-digital converter. This converter may have different precision of the digitizer (12, 14 or 16 bit) . Assuming that you have a properly exposed image and the the max. value of 4018 - I believe that the camera had 12-bit digitizer. The 12-bit digitizer can produce images with max. value of 2^12-1 = 4095, which would be the pure color (i.e. white).
The numbers can be compared between the images if you’ve acquired the images under the same conditions, i.e. laser power, exposure etc…
Best regards,
Ilya

2 Likes

Thank you so much, this is exactly what I needed!

1 Like

Hi All, Just to add.
ImageJ/Fiji in the Image menu is a item ‘Show Info’ which will tell you the bit type of image you are looking at, then if you go back up to ‘Type’ and tell it which type you are using then after that all the information (Histograms and such) will be based on that type if image.

Hope this helps clarify ,
Bob