You know what would be cool: Time-Lapse Tomato Sauce

You know what would be cool: using a Raspberry Pi to take time lapse photos of tomato plants and tomatoes on their journey from seedling to tomato sauce.

Imagine this:

you go to a farmer’s market and buy a jar of tomato sauce.  When you get home, you look up the QR code printed on the label.  The code takes you to Youtube, where you watch a video of your tomato sauce being created, from seedling to jarring.

The Journey is the Destination

While I am not someone who cares much for “where-your-food-came-from” information, I do love time lapse and automated picture taking.  So as with most things, whether people like it or not, I would enjoy making it.

Seems to me that the system would require a few things, several easy, and one TBD-hard.

At the end of the process, you’d need a label printer.  Pretty basic; I know you can get a 4×6 printer on Amazon for about $150.  And you’d need some code to generate a custom label with the right QR code.  I’ve created customized QR codes before via Google tools, so that is taken care of.

It would take a quick second to create the image that the label would show, but most of that is designing the brand stuff.  Placing the QR code in the right spot is just some coordinates work.

Time-lapsing

To generate the photos, you’d need a camera.  I suppose this could be any sort of camera that will stand up to the elements and that has a timer feature.  One thing that might make this project more cost effective would be to find a way for the camera to move/rotate.  That way, instead of several fixed cameras that take pictures of a few plants at a time, you could have one camera capable of taking pictures of all the plants.

Weather-proofing the camera set up would be a unique challenge if I were to use a Pi Camera.  I have never used a Pi outside for any extended period of time.  It’s possible that the fairly exposed circuitry would be very susceptible to even high humidity.  That might kill this idea in its infancy.

To make the process as automated as possible, it would be best to tag each plant with some sort of marker so that it’s easy to detect the identity of each plant using software.  An OpenCV script could probably classify each plant based on something like a 2×8 rectangle with each slot in yellow/purple.  Assuming you could detect the colors, that would give you 16 bits to identify the plant, which for a small operation, would last a lifetime.  (Maybe I’ll just use 2×3 or something.)

Stitcher Premium

Then you’d need to be able to stitch the photos together into a timelapse video.  With FFMPEG and ImageMagick, that is pretty simple.  The one issue here is that a photo may include several plants in it.  So you’d probably want to separate the actual original images into several .png images, one for each plant.  Another OpenCV task.

The one outstanding question is whether you would want to go to the effort to tag tomatoes themselves or just the plants.  In other words, when you tag a jar of sauce with the code, does the code correspond to a plant or to a tomato?

I think the right answer is that it depends on whether sauce is the only endgame or not.  If you are only selling sauce, then the identify of a single tomato doesn’t really matter.  So there is no reason to tag them.

But if you might eventually sell the tomatoes themselves, then you’d want to  be able to show which plant each one came from.  That would require tagging the tomato itself.  Instead of scanning a QR code on the jar, you’d need to be able to scan a tomato and get to the right plant.

That would require some special stuff.  Like, how would you put something on the fruit itself that could be scanned?  My initial thought was to create some sort of special edible ink gun.  It could be controlled by a Pi to print a special sequence of dots on the fruit itself.  Instead of a QR, which would be way too many pixels,  you could do something more like morse code.  Or maybe just use a similar 2×8 set up with either a dot or no dot in each slot.

Then, with a Pi Camera, you could scan the fruit, get the code, lookup which plant it came from and direct to the right Youtube link.

The crux of the matter

Of course, building such an edible ink gun would be no small task.  You’d need it to be precise enough that 1) the ink spots could be small and 2) still distinguishable by a Pi Camera.  The Pi code to turn on the spray at the right time would be fairly simple, so it’s more about finding the right mechanical pieces.  And of course, it would have to be fairly cheap.

As I’m writing this, I’m realizing how much effort this piece would be compared to the benefit, so would probably scrap the tomato ink-gun concept.  Better to just keep track by hand and make sure that the right Youtube video could be called up without resorting to this added layer of complexity.

But it would be a pretty cool project if you could pull it off.  May or may not help sell tomato-based products, but I’d have a lot of fun making it.

Leave a Reply

Your email address will not be published. Required fields are marked *