Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Posted
Comments
Sergey Alexandrovich Kryukov 15-Oct-13 17:32pm    
Well, this is because this is not such a simple problem. Does it have to protect against counterfeit bills?
—SA
Rasheed Techno 15-Oct-13 17:37pm    
no it shouldn't , i just need to make the project for the visual impaired people to identify money bills
nv3 15-Oct-13 18:03pm    
You are talking about a full-grown image processing, OCR, and voice output project. Not directly something that can be answered in a "wuick answers" forum. But good luck for your project anyhow.
Sergey Alexandrovich Kryukov 15-Oct-13 19:16pm    
I think OCR is irrelevant here. Nothing forces OP to recognize those digits. He would need to tell which of the sample bill images is the closest to the bill under the test.
I tried to give some preliminary ideas, please see my answer.
—SA
Albert Holguin 15-Oct-13 20:39pm    
What have you tried? ...it looks like OpenCV already has some image comparison capabilities, you would likely just have to store a library of images of bills to compare against and make a routine that compares the user's image to all of those in your database.

1 solution

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.

[EDIT]

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
 
Share this answer
 
v2
Comments
nv3 16-Oct-13 1:59am    
My 5, Sergey.
Sergey Alexandrovich Kryukov 16-Oct-13 2:16am    
Thank you very much.
—SA
Rasheed Techno 16-Oct-13 13:53pm    
thank you , it's really helpful information
Sergey Alexandrovich Kryukov 16-Oct-13 13:58pm    
You are very welcome. It would be nice if you later provide some feedback on how successfully your work goes. I'm sure this problem can be solved reasonably well.
Good luck, call again.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900