其他分享
首页 > 其他分享> > 数字图像处理-空间域图像增强

数字图像处理-空间域图像增强

作者:互联网

clear
Y1=imread('lena2.jpg');
Y1=rgb2gray(Y1);
figure
imshow(uint8(Y1));
vmax=max(max(Y1));
vmin=min(min(Y1));
C1=255/double(vmax-vmin);
Y2=C1*(Y1-vmin);
Y2=round(Y2);
figure
imshow(uint8(Y2));

imageimage

clear
X=imread('lena.jpg');
X=rgb2gray(X);
[m,n]=size(X);
N=zeros(1,256);
for i=1:m
    for j=1:n
        k=X(i,j);
        N(k+1)=N(k+1)+1;
    end
end
figure;
subplot(1,2,1);
imshow(uint8(X));
subplot(1,2,2);
bar(N);
axis tight;
image

标签:vmin,figure,数字图像处理,imshow,uint8,Y1,空间,Y2,图像增强
来源: https://www.cnblogs.com/Bran-don/p/10552552.html