Confusion in Various distance measures : Normalized Cross Correlation, Normalized Correlation Coefficient and Bhattacharya Coefficient

StackOverflow https://stackoverflow.com//questions/24052544

Question

I am Confused with these above distance measures - as to which distance measure will be useful for matching image similarity. I have done my survey on these measures and this is my conclusion. Can anyone tell me if i went wrong with any of the distance measures.

1)Normalized cross correlation: This works well with normal images and provided rotated images it can measure similarity upto some amount, it doesnt work well for images with varied brightness/ contrast whereas it should had support as per [http://en.wikipedia.org/wiki/Cross-correlation] .And it doesnt support shifted images.

2)-Normalized Correlation Coefficient: It matches rotated and intensity difference images , but it doesn't support for shifted images.

3)Bhattacharya Coefficient- It works well on rotated and shifted images, but for images with intensity difference i.e brightness or low contrast ones , it doesnt detect.

I know that all these data similarity measures depend on type on dataset you have , But can anyone tell me , if i have been wrong anywhere with my measure results?

Was it helpful?

Solution

These terms all apply to variations of template matching, as in OpenCV's matchTemplate. In all of these algorithms two images are compared by translating one relative to the other, performing some type of calculation on the overlapping pixels, and returning a number.

It's important to realize that in this operation, no rotation or size scaling is being performed, so none of them are particularly well designed to work on images that are rotated or scaled. That is, if you're looking at objects that are rotated or scaled in the images, these aren't the right methods to use.

Most of the differences that between the different algorithms are just about how exactly the pixels are compared. Basically, the more that's normalized and corrected for (e.g., mean illumination, overall range of brightness, etc), the higher the computational cost and the better the result (for unknown lighting situations). Some simple ideas about how to think of these are the following. The normalized ones just work with normalized data, work well for overall lighting differences, as if the lights in the room were turned up or down. The cross correlation is the most commonly used, as it's relatively quick and gives reasonable results. The correlation coefficient compares relative to the mean, so again, this is a good choice for lighting differences. If your using outdoor images, you almost always want to use a normalized method. If you're not worried about computational time, the normalized correlation coefficient is usually the best.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top