What is the difference between pixel intensity and bit?

bit depth is the number of bits used to indicate the color of a single pixel. My question is about the pixel depth vs pixel intensity. For instance, in a greyscale image, the pixel intensity ranges from 0-255. Is this range constant regardless of image bit? Does 32 bit image have different intensity range than 16 bit?

Maybe you can find some helpful answers in the net …

https://imagej.nih.gov/ij/docs/menus/image.html
or

1 Like

I checked here and did not find answer to my question.

My attempt to explain bit-depths is here: https://petebankhead.gitbooks.io/imagej-intro/content/chapters/bit_depths/bit_depths.html

6 Likes

In case anyone either doesn’t want to do the reading or has but still doesn’t understand:

Bit depth and pixel depth are synonyms. It is the number of bits used to represent a pixel. Combined with the type of encoding (ex. gray-scale vs. RGB), it determines the range of possible pixel intensities.

Pixel intensity is the value represented by the bits.

1 Like

@Andrew_Shum Thanks Andrew. Based on your explanation, is it possible to have a 32 bit greyscale image that the pixel intensity ranges from 0 to 255? I actually have this image.
“2 to the power of 32” bits used to represent the pixel yes? so how 0-255 makes sense?

You can have a 32-bit gray-scale where the intensities are in the range 0-255. However, that means you are using a very small portion of the available intensity range (which is 0-4294967295 assuming it is interpreted as unsigned integers). If the pixel intensities will never be outside the range 0-255, you could use an 8-bit gray-scale with no loss of information (assuming conversion is done properly). In exchange, your file size would decrease to about 25% (would vary a bit due to metadata). Likewise, black-and-white images can be represented by bi-level (1-bit) images. However, last I checked, neither ImageJ, ImageJ2, nor Bio-Formats support saving bi-level images.

In summary, yes. Having a 32-bit gray-scale with an intensity range of 0-255 is entirely possible. However, does it make sense? Well, that depends on how you are using the image.

I wasn’t too clear on what your exact question was so I hope it got answered somewhere in my reply.

2 Likes

Hi @Andrew_Shum,

I guess you arrive here using 2^32.

ImageJ uses floating point representation for 32 images, which can accommodate much larger values. If you fill a 32 bit image with 4294967295 and use Process>multiply and multiply by 4294967295, it will happily show you the result as floating point values (1.844674407370955e19).

Should ImageJ follow the IEEE 754-1985 standard (which I presume it does), you get into numbers like 2^24.10^1023…
Of course, only about 24 bits can then be used for individual values (2^24=16777216). Give or take a few for the redundancy needed to represent Not a Number (NAN), and positive and negative zero (yes!).

I always explain bit depth as the ‘dynamic range’ that pixels can represent.

And add to this that 16-bit grey value images have a larger dynamic range than color images representing the same monochrome scene.

RGB color images are 8-bit and have 3 color resulting in 24-bit images. If they represent a grey scene, the R, G and B values are the same in a pixel and thus only 256 different intensity levels can be represented.

And then there is the look-up matter, of displaying your data range into the 256 intensity levels that a human eye already hardly, if at all, can distinguish.

1 Like

Thanks for the details. I am certainly not an expert on the various encodings but I do know enough to know that most programs use 32-bit pixels as floating point numbers rather than unsigned integers (which you correctly guessed as the assumption in my reply). That being said, the goal of my response was to provide a very basic description since it appeared that the concept wasn’t getting through.

1 Like