• 大小: 969B
    文件类型: .m
    金币: 1
    下载: 0 次
    发布日期: 2021-06-09
  • 语言: Matlab
  • 标签: matlab  图像  互信息  

资源简介

用matlab 编写的一个计算图像互信息的小程序

资源截图

代码片段和文件信息

function mi=CalculateMI(ab)
%{
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%








%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%}
a=rgb2gray(a);
b=rgb2gray(b);
a=double(a);
b=double(b);
[MN]=size(a);
hab=zeros(256256);
if max(max(a))~=min(min(a))
    a=(a-min(min(a)))/(max(max(a))-min(min(a)));
else
    a=zeros(MN);
end
if max(max(b))~=min(min(b))
    b=(b-min(min(b)))/(max(max(b))-min(min(b)));
else
    b=zeros(MN);
end
a=

评论

共有 条评论