资源简介
matlab连续计算图像间的互信息值程序~一共计算了配准前配准后的图像间的互信息值,一套数据图片760张
代码片段和文件信息
%% 设置参数 %%%%%%%%%%%%%%%%%%%%%%%%
picture_number=760;
Result3_1=zeros(1picture_number-1);
Result3_2=zeros(1picture_number-1);
%% 配准前互信息的计算 %%%%%%%%%%%%%%%
for m=1:picture_number-1;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if m<=3
a=‘Mouse000‘;
b=‘_RT8_p‘;
c=‘a‘;
d=‘.jpg‘;
I1=strcat(aint2str(2*m)bint2str(2*m)cd);
F1=imread(I1);
I2=strcat(aint2str(2*m+2)bint2str(2*m+2)cd);
G1=imread(I2);
F1=rgb2gray(F1);
G1=rgb2gray(G1);
Pf=imhist(F1)./numel(F1);
Pg=imhist(G1)./numel(G1);
Pfg=zeros(256256);
for i=1:2704
for j=1:4064
Pfg(F1(ij)+1G1(ij)+1)=Pfg(F1(ij)+1G1(ij)+1)+1;
end
end
W=sum(Pfg(:));
Pfg=Pfg/W;
N1=-sum(Pf.*log10(Pf+eps));
N2=-sum(Pg.*log10(Pg+eps));
Pfg=Pfg.*log10(Pfg+eps);
N12=-sum(Pfg(:));
Result3_1(m)=N1+N2-N12;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
elseif m==4
F1=imread(‘Mouse0008_RT8_p8a.jpg‘);
G1=imread(‘Mouse0010_RT8_p10a.jpg‘);
F1=rgb2gray(F1);
G1=rgb2gray(G1);
Pf=imhist(F1)./numel(F1);
Pg=imhist(G1)./numel(G1);
Pfg=zeros(256256);
for i=1:2704
for j=1:4064
Pfg(F1(ij)+1G1(ij)+1)=Pfg(F1(ij)+1G1(ij)+1)+1;
end
end
W=sum(Pfg(:));
Pfg=Pfg/W;
N1=-sum(Pf.*log10(Pf+eps));
N2=-sum(Pg.*log10(Pg+eps));
Pfg=Pfg.*log10(Pfg+eps);
N12=-sum(Pfg(:));
Result3_1(m)=N1+N2-N12;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
elseif m>=5
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if m<=48
a=‘Mouse00‘;
b=‘_RT8_p‘;
c=‘a‘;
d=‘.jpg‘;
I1=strcat(aint2str(2*m)bint2str(2*m)cd);
F1=imread(I1);
I2=strcat(aint2str(2*m+2)bint2str(2*m+2)cd);
G1=imread(I2);
F1=rgb2gray(F1);
G1=rgb2gray(G1);
Pf=imhist(F1)./numel(F1);
Pg=imhist(G1)./numel(G1);
Pfg=zeros(256256);
for i=1:
- 上一篇:1023长度的Gold码的生成程序
- 下一篇:matlab计算图像间的相似度程序
相关资源
- matlab计算图像间的相似度程序
- 基于自相关法的语音基音周期估计-
- mcmc程序MATLAB
- 同步电机模型的MATLAB仿真
- 最小方差自校正调节器matlab
- 有关单层小波分解与重构matlab程序
- 多层小波分解与重构matlab程序
- GNMATLAB实现
- lipschitz指数matlab程序91016
- matlab计算器源代码
- 信道化的matlab仿真实现
- matlab中jpeg tool box(tbx)编译好的mex
- 电力线通信信道模型
-
电路实验与MatlabSimuli
nk仿真 - LABVIEW和MATLAB混合编程方法研究及其在
- JPEG的matlab实现代码
- matlab 2007b注册机
- 基于MATLAB的通信系统仿真平台设计
- 异步电机矢量控制,亲测可用,版本
- 用MATLAB实现GMSK信号的产生与解调
- 勒沙杰空间计量MATLAB可做面板数据
- 移动目标检测MATLAB版
- matlab贝叶斯分类(3)-UCI数据集通用分
- 几种现代谱估计的方法Matlab程序
- 分数延迟FIR滤波器Matlab程序
- SC-FDMA matlab
- 计算电磁学王秉中矩形波导基膜和第
- 并网仿真模型matlab
- AGC 自动增益控制 含matlab和c两种
- 用双线性变换法设计一个巴特沃斯低
评论
共有 条评论