Below are some frequently asked questions that came up during our
presentation. OK, so we actually made up a few of them, but we won't tell
anyone if you don't.
Q. Why did one of your five dollar bills succeed and one of them fail?
A. They are actually the same bill! The image that succeeded is merely a
cropped version of the one that failed. The bill that was not recognized
either had some dirt and grime around the edges or had a visible shadow as
a result of the scanning process. The corner detector saw the edge, and
interpreted the edge as the top of the image on the bill. Therefore, when
the image was automatically cropped and resized in Matlab, it did not
actually line up with any of the samples. It was apparently close enough
to both the one dollar bill and the five dollar bill to be considered a
possible match, and matched the one dollar bill slightly more than the
five dollar bill. To make our program read this bill successfully, we
manually cropped the edge of the five to where only the image of the bill
was visible.
Q. Could you fool this program with a black-and-white copy of a bill?
A. Probably not. Although we didn't really test this (as making copies of
money is a federal offense), we would surmise that a black-and-white copy
would fail. The reason is, since the copy would effectively be in
grayscale, the red, green, and blue values would be approximately equal
for any pixel in the bill. In an actual bill, the green values would be
much higher in certain areas. This would create a lower correlation for a
copied bill. It would take some experimentation with our threshold value
to be sure of throwing out copies, however.
Q. Could you fool this program with a color copy of a bill?
A. Undoubtedly. But then you'd be breaking the law, and the Secret Service
would have a few words to say to you. Actually, there is a good chance of
catching these if your money scanning hardware is powerful enough, and your
samples contain enough details. Color copies lack the detail of the
original money and have many distortions. The problem is that the more
detail you use, the longer it takes to scan the bill.
Q. Why did you look across the entire bill, rather than looking for key
features like the number in the corner or the face?
A. There are several reasons for this. The first is that while our scanner
probably will not pick out a counterfeit bill made with good equipment, it
should not be a complete idiot either. In other words, it needs to be able
to determine whether an entire bill is being verified, or if it has only
been presented with a small bit of one.
The second reason is that every denomination has different features, enough
so that no one algorithm could easily distinguish between the different
varieties. The new $20, $50, and $100 have drastically different features
from the older $1, $2, $5, and $10. Being able to find the key features
also brings us back to the problem of shifting the money. We would waste so
much time looking around the bill for something by which we could evaluate
it, that we could have found the dot product of the whole thing and be
finished.
Q. Could you add more bills to your sample library, and scan across those?
A. Yes! Not only can we do that, it's trivial. To do this, first find a
good clean sample bill that you wish to include within the library. Scan
the bill, and size it to about 600x250. While the program is more than
capable of accepting any size image, this is about the same size as the
other bills within our inventory.
Once you have done that, save the image as a JPEG, and load it into Matlab
using imread. Use the findedge.m script to
locate its corners. Next, edit the inp2.m script,
adding a line to load the new image as well as a line containing the corners
found above. Use the rest of the file as a model. Finally, add a line to
the whatami.m script that scans across the new bill.
It can go anywhere in the tree of if statements. Once again, use the
rest of the file as a model.
The nice thing about this technique is that it is very easy to add in bills
such as the old $20, $50, and $100. It's also possible to add foreign
currency, such as money from Canada, Mexico, England, etc. The trade off is
that the more money you add, the longer it takes to determine its
denomination. Therefore, a scanner that is capable of determining the
variety of any world currency would take a prohibitively large amount of
computational time.