Info
This question is closed. Reopen it to edit or answer.
Can anyone help me check is this the correct way of formulating this formula
1 view (last 30 days)
Show older comments
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.
- . without any attacks on the watermarked image both values are the same =1
- . 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);
1 Comment
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!