trysizes.m
来自「这是一个去马赛克工具软件」· M 代码 · 共 24 行
M
24 行
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 + =
减小字号Ctrl + -
显示快捷键?