Levels in an image
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
What does it mean by the maximum number of levels in an image?
0 Kommentare
Antworten (2)
Kevin Moerman
am 31 Aug. 2012
Not sure if I understand your question correctly but in some image formats the image data has a fixed amount of possible intensities. For instance an image may be defined as uint8 (unsigned integer 8-bit) which means that each pixel can have a value (intensity) between 0-255, and each intensity is a whole number (integer) in that range. So that gives 256 possible intensity levels (if that is what you mean). Another way to interpret your question would be layers. An RGB (red green blue) type image uses three layers to define colour (a single layer would define a large-scale image, some image types contain more than 3 layers). For each pixel 3 intensity levels, 1 for each colour, are defined and together (using a kind of mixing of the colours) they define the colour of that pixels. For an 8-bit RGB image you'd have 256 possible red, green and blue values to combine so that limits the maximum amount of colours that this image type can define.
Hope this answers your question, otherwise perhaps rephrase it,
Kevin
0 Kommentare
Image Analyst
am 31 Aug. 2012
This will work for uint images:
numberOfPossibleGrayLevels = int32(intmax(class(grayImage)))+1
For floating point images, there is no max number of intensity levels for all practical purposes.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!