Determine the number of bits used for every pixel intensity

16 次查看(过去 30 天)
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.

采纳的回答

Walter Roberson
Walter Roberson 2019-8-28
编辑:Walter Roberson 2019-8-28
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.)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by