Community
cancel
Showing results for 
Search instead for 
Did you mean: 
sribug
Beginner
84 Views

Calculating the percentage of correlation between two images

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%.
Please somebody help!!

Thanks in Advance

0 Kudos
4 Replies
PaulF_IntelCorp
Employee
84 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
andrewk88
Beginner
84 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.

andrewk88
Beginner
84 Views

sribug
Beginner
84 Views

Thanks Andrew, That was of good help.
Reply