Determine the number of bits used for every pixel intensity
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
SBakc
am 28 Aug. 2019
Bearbeitet: Walter Roberson
am 28 Aug. 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.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 28 Aug. 2019
Bearbeitet: Walter Roberson
am 28 Aug. 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.)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!