close all;
I=imread('figure51.jpg');
figure(1);
subplot(1,2,1)
imshow(I);
title('原图')
%通过函数stretchlim()和imadjust()进行图像增强
M=stretchlim(I);
%获取最佳区间
J=imadjust(I,M,[]); %调整灰度范围
figure(1)
subplot(122);imshow(uint8(J));
close all;
I=imread('figure51.jpg');
figure(1);
subplot(1,2,1)
imshow(I);
title('原图')
%通过函数stretchlim()和imadjust()进行图像增强
M=stretchlim(I);
%获取最佳区间
J=imadjust(I,M,[]); %调整灰度范围
figure(1)
subplot(122);imshow(uint8(J));