Info

此问题已关闭。 请重新打开它进行编辑或回答。

Can anyone help me check is this the correct way of formulating this formula

1 次查看(过去 30 天)
I am currently working on watermarking approach. I want to calculate the correlation without using the MATLAB inbuilt formular corr2. when i compared my answer with corr2 and my formula (i.e.
  1. . without any attacks on the watermarked image both values are the same =1
  2. . without attacks implemented answers are different e.g. with corr2 = 0.9+ whilst using the formula answer are 1.12+ or 1.0023 etc.)
so, i'm having doubt the way i formulated the formula in the attached for NC Below is my formulation?
host = double(host);
watermarked = double(watermarked);
NCtopF=0;
NCdownF=0;
NCdown= 0;
NCtop1=0;
for i=1:64
for j=1:64
NCtop = host(i,j) .*watermarked(i,j);
NCtop1= NCtop1 + NCtop;
NCdown = NCdown + host(i,j).^2;
end
NCtopF = NCtopF + NCtop1;
NCdownF = NCdownF + NCdown;
end
NCsum = NCtopF/NCdownF;
NC1 = corr2(host,watermarked);
fprintf('\n normalized correlation (corr2) : %d \n', NC1);
fprintf('\n normalized correlation Y : %d \n', NCsum);

回答(0 个)

此问题已关闭。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by