求一个matlab直方图均衡化程序

学习 时间:2026-03-30 12:16:44 阅读:2858
求一个matlab直方图均衡化程序用Matlab软件图象直方图均衡化,哪为牛人帮忙写个,论文用,

最佳回答

坚定的火

无限的未来

2026-03-30 12:16:44

我也是刚刚错别人那里看到的,希望能给你带来帮助s=imread('girl。bmp');[m,n]=size(s);num=m*n;r=zeros(1,256);e=zeros(1,256);d=zeros(size(s));for i=1:mfor j=1:nr(s(i,j)+1)=r(s(i,j)+1)+1; %原图像概率密度endendr=r。/num;for i=1:mfor j=1:ie(i)=e(i)+r(j); %累积分布endendfor i=1:256e(i)=floor(e(i)*255+0。5); %映射关系endfor i=1:mfor j=1:nd(i,j)=e(s(i,j)+1);endends=uint8(s);d=uint8(d);subplot(2,2,1);imshow(s);title('source');subplot(2,2,2);imhist(s);title('histogram of source');subplot(2,2,3);imshow(d);title('dest');subplot(2,2,4);imhist(d);title('histogram of dest');

最新回答共有2条回答

  • 贤惠的泥猴桃
    回复
    2026-03-30 12:16:44

    我也是刚刚错别人那里看到的,希望能给你带来帮助s=imread('girl。bmp');[m,n]=size(s);num=m*n;r=zeros(1,256);e=zeros(1,256);d=zeros(size(s));for i=1:mfor j=1:nr(s(i,j)+1)=r(s(i,j)+1)+1; %原图像概率密度endendr=r。/num;for i=1:mfor j=1:ie(i)=e(i)+r(j); %累积分布endendfor i=1:256e(i)=floor(e(i)*255+0。5); %映射关系endfor i=1:mfor j=1:nd(i,j)=e(s(i,j)+1);endends=uint8(s);d=uint8(d);subplot(2,2,1);imshow(s);title('source');subplot(2,2,2);imhist(s);title('histogram of source');subplot(2,2,3);imshow(d);title('dest');subplot(2,2,4);imhist(d);title('histogram of dest');

上一篇 Lily is the first one ----the classroom A.to leave B.leaving

下一篇 急,急,急,妇女是待在家照顾孩子做家务还是在外工作.英语辩论