rashmigottipati / accord

Automatically exported from code.google.com/p/accord
0 stars 0 forks source link

Maximum cross-correlation formula #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
[http://accord-net.origo.ethz.ch/node/184 Dan originally wrote]:

In the correlationMatching.cs, there is a formula for Normalized Cross 
Correlation matrix like:

                   for (int i = 0; i < windowSize; i++)
                   {
                       for (int j = 0; j < windowSize; j++)
                       {
                           sum1 += w1[i, j] * w2[i, j];
                           sum2 += w2[i, j] * w2[i, j];
                       }
                   }
                   matrix[n1, n2] = sum1 / System.Math.Sqrt(sum2);

But in reference pages, I found that sum2 should be like : sum2 += w1[i, j] * 
w1[i, j] * w2[i, j] * w2[i, j];

Original issue reported on code.google.com by cesarso...@gmail.com on 5 Apr 2012 at 8:50

GoogleCodeExporter commented 9 years ago

Original comment by cesarso...@gmail.com on 2 Nov 2012 at 4:36