实验二 直方图均衡化及 matlab 实现
1. 读取 tire.tif 文件,采用 matlab 自带的程序,对 tire 图像进行
直方图均衡,给出代码、均衡化前后图像对比和直方图对比
代码如下:
close all;clc;
%函数 histeq()进行直方图均衡化处理
I=imread('tire.tif');
J=histeq(I); %直方图均衡化
gure,
subplot(121),imshow(uint8(I));
title('原图')
subplot(122),imshow(uint8(J));
title('均衡化后')
gure,
subplot(121),imhist(I,64);
title('原图像直方图');
评论0