图像增强程序举例
灰度变换增强程序:
% GRAY TRANSFORM
clc;
I=imread('pout.tif');
imshow(I);
J=imadjust(I,[0.3 0.7],[0 1],1);--%transforms the walues in the %intensity image I to
values in J by linealy mapping values
% between 0.3 and 0.7 to values between 0 and 1.
figure;
imshow(J);
J=imadjust(I,[0.3 0.7],[0 1],0.5);--% if GAMMA is less than 1,the
% mapping si weighted toward higher (brighter) output values.
figure;
imshow(J);
J=imadjust(I,[0.3 0.7],[0 1],1.5);--% if GAMMA is greater than
% 1,the mapping si weighted toward lower (darker) output values.
figure;
imshow(J)
J=imadjust(I,[0.3 0.7],[0 1],1);--% If TOP<BOTTOM,the output
% image is reversed,as in a photographic negative.
figure;
imshow(J);
- 1
- 2
- 3
前往页