使用OpenCV计算两个图像的百分比相似度 [英] Calculate percentage similarity of two images using OpenCV

查看:2490
本文介绍了使用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.

这篇关于使用OpenCV计算两个图像的百分比相似度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆