Levels in an image

5 visualizzazioni (ultimi 30 giorni)
Marium Malik
Marium Malik il 31 Ago 2012
What does it mean by the maximum number of levels in an image?

Risposte (2)

Kevin Moerman
Kevin Moerman il 31 Ago 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

Image Analyst
Image Analyst il 31 Ago 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.

Categorie

Scopri di più su Image Processing Toolbox in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by