Demo entry 6639510

dark_road_10

   

Submitted by anonymous on Sep 10, 2017 at 09:35
Language: Matlab. Code size: 753 Bytes.

im_input =im2double (rgb2gray(imread('dark_road_10.jpg')));%读取图片 
im_output_gamma = imadjust(im_input,[min(im_input(:)) max(im_input(:))], [0 1],0.6); %gamma校正
im_output1 = adapthisteq(imsharpen(im_output_gamma),'NumTiles',[10 10], 'ClipLimit',0); %CLAHE校正
% im_output2=medfilt2(im_output1,[5 5]);
subplot(3,2,1); imshow(im_input); title('原图');  %图像显示
subplot(3,2,2); imhist(im_input); title('原图直方图');
subplot(3,2,3);imshow(im_output_gamma);title('原图gamma变换')
subplot(3,2,4);imhist(im_output_gamma);title('原图gamma变换直方图')
subplot(3,2,5); imshow(im_output1); title('最终结果');
subplot(3,2,6); imhist(im_output1); title('最后直方图');
figure, imshow([im_output1 ]); title('Gamma correction');  %输出
imwrite(im_output1,'dark_road_10_result.jpg');  %写入图片

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).