Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
Intel Customer Support will be observing the Martin Luther King holiday on Monday, Jan. 17, and will return on Tues. Jan. 18.
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
6599 Discussions

## Calculating the percentage of correlation between two images

Beginner
149 Views

I am working on two images (uint8) where the second image is a subset of the first Image. The offset of sub image with respect to the larger image is to be found and their correlation %. I am doing cross-correlation to find the correlation. I used ippiCrossCorrSame_Norm_8u_C1RSfs for the same.
When I use a scale factor of 0 for correlation it gives an offset of 0,0 always irrespective of the sub images supplied. Then I used a scale factor of -8. Then used ippiMaxIndx_8u_C1R to find the maximum correlation value and offset.

Now, How do I get the percentage of similarity between the two images, for eg.if they match well it is between 96% or if they dont match it will be 10%.

4 Replies
Employee
149 Views
Hello,

My knowledge of the image processing elements is elementary, so I'm not sure if this is what you're looking for. Have you tried the Compare functions described in the image and video processing reference manual? Here's a link to the on-line copy of that manual:

http://software.intel.com/sites/products/documentation/hpc/ipp/ippi/index.htm

Go to the section named "Threshhold and Compare Operations" and then choose the "Compare Operations" section.

Paul
Beginner
149 Views

What do you exactly mean by saying "the second image is a subset of the first Image"

Is the second image an exact pixel-wise subset copy of the first image or only "very close" approximation and let's sayvaries due to a noise level or illumination changes?

You may want to study image registration subject and methods - see http://en.wikipedia.org/wiki/Image_registration

Don't you need a subpel level accuracy for your matching offset to achieve the maximum similarity between two? Phase correlation method seems like an attractivemethod here if there is no scalinginvolved.

Best regards,

AndrewK

PS. I have never tried ippiCrossCorrSame_Norm_8u_C1R and don't know how it works.

Beginner
149 Views
Beginner
149 Views
Thanks Andrew, That was of good help.