资 源 简 介
matlab灰度图直方图均衡化代码,
sourcePic=imread("D:图像处理软件工作区1--图片库2 (3).jpg"); %读取原图象
[m,n,o]=size(sourcePic);
figure(1)
imshow(sourcePic);
gp=zeros(1,256); %创建一个全零矩阵,1×256,计算各灰度出现的概率
for i=1:256
gp(i)=length(find(sourcePic == (i-1)))/(m*n);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
&