I would like to know the number of bits in a grayscale picture? How do I find this?

2 views (last 30 days)
I have a grayscale image that is 256x256 pixels.
How do I compute the number of bits in the image?
  2 Comments
Jan
Jan on 26 Nov 2018
It depends on what "number of bits" mean. What exactly does "I have a greayscale image" means - as file, as matrix, and in the later case, in which data type? Please explain, what your inputs are.
Victor Fletcher
Victor Fletcher on 26 Nov 2018
Bits as in 2^N possible intensities that a pixel can possibly take.
It is a .tif file.
I used the max function to calculate the maximum intensity value.
Then I used log function to convert it to N.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!