使用Hist函数实现图像直方图

来源:互联网 发布:城市联合网络电视台 编辑:程序博客网 时间:2024/05/16 09:21

参考代码

clear all;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                close all;close all;clc;f =imread('pollen.tif');subplot(3,2,1);imshow(f),title('Orignal Img');subplot(3,2,2);imhist(f)g = histeq(f,200);subplot(3,2,3);imshow(g),title('Histeq Img');subplot(3,2,4);imhist(g)g1= adapthisteq(f);subplot(3,2,5);imshow(g1),title('adaptHisteq Img');subplot(3,2,6);imhist(g1);figure;g2= adapthisteq(f,'NumTiles',[25 25]);subplot(2,2,1);imshow(g2),title('adaptHisteq Img with Numtiles');subplot(2,2,2);imhist(g2);g3= adapthisteq(f,'NumTiles',[25 25],'ClipLimit',0.05);subplot(2,2,3);imshow(g3),imshow(g2),title('adaptHisteq Img with Numtiles&ClipLimit');subplot(2,2,4);imhist(g3);
输出结果:



关于Image Engineering & Computer Vision的更多讨论与交流,敬请关注本博和新浪微博songzi_tea.


原创粉丝点击