Sort Your Candy With A Raspberry Pi And Google Cloud Vision

If you have been off trick-or-treating and returned home with an embarassment of candy, what on earth can you do to mange the problem and sort it by brand?

Yes, it’s an issue that so many of us have had to face at this time of year. So much a challenge, that the folks at [Dexter Industries] have made a robotic candy-sorter to automate the task.

OK, there’s something of the tongue-in-cheek about the application. But the technology they’ve used is interesting, and worth a second look. Hardware wise it’s a Lego Mindstorms conveyor and hopper controlled by a Raspberry Pi through the BrickPi interface. All very well, but it’s in the software that the interest lies. They use the Raspberry Pi’s camera to take a picture to send off to Google Cloud Vision, which they then query to return a guess at the brand of the candy in question. The value returned is then compared to a list of brands to keep or donate to another family member, and the hopper tips the bar into the respective pile.  They provide full build details and code, as well as the video we’ve put below the break. So simple a child can explain it, sort of.

Machine vision remains a challenge, as we can see from our list of stories tagged with it; only  a few of them over all the years Hackaday has been in existence. Using a cloud service might not be to everyone’s taste, but it provides an alternative route into machine vision as well as the extra power of the Google engine, and could open up the technology to makers who might not otherwise use it.

[via Recantha]

15 thoughts on “Sort Your Candy With A Raspberry Pi And Google Cloud Vision

  1. There is another video with it sorting different types of bars. Not sure if the current video is the correct one to link to. Pretty impressive that it can differentiate between the packages even when at odd angles and different orientations. Time to order a Pi and camera.

  2. Though I dunno if you’ll make your fortune with a candy sorter this year, only seemed to have about a quarter the kids come by as normal, and the weather is best it’s been in 3 years. Maybe they got all halloweened out on weekend events. Also had to run out for milk and the shelves are still brimming with a large variety of candy when they were usually sold pretty much out, or down to unpopular stuff a day or two before.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s