Project · Custom hardware · Horticulture · 2023

Full-Surface Apple Imaging Device

A motorised rotator that turns an apple in front of the camera, and a script that unrolls the photos into one flat map of its skin.

0.176° per motor step
360° around the fruit, bar the clamped poles

The problem

A research group studying russeting on apples (the rough, brownish patches on the skin) wanted to measure it as a percentage of the fruit surface instead of giving it a visual score.

For that you need the whole surface, and a sphere is awkward to photograph. One view shows at most half of it, and the fruit gets darker towards its edges (Lambert's cosine law), so a dark rim is hard to tell apart from a dark blemish.

Imaging ran in a hyperspectral cabinet covering 500 to 1000 nm, with a DSLR as the RGB alternative. What was missing was a way to turn the apple in exact, repeatable steps in time with each exposure, and to turn the photo series into one evenly lit map. Off-the-shelf rotation stages could not take the trigger from the imaging system or hold the irregular shape of real fruit, and they could not be adapted quickly when the requirements changed.

What we built

The Apple Rotator Device (ARD) is designed in CAD and mostly 3D printed in black PLA (black keeps stray reflections out of the images). Two clamps hold the apple at its poles, and two stepper motors turn it about a horizontal axis in steps of 0.176°. It stands on a tripod.

An Arduino Nano with custom C++ firmware drives the motors. Each step is triggered by a push button or by a light sensor that notices the imaging system's lamps switching on, so rotation and exposure stay in step.

The processing is a scripted Fiji pipeline. For each full turn it:

  • loads the frames and centres each one on the tracking dots in the background, which removes small shifts between frames;
  • cuts a narrow window out of the centre of every frame (the strip that faces the camera squarely and has the least shading);
  • stitches those windows into one flat strip, the unrolled surface;
  • divides the strip by the unrolled image of a uniform cylinder, to even out the shading that is left.

What worked

One automated scan gives a flat map of the apple, 360° around the rotation axis, with either the hyperspectral camera or the DSLR. Aligning on the tracking dots removes the jitter of uncorrected scans, and the cylinder reference makes the brightness across the surface much more even, so the map can be used for segmentation and machine learning.

What didn't

The skin under the clamps, at the two poles, is never imaged.

In the russeting study, the plain DSLR turned out to be the better tool. RGB scans with a machine-learning classifier segmented russeted skin more reliably than the hyperspectral scans, with less equipment and in less time. The most distinctive russeting signal lies between 400 and 550 nm, mostly below the 500 to 1000 nm range of the hyperspectral system.

The numbers

  • 0.176° per motor step, so the apple turns in small, repeatable steps between exposures.
  • 360° of coverage around the rotation axis, minus the two small patches under the clamps.

Photos and figures

Questions about this project? Send us an email.