|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [WM]: Normalized Correlation
Hey! What happened to the square root(s)?
Let's change the two dimensional matrices into one dimensional vectors
by writing them in row order or column order or zig zag order or
whatever.
The normalized cross correlation is the inner product divided by the
magnitude of one vector and the magnitude of the other. In general the
answer is guaranteed to lie between -1 and +1 (Cauchy Schwartz
inequality). Here the range is between 0 and 1 because the arguments are
positive.
However, given that these are BITMAP images we might want to try HAMMING
distance. This would be the number of bits that are different. The
maximum number of bits they can have in common is N, the length of the
vector, so let's divide by N to normalize. Okay that works.
What is the relationship between the two measures?
The first is based on Euclidean distance (sum of squares)
Look at these tables:
XOR 1 0
----------------
1 0 1
0 1 0
x -1 1
----------------
-1 1 -1
1 -1 1
I hope you can see that they are isomorphic. If you
changed all your binary zeros to ones and binary ones to minus
ones the two distances would be equivalent (different numbers saying
exactly the same thing).
The normalization factor for the inner product
is sqrt(N) * sqrt(N) = N.
Now, I am going back to working 24/7 for my job.
I hope this helps.
Joe
storein wrote:
>
> Hi everybody ,
>
> I want to compute the comparability of two bitmap= images,
>
> I use NC coefficient (Normalized Correlation ) to= compute
> it
>
> the first Image is W(i,j),the second image is W1(i,j)
>
> the fomula is :
>
> NC=Sumi(Sumj(W(i,j)*W1(i,j)))
> /Sumi(Sumj(W(i,j)*W(i,j)))
>
> but I find that the result is not reasonable .
>
> Such As if W(i,j) is W(0,0)=255,W(0,1)=0,W(0,2)=0
> W1(i,j) is W1(0,0)=255,W(0,1)=255,W(0,2)=255
>
> you will get NC=1;
>
> it is not reasonable .
>
> is there a good method of computeing the comparability= of
> two bitmap images??
>
> thank you very much .
>
______________________________________________________________________________
Watermarking Mailing List - http://www.watermarkingworld.org/ml.html
To unsubscribe send email to "majordomo@watermarkingworld.org" with
"unsubscribe watermarking YOURMAIL" in the body.
______________________________________________________________________________
|