如何在C#中将图像与另一个图像(旋转,亮度,角度)稍有不同进行比较 [英] How to compare image with a slightly different another image(rotation, brightness, angle) in c#

查看:150
本文介绍了如何在C#中将图像与另一个图像(旋转,亮度,角度)稍有不同进行比较的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个应用程序来按书脊识别书籍.我想要做的是拍摄书脊的图片,并将其与书籍数据库匹配.
我希望为此使用模式匹配和模板匹配.首先,我希望使用书脊柱的模板通过模板匹配来搜索书
保存在数据库中,并与所拍摄的照片匹配.但是此过程非常昂贵,并且需要很长时间才能浏览数据库中保存的所有图像.
所以我想到了改用直方图.使用直方图和阈值后,我能够找到更类似的图像.但问题在于那里的书籍
可以是具有相同颜色甚至不同光照条件的书脊.因此,逐像素进行搜索和比较会产生很多假阴性结果,
这些图像在不同的光照条件,少量旋转和大小下可能会有所不同.如果可以的话,请引导我了解书刊的方式.
到目前为止,我一直在使用色彩平均值,但这还不够,我还能用来识别这本书的其他独特功能是什么.

(所使用的图像是在不同的时间拍摄的.因此角度,亮度可能会有所不同)

http://imageshack.us/photo/my-images/18/59477998.png

上面的链接显示了书脊的外观.

I am creating an application to recognize books by its spine. What I want to do is take picture of a book spine and match it with a database of books.
I was hoping to use pattern matching and template matching for this. First i was hoping to search book by template matching using templats of book spines
saved in database and match them with the taken picture. But this process is very expensive and it takes long time to go through all the images saved in database.
So i thought of using histograms instead. After using histograms and thresholding i was able to find similer images . But the issue is when it comes to books there
can be book spines with same colors and even different light conditions. So doing pixle by pixle search and comparison gave lots of false negative results,
These image can be differ with different light conditions, little bit of rotation and size. If you can please guide me the way i can recognize the book by it is spine.
So far I have been using color aveages but it is not enough, what are the other unique features i can use to recognize the book.

(Images used are taken in different times. So the angle,brightness can be different)

http://imageshack.us/photo/my-images/18/59477998.png

Above link shows how book spines looks like

推荐答案

您已经很好地使用直方图来识别相似的图像.您将必须使用模式识别 [
完成此操作后,您可以使用神经网络来识别相似之处.这将是一个很好的选择:
http://en.wikipedia.org/wiki/Hopfield_net [ http://pdiff.sourceforge.net/ [ Google学术搜索 [
You have done well to use histograms to identify similar images. You will have to use pattern recognition[^] to do the rest.

Try separate algorithms for cropping, rotating and scaling the image. For example when a photo of a book spine is provided,
1. You first rotate it such that the spine is in a perfect vertical line.
2. Then the remaining parts of the image should be cropped.
3. Then scale it into a predefined size. For example if you have 8"x1", 6"x1.5", 12"x0.5" spines, you can scale them all to 12"x1.5". So the comparison is much easier.

After doing this, you can use a neural network to identify the similarities. This would be a good one: http://en.wikipedia.org/wiki/Hopfield_net[^]

Another free (GPL licenced) project: http://pdiff.sourceforge.net/[^]

And don''t forget to search in Google Scholar[^]. A project such as this needs a lot of reading.

Good luck!


这篇关于如何在C#中将图像与另一个图像(旋转,亮度,角度)稍有不同进行比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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