Borrar filtros
Borrar filtros

Determine the number of bits used for every pixel intensity

3 visualizaciones (últimos 30 días)
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.

Respuesta aceptada

Walter Roberson
Walter Roberson el 28 de Ag. de 2019
Editada: Walter Roberson el 28 de Ag. de 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.)

Más respuestas (0)

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by