LAB · PROTOTYPE · WINTER 2023

Why we hacked a party light to sort olives

A two-week side project for a family olive harvest became a working prototype, drew a big response from the computer vision community, and was presented on OpenCV Live.

Four photos: olives on a branch, harvest nets under olive trees, red laser squares marking olives on the sorting table, and the camera, projector and laptop set up at the sorting machine
From the grove to the sorting table: the harvest, the laser marking selected olives, and the on-site setup.

The problem

After the harvest, olives are sorted by hand into table olives and olives for oil. People stand over a table covered in coin-sized, near-identical fruit and pick out bad olives and impurities by eye. Some defects are tiny, and fatigue builds up fast.

It was the right size of problem for a side project: something we could prepare remotely in two weeks, then test on site during the harvest.

The idea

Let a camera find what needs to be picked, and let light point at it. Instead of a screen the sorter has to keep looking at, a laser projector draws a shape around every olive that should come out, directly on the table.

How we built it

  • Opened up a party laser projector and took control of it with an Arduino, a DAC module and an oscilloscope, then drew our own patterns: squares, circles and triangles.
  • Calibrated the camera and projector fields of view onto each other.
  • Detected every individual olive and sorted it by colour and the presence of impurities.
  • Projected a pattern around each olive selected for removal.
  • Built and iterated off-site with replica fruit (there are no raw olives in Berlin), then installed the imaging, projection and lighting on site and fine-tuned it with real raw olives.

NVIDIA Jetson Nano · IDS board-level colour camera with high NIR sensitivity · Adafruit MCP4728 DAC · OpenCV · visible and IR lighting · one converted party light

What we learned

The projector light interferes with the camera, which caused some of the flicker in the projection. Switching from green to red and projecting squares larger than the olives helped a lot. The fundamental fix is hardware triggering: project only while the image sensor is not exposing.

Projection already runs in parallel with frame capture. Showing only two to four selections at a time, and moving on as they are picked, keeps the table readable for the person sorting.

The response

On site, the feedback was positive. We came back with sore muscles, a bag of frozen raw olives and a to-do list.

Online, the project drew comments from computer vision engineers, robotics researchers and people from the olive-sorting industry, and OpenCV invited us to present it on OpenCV Live.

“One of the few posts with some real engineering.”A software engineer with a PhD, on LinkedIn
“I really enjoyed learning about your solution and seeing a different way of doing what we do.”An engineering manager in image analysis at an industrial olive-sorting company, on LinkedIn

Why it matters to us

This project is how we like to work: find the real bottleneck, use what is available, build quickly and test where it counts.

Watch the talk: OpenCV Live, Episode 120 →