Scanning Receipts Proves Trickier Than Anticipated

It’s one of those things that certainly sounds simple enough: take a picture of a receipt, run it through optical character recognition (OCR), and send the resulting information to whatever expense-tracking website or software you wish. There are companies that offer such a service, so it can’t be too difficult to replicate on your own…right?

That’s what [Marcel Robitaille] thought when he set out to create his homebrew “Receipt Ingestion” system, anyway. But in reality it took so much time to troubleshoot and implement that he says it would have been faster to just enter in all his receipts by hand. We’re happy he stuck with it though, otherwise you wouldn’t be reading about it on Hackaday, and we wouldn’t be able to learn anything from the detailed account he’s provided.

It only took an evening to hack together a rough demo, and the initial results were very promising. The code could detect the edges of the receipt, rotate the captured image appropriately, and then pull out the critical information such as date, total amount, business name, etc. He was then able to decipher the API for Splitwise, an online service for splitting bills, by capturing the data sent by his browser while adding a new bill. With this information, writing up some Python code to push his captured data into the service was trivial. So far, so good.

Using a QR code as reference point.

But like so many horror films that begin with a happy family starting a new life in a beautiful home, there was a monster lurking in the shadows. It’s one thing to capture data from perfectly clean and flat receipts, but quite another to get any useful info out of one that spent half the day crumpled up in your back pocket. The promising proof of concept that worked a treat under controlled conditions failed completely in the real-world, with [Marcel] reporting that only 1 in 5 receipts he tried to scan actually went through.

In the end, [Marcel] realized that the best way to handle the unreliable condition of the receipts was to focus on a different object in the image. He came up with a QR code marker that he could put on the table with the receipt to be scanned, which his software can use as a known point of reference. This greatly improves the reliability of the image rotation and transformation, which in turn makes the OCR more reliable. It also makes it much easier to tell which images need to be scanned — if there’s no QR code found, the software just skips that shot and keeps looking.

The unique challenges of digitizing large amounts of printed content using OCR makes for some fascinating problem solving, and we’re glad [Marcel] shared this particular story with us. While there’s still some edge cases that need chasing down, he’s using the software on a nearly daily basis, and has posted it up on GitHub for anyone who might wish to build on his efforts.

Hackaday Prize Entry: It’s Like Apple Pay, But For Receipts

There’s Apple Pay, Samsung Pay, Google Wallet, and a host of other ways to pay for stuff with your phone. What about receipts, though? Do you really need to carry around little bits of paper to prove to incredulous friends you have, indeed, bought a donut? The proof is back home, in the file. Under D, for donut.

[Hisham] is working on a very interesting system for the Hackaday Prize. It’s effectively the the opposite side of every point of sale transaction that Apple Pay, Samsung Pay, and Google Wallet are working on. Instead of handling payment, [Hisham]’s Aelph handles receipts.

[Hisham]’s project is hardware, with a small device that plugs into a point of sale terminal. This device transmits a receipt to the Aleph app (or a third party app), and uploads a PDF copy of the receipt to a server. Other than a small hardware box, there’s no additional software required for a POS terminal. For retailers, it’s as easy as plugging in a box, and for consumers, it’s as easy as downloading an app.

The hardware was prototyped on a TI LaunchPad featuring a TIVA C microcontroller. This, along with the NFC eval kit give Aleph more than enough power to connect to a company LAN and spit out a few PDFs. You can check out one of [Hisham]’s demo videos below.

There are a lot of benefits to a electronic receipts; if you ever need a receipt, odds are you’ll scan it anyway – a dead tree receipt is just inefficient. There’s also some nasty chemicals in thermal receipt paper. You only need to Google ‘BPA receipt’ for that evidence. Either way, it’s a great idea, and we long for the day that our wallets aren’t stuffed to Costanzaesque proportions, and a time where we won’t need a scanner to complete an expense report.

The 2015 Hackaday Prize is sponsored by:

Continue reading “Hackaday Prize Entry: It’s Like Apple Pay, But For Receipts”

Receipt Racer Wastes A Lot Of Paper

[Joshua Nobel] and the team at undef came up with a receipt printer game for the OFFF 2011 festival in Barcelona.

The game is a small openFrameworks app that prints a maze on a thermal printer. A ‘car’ is guided through the maze with input taken from a DualShock 3 controller. The game is limited to a maximum distance of 50 meters, the length of the roll of paper. We wondered about the waste of paper this would be until undef pointed out, “ecologically it’s pretty much a disaster, just like any real car.”

The undef team tried to use the printer for the entire visual representation of the game but that didn’t quite work out until [Joshua Noble] came up with a ‘beamer’ to project the car and score onto the paper. We’re not quite sure what the ‘beamer’ is, but everything syncs up and the resulting game is quite nice.

The game itself reminds us of a certain flash game, but that can’t be where the original idea came from. Check out the Receipt Racer gameplay video after the break.

Continue reading “Receipt Racer Wastes A Lot Of Paper”

Game Boy Printer USB Cable And Software

[Furrtek] hooked up his Game Boy printer for use with a PC (translated). The two-part hack started with a cable to attach the device via USB. A Nokia interface cable was used as a base to translate the USB signals into serial, and an ATtiny45 microcontroller added to talk to the printer. He did a great job of free-forming the circuit alterations and fitting it back into the plastic USB plug housing.The next step was to write some software. Using VB6 he coded an application that loads in an image, scales it to fit, and allows you to adjust the contrast that the thermal printer produces. For testing purposes he’s reusing old receipts. See it in action after the break.

Continue reading “Game Boy Printer USB Cable And Software”