文档介绍:
clear all; close all % Clear the MATLAB workspace of any variables
% and close open figure windows.
I = imread(''); % Reads the sample images ‘ ’, and stores it in
imshow(I) % an array named the image
figure, imhist(I) % Create a histogram of the image and display it in
% a new figure window.
[I2,T] = histeq(I); % Histogram equalization.
figure, imshow(I2) % Display the new equalized image, I2, in a new figure window.
figure, imhist(I2) % Create a histogram of the equalized image I2.
figure,plot((0:255)/255,T); % plot the transformation curve.
imwrite (I2, ''); % Write the newly adjusted image I2 to a disk file named
% ‘’.
imfinfo('') % Check the contents of the newly written file
clear all; close all
I = imread('');
J = imadjust(I,[0 ],[ 1]);
imshow(I)
figure, imshow(J)
[X,map] = imread('');
figure,imshow(X,map)
I2 = ind2gray(X,map);
J2 = imadjust(I2,[],[],);
figure,imshow(I2)
figure, imshow(J2)
J3 = imadjust(I2,[],[],);
figure, imshow(J3)
help imadjust % Display the imadjust() function information.
(模糊、去噪)
clear all; close all
I = imread('');
h1 = ones(3,3) / 9;
h2 = ones(5,5) / 25;
I1 = imfilter(I,h1);
I2 = imfilter(I,h2);
figure(1), imshow(I), title('Original Image');
figure(2), imshow(I1), title('Filtered Image