比较图像相似度的Java库 [英] Java library to compare image similarity

查看:39
本文介绍了比较图像相似度的Java库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我花了很多时间研究一个库,让我可以在 Java 中比较图像.

I spent quite some time researching for a library that allows me to compare images to one another in Java.

我真的没有找到任何有用的东西,也许我的 GoogleSearch 技能不够高,所以我想我会问你们是否可以指出我可以找到这样的东西的方向.

I didn't really find anything useful, maybe my GoogleSearch-skill isn't high enough so I thought I'd ask you guys if you could point me into a direction of where I could find something like this.

基本上我想要做的是将两个图像相互比较并获得两个相似度的值.像一个百分比左右.

Basically what I want to do is to compare two images with each other and get a value of how much the two are similar. Like a percentage or so.

希望你们有我可以用的东西,我自己不知道如何写这样的东西...

I hope you guys have something I can use, I wouldn't know how to write something like that myself...

PS:它不一定是 Java,这只是我的应用程序将运行的环境.

PS: It doesn't necessarily has to be in Java, that's just the environment my app will be running.

推荐答案

你可以看看 SO 本身的两个答案:这个是关于图像比较本身,提供指向 C++ 内容的链接(如果我没看错的话)而 这个提供了指向更广泛方法的链接,其中一个在 C 中.

You could take a look at two answers on SO itself: this one is about image comparison itself, offering links to stuff in C++ (if I read correctly) while this one offers links to broader approaches, one being in C.

我建议从第二个链接开始,因为该讨论中的链接将指向一些相关技术的实现代码,您可以自己翻译"成 Java.

I would suggest starting with the second link since there's links on that discussion that'll lead to implementation code of some relevant techniques which you might be able to "translate" into Java yourself.

这是我的谷歌技能所能做到的最好的,虽然没有 Java - 抱歉.我希望这是一个好的起点!

That's the best my google skills could do, no Java though - sorry. I hope it's a good starting point!

有人遇到了你的问题,他用 Java 编写了自己的比较类.虽然我没有阅读源代码.他明确表示他也找不到用于此目的的 Java 库,所以这就是他自己编写的原因.

Here's someone with your problem who wrote his own comparison class in Java. I didn't read the source code though. He expressly states that he couldn't find Java libraries for that purpose either, so that's why he wrote it himself.

哦,这个 关于 SO 的问题可能是最好的链接,所有关于图像处理的 Java 库.希望其中有一个可以比较图像的相似性.

Oh, and this question on SO has probably the best links on this, all regarding Java libraries of image processing. Hopefully there's one amongst them that can compare images for similarity.

好的,最后JavaImage Processing Cookbook 展示了一种基本算法的 Java 实现,用于确定两张图片之间的差异.它还有一封电子邮件,用于联系撰写它的人以及许多参考资料.不过没有图书馆.

Ok, last edit: The Java Image Processing Cookbook shows a Java implementation of a basic algorithm to determine the difference between two pictures. It also has an email to contact the guy who wrote it as well as a host of references. No library though.

阅读您对问题的评论后除非您已经检查了上述所有链接,因为您想要的似乎是检查两个图像是否相等,我建议从 Java Image Processing Cookbook 开始(因为它在 Java 中实现了一个算法来检查相等的图像)以及指向 SO 问题的最后一个链接.此外,检查 PerceptualImageDiff 和该项目的源代码(C++);这听起来真的很不错 - 显然应该检查两个图像是否与人类视觉系统相同.

EDIT after reading your comment to your question: Unless you've already checked all of the above links, since what you want seems to be checking whether two images are equal, I would suggest starting with the Java Image Processing Cookbook (since that has an implementation of an algorithm in Java to check for equal images) and the last link to an SO question. Also, check PerceptualImageDiff and the source code of that project (C++); it sounds really nifty - it's apparently supposed to check whether two images look equal to the human visual system.

这篇关于比较图像相似度的Java库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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