Demo entry 6638814

dark_road_4

   

Submitted by anonymous on Sep 08, 2017 at 15:57
Language: Matlab. Code size: 683 Bytes.

%%Histogram equalization(直方图均衡)
%dark_road_4
im_input = im2double(rgb2gray(imread('dark_road_4.jpg')));%读取图片
im_output_gamma = imadjust(im_input,[min(im_input(:)) max(im_input(:))], [0 1],0.5); %gamma校正
im_output = adapthisteq(im_output_gamma,'NumTiles',[100 100], 'ClipLimit', 0.00008); %CLAHE校正
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_output); title('最终结果');
subplot(3,2,6); imhist(im_output); title('最后直方图');
imwrite(im_output,'dark_road_4_result.jpg');  %写入图片

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).