Effacer les filtres
Effacer les filtres

Determine the number of bits used for every pixel intensity

3 vues (au cours des 30 derniers jours)
SBakc
SBakc le 28 Août 2019
Modifié(e) : Walter Roberson le 28 Août 2019
Hi,
I would like to determine the number of bits used for every pixel intensity. Is this possible?
I am aware that imhist() shows the distribution of pixel intensity values, but is it possible to see how many bits are allocated for each pixel intensity?
Thank you.

Réponse acceptée

Walter Roberson
Walter Roberson le 28 Août 2019
Modifié(e) : Walter Roberson le 28 Août 2019
For int8 and uint8 the number of bits per pixel is 8 times the number of color planes.
For int16 and uint16 it is 16 times the number of color planes.
For int32 and uint32 it is 32 times the number of color planes.
For int64 and uint64 it is 64 times the number of color planes.
For single() it is 32 times the number of color planes.
For double() it is 64 times the number of color planes.
These values do not change depending on the intensity of the pixel, only depending on the class() of the datatype.
There are cases in which you can compress into a smaller number of bits (or sometimes a larger number of bits!), but the number of bits required depends upon which compression scheme you are using. (Your question hints that you might be thinking about Huffman encoding.)

Plus de réponses (0)

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by