Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: How to calculate Normalized cross correlation - RGB image

$
0
0
"Ananth " <ananth_prog@rediffmail.com> wrote in message <k8evjh$fks$1@newscl01ah.mathworks.com>...
> To Calculate Normalized cross correlation - RGB image?
>
> c=imread('originalwatermark.bmp');
> d=imread('extracted watermark.bmp');
>
> z=c.*d;
> z1=sum(sum(sum(z)));

Three summations doesn't make sense. Two will yield a constant .

> zz=c.*c;
> zz1=sum(sum(sum(zz)));
>
> NC=z1/zz1;

This is not symmetric w.r.t. the interchange of c and d.

> disp('Normalized Coralation for First Watermark');
> disp(NC);
>
> * Please clarify my doubt, the coding is correct or not?

No. Check the source code of CORRCOEF or WIKIPEDIA

Greg

Viewing all articles
Browse latest Browse all 19628

Trending Articles