Image Processing Toolbox User's Guide |
|
Understanding Handle Graphics Object Property Settings
When you display an image, imshow
and imtool
set the Handle Graphics properties that control how the image is displayed. The following table lists the relevant properties and their settings for each image type. The table uses standard toolbox terminology to refer to the various image types: X
represents an indexed image, I
represents a grayscale image, BW
represents a binary image, and RGB
represents a truecolor image.
Note
Both imshow and imtool can perform automatic scaling of image data. When called with the syntax imshow(I,'DisplayRange',[]) , and similarly for imtool , the functions set the axes CLim property to [min(I(:)) max(I(:))] . CDataMapping is always scaled for grayscale images, so that the value min(I(:)) is displayed using the first colormap color, and the value max(I(:)) is displayed using the last colormap color.
|
Handle Graphics Property
|
Indexed Images
|
Intensity (Grayscale) Images
|
Binary Images
|
Truecolor (RGB) Images
|
CData (Image)
|
Set to the data in X
|
Set to the data in I
|
Set to data in BW
|
Set to data in RGB
|
CDataMapping (Image)
|
Set to 'direct'
|
Set to 'scaled'
|
Set to 'direct'
|
Ignored when CData is 3-D
|
CLim (Axes)
|
Does not apply
|
double: [0 1] uint8 : [0 255] uint16 : [0 65535]
|
Set to [0 1]
|
Ignored when CData is 3-D
|
Colormap (Figure)
|
Set to data in map
|
Set to grayscale colormap
|
Set to a grayscale colormap whose values range from black to white
|
Ignored when CData is 3-D
|
| Overview | | Using imshow to Display Images | |
© 1994-2005 The MathWorks, Inc.