User`s guide

Image Enhancement
In this exam
ple, you used the Contrast Adjustment block to linearly
scale the p
ixel values in
pout.tif between new upper and lower limits.
You used th
e Histogram Equalization block to transform the values in
tire.tif s
o that the histogram of the output image approximately matches
a uniform
histogram. For more information, see the Contrast Adjustment
and Histo
gram Equalization block reference pages in the Video a nd Image
Processi
ng Blockset Reference.
Adjusti
ng the Contrast in Color Images
This exam
ple shows you how to modify the contrast in color images using
the Hist
ogram Equalization block.
1 Use the f
ollowing code to read in an indexed RGB image,
shadow.tif,and
convert
it to an R GB image.
[X map] = imread('shadow. tif');
shadow = ind2rgb(X,map );
2 Create a
new Simulink model, and add to it the blocks shown in the
followi
ng table.
7-53