foodie: a turntable booth that records every dish in color and depth
We built foodie, a closed photo booth that records a plate of food from every side, in color and in depth, at the press of one button. In five cooking days it recorded 83 plated variations of 54 dishes, and this post explains how it works and why we built it the way we did.
At a glance
Area | What we use |
|---|---|
Enclosure | Aluminium profile frame, white walls, a front door, six LED strips |
Motion | 40 cm turntable, NEMA17 stepper on a belt, TMC2209 driver |
Cameras | Orbbec Gemini 335 from the top, Gemini 2 from the side at 42° |
Control | Raspberry Pi 5, one Python service under systemd |
Operator | Start button, touchscreen, status LED |
One run | About two minutes, about 410 MB on a USB drive |
Output so far | 84 runs, 83 variation folders, 2,971 hand-held photos, 79 GB |
The whole system on one page: what the operator touches, what runs on the Pi, what it drives, and where the data ends up.
What foodie is for
Photos of food are easy to take and hard to compare: light, angle and camera change from shot to shot. We wanted the same light, views and camera settings for every dish, with depth and calibration, so the data can be measured and not only looked at.
A run takes photos from four sides and from the top, a 360° video from both cameras, depth for every picture, and a record of how it was made. After each run the team also photographs the plate with three hand-held cameras.
The planned use is research on AI food estimates: how much do the answers of a model change when only the phone, the re-shoot or the plating changes, and the food stays the same? The booth data is the controlled reference for that question.
The box
The booth is a cube of aluminium profiles with white walls and a door at the front. Six LED strips line the frame. Each strip has a warm white and a cold white channel, so there are twelve light channels in all. During a run every channel is fully on. Full on means no PWM, and no PWM means no flicker bands in the video.

The finished booth. The touchscreen at the bottom shows the top camera's live view, the LED next to it shows the state. The office around it is not part of the booth.
The plate stands on a 40 cm white disc. A NEMA17 stepper turns it through a belt with a ratio of about 1:24, driven by a TMC2209 at 8 microsteps. There is no position sensor, so position comes from counting steps. That makes steps per turn critical, and we measured it with the top camera instead of trusting the nominal ratio. The result is 38,379 steps, and three turns of that came back within 0.1°.

Inside the booth: the 40 cm disc on the turntable, with a test plate.
Two depth cameras
We use two Orbbec RGB-D cameras. A Gemini 335 looks straight down. A Gemini 2 stands in a corner and looks down at the turntable axis at 42°, roughly the view of a person sitting at a table. Its 3D-printed mount comes from a parametric script.
Both cameras stream color at 1920 × 1080 and depth at 1280 × 800, both at 30 frames per second. We read them through the vendor SDK, not as plain webcams. The SDK gives us depth, the camera calibration and control over exposure. Depth is aligned to the color pixels in software after capture, which keeps the full color resolution. Depth files are 16-bit, in millimetres, on the same pixel grid as the color picture next to them.
Every run uses the same fixed exposure, gain and white balance. Neither camera reaches neutral white, so a per-channel factor measured on the white disc corrects every saved photo and video.
One Raspberry Pi, one service
A Raspberry Pi 5 runs everything. The button and the stepper driver sit on GPIO pins. The lights and the status LED hang on a PCA9685 PWM board on I2C, which switches 24 V through MOSFET boards.

The control board during the build, before it moved into the base of the booth.
The software is one Python service of about 1,600 lines. It holds both cameras, runs the sequence and draws the touchscreen. The turntable runs in a second process with real-time priority, so camera streams and screen drawing cannot make the table stutter. The service has 193 unit tests. They fake the pins and the cameras at the SDK seam and write real files through ffmpeg, so the logic runs on a laptop without the booth.
A run, step by step
One press starts a run, and every dish gets the same sequence.
One run. The animation is not to scale: the whole run takes about two minutes.
- Lights to full, motor on, fixed camera settings set, two seconds for them to take hold.
- Four times: stand still, side photo with depth, quarter turn.
- Top photo with depth.
- One continuous move: both cameras record while the table turns.
- The videos are cut to one turn and encoded.
- Everything is flushed to the drive, the drive is unmounted, the LED turns green.
For each photo the booth stores the median of five depth frames, not a single frame. The color videos are re-encoded with the color factors. The depth videos are stored lossless as 16-bit FFV1. On the booth a run took 125 to 127 seconds when we measured it.
Exactly one turn
The 360° video must cover exactly one turn: not 355°, not 365°. A fixed recording time would not do that: the table first has to get up to speed, and a free-running camera stream does not start at a chosen angle.
The video move. The cameras record more than they need, and the turn is cut out of the recording by the times of two counted steps.
So we cut by time. The table makes one counted move of two full turns. After one second of ramp-up and one second at full speed, it marks the time of one step and, 38,379 steps later, of a second one. The frames between those two times are the video. The table finishes its second turn and stops where it started. With 20 seconds per turn at 30 frames per second, each video holds 599 to 601 frames. The booth also saves when each frame arrived, so the table angle of any frame is 360 × time / turn time.
Built not to get stuck
The booth has to get through a cooking day without anyone at a terminal. It must recover on its own and never write a half run that looks complete.
Who watches whom. Each layer has a timeout or a check, and the motor is released however the service ends.
- systemd restarts the service if it dies or stops reporting to the watchdog.
- Every external command has a timeout. A hung ffmpeg is killed.
- Each photo and the video get three tries before the run fails.
- A camera that starts with too few frames is stopped and started again.
- The table process releases the motor by itself if the booth process is gone.
- A run only counts when every file exists and every video holds one full turn without a gap. Until then the folder keeps an
.incompletesuffix. - The drive is mounted only during a run, so a green LED always means it is safe to pull.
Operating the booth
The operator types a food ID and a variation ID on the touchscreen, places the plate on the crosshair and presses the button. The screen shows the top camera with guide circles for the disc and three plate sizes. If the drive already holds a run with the same IDs, the booth asks before it records again.

The touchscreen during a run, photographed with a phone.
What one run produces
Each run writes one folder: five photos with depth maps, a color and a depth video per camera, frame times, a calibration file and a run file. The run file holds the food and variation IDs, a hash of the code and config that made the run, and every config value in force. The calibration file holds the intrinsics of each camera, the depth-to-color extrinsics, the exposure and the firmware version. A run folder is 380 to 450 MB.

One real run: the four side views, the top view and their depth. Depth is shown in false color, near is warm and far is cool. Black pixels have no depth.
From runs to a dataset
The cooking days produced 84 booth runs. After each run the plate was also photographed by hand with three cameras: a Sony α7R V, an iPhone 14 Pro Max (on some later dishes an iPhone 17 Pro Max) and a Samsung Galaxy A53. Each camera took a top view, a landscape side view and a portrait side view, in four sets per plate. A few slots are missing.
One folder per plated variation. The totals at the bottom are counted from the folders on disk.
A pipeline on a Mac matches each hand-held photo to its booth run by capture time and builds one folder per variation. The result is 83 variation folders for 54 dishes, 2,971 hand-held photos and 79 GB. Variations are deliberate: the same apple whole and cut, the same salad arranged and mixed, a carrot whole and in sticks.
What we learned
- One GPIO pin was dead. The stepper's direction pin did not switch: its output stage is broken on this Pi. Another pin fixed it.
- The MOSFET boards need 5 V signals. At 3.3 V their inputs only glowed. We run the PWM board at 5 V and accept I2C lines that idle at about 3.6 V.
- Dimmed LEDs make stripes. The cameras' rolling shutter shows the PWM as bands, and no exposure hid them fully. Between runs two strips now burn at 100 % and the rest are off.
- Firmware matters for depth. With the older firmware the top camera filled only about a quarter of a plain white surface with depth under full light. After an update, disc, plate and food are filled.
- The side camera starts badly sometimes. Once per start of the service it delivers half-rate color and no depth. The booth checks the frame rate of both streams after every start and restarts the camera, which costs about four seconds.
- The webcam route was a dead end. The first version read the cameras as plain video devices, with helper processes for the screen. The vendor SDK in one process gave us depth and calibration and fewer moving parts.
- Two processes stole each other's button. The GPIO library opens a pipe in the working directory. Booth and table process shared it, and the button went deaf. The table process now has its own directory.
- People mislabel. Two of 84 runs carry the wrong variation ID. We fixed them in the dataset build and left the run files as recorded. The booth also asks before it records a dish that is already on the drive.
- Record what made the data. Every run stores the hash of the code and the full config. The booth changed during the recording week, and the runs show four code versions. Each run still says which one made it.
Closing
foodie went from first commit to its first dataset run in twelve days, then recorded 84 runs over five cooking days. The parts are ordinary: a Pi, a stepper, LED strips, two depth cameras. What made it work was measured constants instead of nominal ones, one turn cut by counted steps, and runs that either complete or are clearly marked incomplete.