Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I'm working with a CBIR(Content-based Image Retrieval) project which will draw RGB histogram of images and also calculate the distance between other images with query image.

I';m using VS 2008 - MFC and OpenCV Library. The method i wanted to use for calculating the distance is Euclidean Distance(ED), but somehow i failed to find a method in OpenCV to help me to this calculation.

There is a cvCompareHist function in OpenCV where help us to compare 2 histogram with one of the following method:
1) Correlation : cv_COMP_CORREL
2) Chi-Square : cv_COMP_CHISOR
3) Intersection : cv_COMP_INTERSECT
4) Bahttacharyya Distance : cv_COMP_BAHTTACHARYYA

My Question:

Is there any function can help me do the comparison in OpenCV?
If yes, which function?
If no, how do i code it myself for this formula?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900