📄 trysizes.m
字号:
function [Csize,scoremax,CLabmax]=trysizes(I,Tfilename,M,My_sizes)
%This functions calculates the combined correlation for each of the sizes
%given, and computes which size provides the maximum correlation. The
%result is the correct size, the maximum correlation value and the combined
%correlation itself.
[imx,imy,imz]=size(I);
scores=zeros(11,1);
CLab=zeros(imx,imy,length(My_sizes));
for k=1:length(My_sizes)
%Calculate combined correlation.
CLab(:,:,k)=combined_corr(Tfilename,My_sizes(k),I,M);
%Compute maxima.
scores(k)=max(max(CLab(:,:,k)));
end
%Choose the correct size as a function of the highest correlation value.
scoremax=max(scores);
Csize=My_sizes(min(find(scores==scoremax)));
CLabmax=CLab(:,:,min(find(scores==scoremax)));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -