简体   繁体   English

比较图像和捕获图像的良好功能

[英]Good features to compare an image with a capture of this image

I want to capture one frame with all the frames stored in a database. 我想捕获所有存储在数据库中的帧。 This frame is captured by the mobile phone, while the database is with the original ones. 该帧由手机捕获,而数据库与原始帧一起捕获。 I have been searching most days in order to find a good method to compare them, taking into account that they have not the same resolution, colors and luminance, etc. Does anyone have an idea? 考虑到它们的分辨率,颜色和亮度等不同,我一直在搜寻大多数天,以便找到一种比较它们的好方法。有人有想法吗?

I have already done the preprocessing step of the captured frame to be as faithful as possible than the original one with C++ and the OpenCV library. 我已经完成了捕获帧的预处理步骤,使其比使用C ++和OpenCV库的原始帧尽可能地忠实。 But then, I do not know what can be a good feature to compare them or not. 但是,我不知道将它们进行比较有什么好处。

Any comment will be very helpful, thank you! 任何评论都将非常有帮助,谢谢!

EDIT: I implemented an algorithm which compares the difference between the two images resized to 160x90, in grayscale and quantized. 编辑:我实现了一种算法,该算法比较了两个调整为160x90的图像的灰度和量化图像之间的差异。 The results are the following: 结果如下:

原来的一个

从屏幕上用手机拍摄

图像差异(移动设备-原始)

The mean value of the image difference is 13. However, if I use two completely different images, the mean value of the image difference is 20. So, I do not know if this measure can be improved on some manner in order to have a better margin for the matching. 图像差异的平均值为13。但是,如果我使用两个完全不同的图像,则图像差异的平均值为20。因此,我不知道是否可以通过某种方式改进此措施以使更好的匹配保证金。

Thanks for the help in advance. 我在这里先向您的帮助表示感谢。

Cut the color depth from 24-bits per pixel (or whatever) to 8 or 16 bits per pixel. 将颜色深度从每像素24位(或其他)减少到每像素8位或16位。 You may be able use a posterize function for this. 您可以为此使用后代功能。 Then resize both images to a small size (maybe 16x16 or 100x100, depending on your images), and then compare. 然后将两个图像调整为较小的尺寸(可能是16x16或100x100,具体取决于您的图像),然后进行比较。 This should match similar images fairly closely. 这应该非常接近匹配相似的图像。 It will not take into account different rotation and locations of objects in the image. 它不会考虑图像中对象的不同旋转和位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM