Digital Signal Processing Reference
In-Depth Information
Level adjustment
1) Stretch the pixel range.
2) Shift and contract the pixel range.
3) Darken or lighten the pixel.
Indexed color image
1) Pixel value is an index; there are
256 indices.
2) Each index points to a color map
entry with three values: Red, Green
and Blue.
%J=imadjust(I,[low,high],[bot,top],gamma);
% gamma=1.5 darker, gamm=0.5 lighter
J1=imadjust(I,[0,.5],[0,1],1);
J2=imadjust(I,[0,1],[.5,1],1);
J3=imadjust(I,[0,1],[0,0.5],1);
0
1
R GB
1
255
[X, map]=imread('file name','format');
I=im2double(X)
X=im2uint8(X)
to display
X=ind2rgb(X,map)
[X,map]=rgb2ind(X,256)
X=ind2gray(X,map)
Grayscale image
1) Each pixel has a value with
a range of 0 to 255.
RGB color image
1) Each pixel has three
values: Red, Green, and Blue.
2) There are red image, blue
image, and green image
components.
X=rgb2gray(X)
R
G
B
X=imread('file name','format');
FIGURE 14.24
 
 
Search WWH ::




Custom Search