Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

ippiCrossCorrSame_Norm

georgiswan
Beginner
248 Views

Hello,

It is probably obvious but there is something I dont understandabout ippiCrossCorrSame_Norm .

When I take an arbitrary grayscale image and I extract a template from that same image (i.e. just crop a small section of the image), I expect and I dohave a max correlation where the templatewas extractedfrom the original image but the value of the correlation at the other locations is puzzling me.

For example, when using the 8u_32f_C1 flavor of the routine, I dont seem to ever get a single negative correlation value. Also, the correlation of a textured template seems to match very wellinuniform intensity regions (the correlation is not max but close).Finally, when I invert my template (i.e template = 255 - template), I expect to get a strong but negative correlation value. I dont. The correlation value remains positive.

I read that this correlation is done in the Fourrier domain but even when I try the equivalent computation in matlab using FFT, I dont get the same (strange) results at all.

Q1: Is there something special about the normalization applied to the output of that function, even when using the floating point output ?

Q2: why dont I ever get any negative correlation values?

Thank you!

Gilbert


0 Kudos
1 Solution
Chao_Y_Intel
Moderator
248 Views

Gilbert,

Have you got chance to check the document on image proximity measures computation: http://software.intel.com/sites/products/documentation/hpc/ipp/ippi/ippi_ch11/ch11_image_proximity_measures.html

The normalized correlation coefficient is computed as:
r(r,c) = G(r,c)/sqrt(G(r,c)*G(tplRows/2,tplCols/2).

and it does not expect to get the negative values.

Thanks,
Chao

View solution in original post

0 Kudos
3 Replies
Chao_Y_Intel
Moderator
249 Views

Gilbert,

Have you got chance to check the document on image proximity measures computation: http://software.intel.com/sites/products/documentation/hpc/ipp/ippi/ippi_ch11/ch11_image_proximity_measures.html

The normalized correlation coefficient is computed as:
r(r,c) = G(r,c)/sqrt(G(r,c)*G(tplRows/2,tplCols/2).

and it does not expect to get the negative values.

Thanks,
Chao

0 Kudos
georgiswan
Beginner
248 Views
Thanks for the reply Chao.

This is a bit embarrassing: I had looked at that page but I looked too quickly apparently. I "assumed" that the ippiCrossCorrSame_Norm functions would remove the average local window value butthey do not. Instead, I should use the ippiCrossCorrSame_NormLevel functions which do remove the average value as I need.

Sorry for the confusion.

Gilbert
0 Kudos
Chao_Y_Intel
Moderator
248 Views

Gilbert,

Glad to know it is resolved for you..

Thanks,
Chao

0 Kudos
Reply