matlab練習程式(灰度拉伸)

weixin_34419326發表於2019-01-08
cl;
img=imread('TestDatabase/1.bmp');
imshow(img);
img=double(img);
figure,imshow(mat2gray(img))
ma=double(max(max(img)));
mi=double(min(min(img)));
img=(255/(ma-mi))*img-(255*mi)/(ma-mi);
img=uint8(img);
figure,imshow(img)

相關文章