Levels in an image

5 次查看(过去 30 天)
Marium Malik
Marium Malik 2012-8-31
What does it mean by the maximum number of levels in an image?

回答(2 个)

Kevin Moerman
Kevin Moerman 2012-8-31
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

Image Analyst
Image Analyst 2012-8-31
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.

类别

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