视觉上比较两个图像 [英] Comparing two images visually
本文介绍了视觉上比较两个图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望能在一定阈值内检查两张图片是否相同。
I am wanting to be able to check to see if two images appear to be the same, within a certain threshold.
这两个图像是相同的眼睛,但有一个略有不同的颜色。我尝试了以下示例:
These two images are the same to the eye, but one has slightly different colors. I have tried the following example:
http://www.vb-helper.com/howto_net_image_compare_threshold.html
不幸的是,它似乎只是检测到图片是否相同。
Unfortunately, it only seems to detect when the images are identical. How can I determine if the images are the same within a certain threshold, with VB.NET?
推荐答案
- 将两张图片调整为相同尺寸,例如16x12或90x60(取决于您的阈值)。
- 将每个像素的颜色深度降低到4或8位(未调色) 。您可以为此使用posterize函数。
然后查看两个较小的图像是否重复。如果是这样,原件必须非常接近。
Then then see if the two smaller images are duplicates. If so, the originals must be pretty close.
这篇关于视觉上比较两个图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文