Demo entry 6642617

0925

   

Submitted by anonymous on Sep 24, 2017 at 18:10
Language: Matlab. Code size: 636 Bytes.

im_input = im2double(imread('noise.jpg'));% 读取图像
im_output = imadjust(im_input,[min(im_input(:)) max(im_input(:))], [0 1]);
figure, imshow(im_input); title('input image');% imadjust函数进行对比度拉伸
figure, imshow(im_output); title('Contrast stretch');
histogram(im_input,64,'EdgeColor','b','FaceAlpha',1,'FaceColor','b');% 直方图显示
histogram(im_output,64,'EdgeColor','r','FaceAlpha',0.2,'FaceColor','r ');
im_output1 = spfilt(im_input,'atrimmed',5,5,24);% 阿尔法均值滤波处理;
im_output2 = spfilt(im_input,'gmean');% 几何均值滤波处理;
I1 = imadjust(im_output1,[min(im_output1(:)) max(im_output1(:))], [0 1]);% 阿尔法均值滤波处理之后加上对比度拉伸变换;
figure, imshow( I1 );

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).