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.

Developing Your Own Digital Film

In the olden days, you would have a roll of film that you could take to your local drug store and have them develop it. But a serious photographer would likely develop their own photos to maintain complete creative control. While photo editing software has largely replaced the darkroom of old, the images are still held on physical media, and that means there’s room for improvement and customization. In an article for photofocus, [Joseph Nuzzo] shows how you can make your own CFexpress card — the latest and greatest in the world of digital camera storage tech — for less than $100 USD.

The idea here is pretty simple, as CFexpress uses PCIe with a different connector. Essentially all you have to do is get a M.2 2230 NVMe drive and put it into an adapter. In this case [Joseph] is using a turn-key model from Sintech, but we’ve shown in the past how you can roll your own.

Now you might not give it much thought normally, but NVMe devices get pretty hot. This usually isn’t problem inside a large computer case, where they often have large amounts of air blowing over them. But inside a camera you need to dissipate that heat, so thermal compound is a must. With everything screwed together, you have your own card that’s faster and cheaper than commercial offerings.

It’s no secret that there’s a lot of love for NVMe. It’s easy, fast, and adaptable. Since the M.2 slot format includes SATA and PCIe, there’s a likely chance there is a PCIe bus in many cameras. The PCIe bus on the Pi has been convenient for hacking, and we wonder what sort of hacks are out there for cameras.

Camera held in hand

Review: Vizy Linux-Powered AI Camera

Vizy is a Linux-based “AI camera” based on the Raspberry Pi 4 that uses machine learning and machine vision to pull off some neat tricks, and has a design centered around hackability. I found it ridiculously simple to get up and running, and it was just as easy to make changes of my own, and start getting ideas.

Person and cat with machine-generated tags identifying them
Out of the box, Vizy is only a couple lines of Python away from being a functional Cat Detector project.

I was running pre-installed examples written in Python within minutes, and editing that very same code in about 30 seconds more. Even better, I did it all without installing a development environment, or even leaving my web browser, for that matter. I have to say, it made for a very hacker-friendly experience.

Vizy comes from the folks at Charmed Labs; this isn’t their first stab at smart cameras, and it shows. They also created the Pixy and Pixy 2 cameras, of which I happen to own several. I have always devoured anything that makes machine vision more accessible and easier to integrate into projects, so when Charmed Labs kindly offered to send me one of their newest devices, I was eager to see what was new.

I found Vizy to be a highly-polished platform with a number of truly useful hardware and software features, and a focus on accessibility and ease of use that I really hope to see more of in future embedded products. Let’s take a closer look.

Continue reading “Review: Vizy Linux-Powered AI Camera”

A camera slider made from wood and recycled parts

Turning Old Plotter Parts Into A Smooth Camera Slider

Taking apart old stuff and re-using the parts to make something new is how many hackers first got started in the world of mechanical and electronic engineering. But even after years working in industry we still get that tinge of excitement whenever someone offers us an old device “for parts”, and immediately begin to imagine the things we could build with the components inside.

A GoPro mounted on a moving platform made from recycled partsSo when [Victor Frost] was offered an old Cricut cutting plotter, he realized he could use its parts to create the camera slider he’d been planning to build. The plotter’s X stage, controlled by a stepper motor, was ideal for moving a camera platform back and forth. [Victor] wanted to build the entire thing in a “freehand” way, without making a detailed design or purchasing any new parts. So he dived into his parts bin and dug up an Arduino, a 16×2 LCD, some wires and buttons, and a few pieces of MDF.

The camera mount is simply a piece of steel that a GoPro’s magnetic mount can latch onto, but [Victor] keeps open the possibility of mounting a proper tripod ball head. The Arduino drives the stepper motor through an Adafruit Motor Shield, with a simple user interface running on the LCD. The user can set the desired end points and speed, and then run the camera back and forth as often as needed. In this way, the software follows the same “keep it simple” philosophy as the hardware design.

If you’re planning to build your own camera slider, [Victor]’s design should be easy to copy, if you happen to have an old cutting plotter. If not, you can try this simple yet well-engineered model. Want even more? Then check out this fancy multi-axis camera motion control rig.

Continue reading “Turning Old Plotter Parts Into A Smooth Camera Slider”

A Soft Thumb-Sized Vision-Based Touch Sensor

A team from the Max Planck Institute for Intelligent Systems in Germany have developed a novel thumb-shaped touch sensor capable of resolving the force of a contact, as well as its direction, over the whole surface of the structure. Intended for dexterous manipulation systems, the system is constructed from easily sourced components, so should scale up to a larger assemblies without breaking the bank. The first step is to place a soft and compliant outer skin over a rigid metallic skeleton, which is then illuminated internally using structured light techniques. From there, machine learning can be used to estimate the shear and normal force components of the contact with the skin, over the entire surface, by observing how the internal envelope distorts the structured illumination.

The novelty here is the way they combine both photometric stereo processing with other structured light techniques, using only a single camera. The camera image is fed straight into a pre-trained machine learning system (details on this part of the system are unfortunately a bit scarce) which directly outputs an estimate of the contact shape and force distribution, with spatial accuracy reported good to less than 1 mm and force resolution down to 30 millinewtons. By directly estimating normal and shear force components the direction of the contact could be resolved to 5 degrees. The system is so sensitive that it can reportedly detect its own posture by observing the deformation of the skin due its own weight alone!

We’ve not covered all that many optical sensing projects, but here’s one using a linear CIS sensor to turn any TV into a touch screen. And whilst we’re talking about using cameras as sensors, here’s a neat way to use optical fibers to read multiple light-gates with a single camera and OpenCV.

Continue reading “A Soft Thumb-Sized Vision-Based Touch Sensor”

Super Simple Camera Slider With A Neat Twist

When you get into making videos of products or your own cool hacks, at some point you’re going to start wondering how those neat panning and rotating shots are achieved. The answer is quite often some kind of mechanical slider which sends the camera along a predefined path. Buying one can be an expensive outlay, so many people opt to build one. [Rahel zahir Ali] was no different, and designed and built a very simple slide, but with a neat twist.

This design uses a geared DC motor, taken from a car windscreen wiper. That’s a cost effective way to get your hands on a nice high-torque motor with an integral reduction gearbox. The added twist is that the camera mount is pivoted and slides on a third, central smooth rod. The ends of this guide rod can be offset at either end, allowing the camera to rotate up to thirty degrees as the slide progresses from one end to the other. With a few tweaks, the slider can be vertically mounted, to give those up-and-over shots. Super simple, low tech and not an Arduino in sight.

The CAD modelling was done with Fusion 360, with all the models downloadable with source, in case someone needs to adapt the design further. We were just expecting a pile of STLs, so seeing the full source was a nice surprise, given how many open source projects like this (especially on Thingiverse) do often seem to neglect this.

Electronics consist of a simple DC motor controller (although [Rahel] doesn’t mention a specific product, it should not be hard to source) which deals with the speed control, and a DPDT latching rocker switch handles the motor direction. A pair of microswitches are used to stop the motor at the end of its travel. Other than a 3D printer, there is nothing at all special needed to make yourself quite a useful little slider!

We’ve seen a few slider designs, since this is a common problem for content creators. Here’s a more complicated one, and another one.

Continue reading “Super Simple Camera Slider With A Neat Twist”

Game Boy Camera Gets Ridiculously Good Lens

How do you get better pictures from a 20+ year old Game Boy Camera? How about marrying a DSLR lens to it? That’s what [ConorSev] did and, honestly, the results are better than you might expect as [John Aldred] mentioned in his post about the topic. You can check the camera out in the video below.

A 3D printed adapter lets you mount a Canon EF lens to the Game Boy Camera, a trick that we’ve seen in the past. [ConorSev] looked at the existing adapters floating around, and came up with the revised version you see here. There was still the problem of actually getting the images off the Camera cartridge, but luckily, this isn’t exactly unexplored territory either.

While there might not be anything new with this project, using a high-quality lens on the toy makes for some interesting photographs, and you wonder how far you can push this whole idea. Of course, no matter how much of a lens you put on the front, you still have to contend with the original image sensor which has hardly well. Still, we were impressed at how much better things looked with a high-quality zoom lens.

We bet the original designer of the Game Boy Camera never imagined it would have the kind of zoom capability you can see in the video. We love seeing these little handhelds pushed beyond their limits. Cryptomining? No problem. Morse code? Piece of cake.

Continue reading “Game Boy Camera Gets Ridiculously Good Lens”