货币票据识别 [英] Money Bill Recognition

查看:68
本文介绍了货币票据识别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的会员



美好的一天..

我正在尝试使用opencv为(Dollar和Pound)赚钱图书馆,但我的识别码有很多问题!!!

我的想法是制作一个软件,用相机检测货币,并以语音格式给我账单的价值。 />


任何人都可以帮助我!请

Dear Members

Good day..
I am trying to make an money bill recognition for (Dollar and Pound)using opencv libraries but i a am having alot of problem with the recognition code !!!
my idea is to make an software to detect the currency using camera and give me the value of the bill in voice format.

can any body help me! please

推荐答案

同意nv3,这不是快速解答的主题。这项任务需要一些研究。正如你所说它不应该防止伪造票据,它使问题的解决方案非常现实。



我建议尝试以下路线:



首先,您可以创建所有账单的所有可用变体的位图,并记住它们作为位图。每个位图都应该规范化。然后,您需要拍一张用户账单。在第一步,您应该将其识别为矩形,它可以具有不同的大小并且稍微不对齐。为此,您需要在明亮的白色背景上拍照(黑色?也可以考虑),高度对比,并以数字方式对比。然后执行标准blob分析并生成最大尺寸的凸包,它应与整个钞票的矩形相匹配。然后你需要检查凸包是否代表靠近矩形的多边形(识别最长边,检查另一边接近平行),最后对齐图像使其成为与水平像素对齐的矩形海峡(通常表示矩形位图)。在这个阶段,折叠的帐单角可能会产生一些问题,但一些漏报总是不可避免的。您始终可以发出一些失败消息。然后,您应该根据示例位图的像素大小重新采样图像。因为您应该使用相同的硬件来拍摄样本图像,所以它应该不是问题。



某些问题可能会有所不同宽高比的账单。例如,在美国,所有账单的大小都相同,但在其他一些国家,大小甚至宽高比都可能不同。在这种情况下,您应该按宽高比对测试下的帐单进行分类。当您进行比较时,它可能会为您提供开始时的标准账单的第一个近似值。



比较样本账单的比较。请注意,与每个名义相比,您需要尝试4种可能的账单方向。您需要使用适当的范数空间计算两个图像之间的距离



一个简单的图像比较方法是使用标准化的颜色直方图 http:// en。 wikipedia.org/wiki/Color_histogram [ ^ ]和比较直方图形状。它可能会或可能不足以告诉最近的样本图像。



但是,您可能需要一些更复杂的算法。需要考虑的一件事是众所周知的结构相似性指数方法:

http://en.wikipedia.org/wiki/Structural_similarity [ ^ ],

https://ece.uwaterloo.ca/~z70wang / research / ssim / [ ^ ],

http://www.lomont.org/Software/Misc/ SSIM / SSIM.html [ ^ ],

http://pholia.tdi .informatik.uni-frankfurt.de /~philipp / software / dssim.shtml [ ^ ],

http://mehdi.rabah.free.fr/SSIM/ [ ^ ]。



参见:

http://mehdi.rabah.free.fr/SSIM/ [ ^ ],

https://www.math.ucdavis.edu/~hunter/book/ch1.pdf [ ^ ],

http://www.proceedings2008.imcsit.org/pliks/209.pdf [ ^ ],

http://www.springer.com/cda/content/document/cda_downloaddocument/978144712​​4573-c2.pdf?SGWID=0-0 -45-1275841-p174268990 [ ^ ]。



您可以在这里找到很多有用的资料: http://www.semanticmetadata.net/lire/ [ ^ ]。



无论如何,正如我所说,这是一个研究问题。< br $> b $ b





我差点忘了语音输出。这是你不需要自己开发的东西。如果你正在使用Windows,它配备了完善的Speech API:

http://msdn.microsoft.com/en-us/library/ee125663%28v=vs.85%29.aspx [ ^ ]。



您只需要使用API​​的文本到语音部分,这自然是最简单的部分。使用.NET特别容易,您可以在几行代码中解决这个问题。您将需要使用程序集System.Speech,只需要命名空间 System.Speech.Synthesis 请参阅:

http://msdn.microsoft.com/en-us/library/system.speech.synthesis.aspx [ ^ ]。< br $>


祝你好运,

-SA
Agree with nv3, this is not a subject for a Quick Answer. This task will need some research. As you say it should not protect against counterfeit bills, it makes the solution of the problem quite realistic.

I would suggest to try out the following route:

First, you can to create bitmaps of all available variants of all bills and remember them as bitmaps. Each bitmap should be normalized. Then, you need to take a picture of a user's bill. On first step, you should recognize it as a rectangle, which can be of different size and slightly misaligned. For that purpose, you need to take a picture on the bright white background (black? also can be considered), highly contrasted, and contrast it digitally. Then perform standard blob analysis and produce maximum-size convex hull which should match the rectangle of the whole bill. Then you need to check up that a convex hull represent the polygon close to a rectangle (recognize the longest side, check up that some other side is close to parallel), and finally align the image to make is a rectangle aligned with the horizontal pixel strait (how rectangular bitmaps are usually represented). On this stage, folded bill corners can create some problems, but some false negatives are always unavoidable. You can always issue some failure message. Then you should re-sample the image according to the pixel size of the sample bitmaps. As you should use the same hardware for taking the sample images, it should not be a problem.

Some problem could be different aspect ratio of bills. For example, in US all bills have the same size, but in some other countries, sizes and even aspect ratios could be different. In this case, you should classify the bill under the test by aspect ratio. It may give you the first approximation on what nominal bill to start with when you go to comparison.

Compare comparison with the sample bills. Note that you need to try out 4 possible orientations of the bill comparing with each nominal. You will need to calculate the distance between two images using some appropriate norm and space.

One simple image comparison method would be using a normalized color histogram: http://en.wikipedia.org/wiki/Color_histogram[^] and comparing the histogram shapes. It may or may not be enough to tell the closest sample image.

However, you might need some more sophisticated algorithm. One thing to consider would be the well-known structural similarity index method:
http://en.wikipedia.org/wiki/Structural_similarity[^],
https://ece.uwaterloo.ca/~z70wang/research/ssim/[^],
http://www.lomont.org/Software/Misc/SSIM/SSIM.html[^],
http://pholia.tdi.informatik.uni-frankfurt.de/~philipp/software/dssim.shtml[^],
http://mehdi.rabah.free.fr/SSIM/[^].

See also:
http://mehdi.rabah.free.fr/SSIM/[^],
https://www.math.ucdavis.edu/~hunter/book/ch1.pdf[^],
http://www.proceedings2008.imcsit.org/pliks/209.pdf[^],
http://www.springer.com/cda/content/document/cda_downloaddocument/9781447124573-c2.pdf?SGWID=0-0-45-1275841-p174268990[^].

You can find a lot of useful material here: http://www.semanticmetadata.net/lire/[^].

Anyway, as I say, it's a matter of some research.



I almost forgot about voice output. This is something you wouldn't need to develop by yourself. If you are working with Windows, which comes with the fully-fledged Speech API:
http://msdn.microsoft.com/en-us/library/ee125663%28v=vs.85%29.aspx[^].

You would just need to use the text-to-speech part of API, which is, naturally, the simplest part. It is especially easy with .NET, where you can solve this problem in few lines of code. You will need to use the assembly System.Speech, only the namespace System.Speech.Synthesis Please see:
http://msdn.microsoft.com/en-us/library/system.speech.synthesis.aspx[^].

Good luck,
—SA


这篇关于货币票据识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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