使用OpenCV计算两个图像的百分比相似度

问题描述:

我可以使用bewlow显示的代码找到匹配的功能。我想计算两个图像之间的百分比相似度。我是OpenCV的新手。任何形式的帮助都将受到高度赞赏。

I am able to find matching features using bewlow shown code. I want to calculate percentage similarity between two images. I am new to OpenCV. Any kind of help will be highly appreciated.

    FeatureDetector detector = FeatureDetector.create(FeatureDetector.ORB);
    DescriptorExtractor extractor = DescriptorExtractor
            .create(DescriptorExtractor.ORB);

    detector.detect(image1, keypoints1);
    detector.detect(image2, keypoints2);

    extractor.compute(image1, keypoints1, descriptors1);
    extractor.compute(image2, keypoints2, descriptors2);

    DescriptorMatcher matcher = DescriptorMatcher
            .create(DescriptorMatcher.BRUTEFORCE_HAMMING);

    MatOfDMatch matches = new MatOfDMatch();
    matcher.match(descriptors1, descriptors2, matches);

是否有其他图书馆可用于同一目的?

Is there any other library available serving the same purpose?

我找到两个图书馆 pHash pdiff 提供我想要的东西。我将评估它们的性能以及与我的代码的兼容性并选择最好的代码。

I found two libraries pHash and pdiff offering what I am looking for. I'll evaluate their performance and as well as compatibility with my code and pick the best one.