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
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:
Go to the section named "Threshhold and Compare Operations" and then choose the "Compare Operations" section.
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.
PS. I have never tried ippiCrossCorrSame_Norm_8u_C1R and don't know how it works.