⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 trysizes.m

📁 这是一个去马赛克工具软件
💻 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 + -