Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

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

조회 수: 1 (최근 30일)
Foday  Jorh
Foday Jorh 2019년 6월 22일
마감: MATLAB Answer Bot 2021년 8월 20일
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