PhotoPi is a Python-based system designed for automated 3D plant phenotyping. It integrates a multi-camera setup and a turntable controlled by a Raspberry Pi for systematic image acquisition. These images are then processed (optionally on a remote server using COLMAP) to reconstruct 3D point cloud models of plants, which can be further analyzed to extract quantitative phenotypic traits.
Project Page | Paper | Data
Complete PhotoPi system setup: multi-camera array, motorized turntable, and aluminum frame structure for automated 3D plant phenotyping
PhotoPi streamlines the complex process of 3D plant model generation and analysis. It provides a cost-effective and automated alternative to manual phenotyping, enabling researchers to capture detailed structural data of plants for various studies in agriculture, botany, and plant breeding.
This document provides a high-level overview. For more detailed information on specific components, please see:
- Main System (Control & GUI) README
- Raspberry Pi System README
- Remote Server (3D Reconstruction) README
- Point Cloud Analysis Toolkit README
- Automated Image Capture: GUI-driven control of cameras and turntable with enhanced error handling.
- Distributed Processing: Optional 3D reconstruction on a dedicated remote server with retry logic.
- Modular Point Cloud Analysis: Tools for extracting traits like height, volume, and leaf angles.
- Configurable Setup: Adaptable parameters with JSON schema validation.
- Enhanced Security: API key management and rate limiting for network operations.
- Robust Networking: Unified network module with connection pooling and automatic retries.
- Comprehensive Testing: Full test suite with pytest for reliability.
PhotoPi comprises four main interacting parts:
- Main System (Control PC): User interface and overall workflow orchestration.
- Raspberry Pi: Hardware interface for cameras and turntable.
- Remote Server: (Optional) For computationally intensive 3D reconstruction.
- Point Cloud Analysis Toolkit: For extracting metrics from 3D models.
A general list of required hardware includes:
- Control PC (Windows, macOS, or Linux)
- Raspberry Pi (e.g., Model 4B)
- Multi-camera setup (e.g., Arducam 64MP Quad-Camera Kit)
- Motorized Turntable & Stepper Motor HAT
- Featureless Background & Lighting
- (Optional) Remote Server for processing.
The following table provides a breakdown of the main components and associated costs for the photogrammetry rig setup:
| Part | Brand | Model | Price | Specs | Description |
|---|---|---|---|---|---|
| Embedded system | Raspberry Pi | Raspberry Pi 4 Model B | $249.99 | Quad-core Cortex-A72, 4GB RAM, 40 pin GPIO header, 2-lane MIPI CSI camera port | Compact, low-cost computer board ideal for embedded applications |
| 4 RGB Cameras | Arducam | 64MP Autofocus Quad-Camera Kit | $199 | WiFi/Bluetooth, Res: 4056 x 3040 px, FOV diagonal: 84° | High-resolution, auto-focus RGB cameras for detailed image capture |
| Featureless Background | Rose Brand | 62" Poly Pro | $15.20 /yard | Fabric, Chroma Key Blue | Wrinkle-resistant fabric providing a uniform backdrop for imaging |
| Stepper Motor | Adafruit | Stepper Motor HAT - mini kit | $27.95 | TB6612 chipset, 4.5VDC to 13.5VDC, unipolar or bipolar | Motor HAT (Hardware Attached on Top) designed for precise motion control with the Raspberry Pi |
| Turntable | Ortery | PhotoCapture 360M | $1,200 | 28.956 and 39.878 cm diameter platforms | Software-controlled rotary table for consistent image capture angles |
| Aluminum Extrusion | Misumi | $950 | Aluminum alloy, Square shape, 40mm main frame and arms size, four side slots | Frame with stationary mounts, angle brackets, nuts and screws | |
| All-Purpose LED Grow Lights | Root Farm | $145 each | 45W per panel, Grow area: 25 cm (10 in) x 55 cm (21.5 in) per panel, Adjustable legs with 360° swivel | Two growing light panels consisting of 3-band LEDs |
Schematic of the modified wiring required to drive the the turntable stepper motor.
- Python 3.8+
- COLMAP (for remote server reconstruction)
- Specific Python package dependencies (see
setup.pyand component READMEs) - pytest (for running tests)
- Clone:
git clone https://github.com/joehrz/PhotoPi.git && cd PhotoPi - Environment:
python -m venv venv && source venv/bin/activate(orvenv\Scripts\activateon Windows) - Install:
pip install -e .[all](for all components)- For component-specific installation, see
setup.pyoptions and linked READMEs.
- For component-specific installation, see
- Raspberry Pi Setup: Run
./deploy_to_pi.sh. - Remote Server Setup: Run
./deploy_to_remote_server.sh. - Configuration: Set up your
.envfile for credentials and review component-specific configurations (e.g.,params.json,config.yaml).
The project is primarily organized within the photopack/ directory:
photopack/main_system/: GUI and control logic for the main PC. (Details)photopack/raspberry_pi/: Scripts for Raspberry Pi hardware control. (Details)photopack/remote_server/: 3D reconstruction pipeline. (Details)photopack/point_cloud_analysis/: Tools for analyzing 3D models. (Details)- Top-level scripts like
deploy_to_pi.shanddeploy_to_remote_server.shassist with setup.
- Launch GUI: Start the Main System GUI (
photopack-main). - Configure & Capture: Set parameters and initiate image capture.
- Reconstruct: Transfer images to the remote server and run the
build.pypipeline. - Analyze: Use
photopack-analyzetools on the generated point cloud.
For detailed operational steps, consult the README file of the respective component linked above.
Run the comprehensive test suite:
python run_tests.pyOr use pytest directly:
pytest -v.envfile (Project Root): Essential for SSH credentials (Pi & Remote Server) and API keys.params.json(Main System): GUI settings, capture parameters with schema validation.config.yaml(Remote Server): COLMAP pipeline settings.scale_values.json&metrics_config.json(Point Cloud Analysis): Scaling factors and CSV output definitions.- Configuration Validation: All JSON configurations are validated against schemas for reliability.
This work includes a dataset of 3D point clouds of wheat generated using the PhotoPi system:
3D Point Clouds of Wheat from RGB-images using Structure from Motion and Low-Cost Photogrammetry
- Authors: Beck, Michael A.; Hrzich, Joe; Bidinosti, Christopher P.; Henry, Christopher J.; Manawasinghe, Kalhari; Tanino, Karen
- DOI: https://doi.org/10.20383/103.01255
- Repository: FRDR-DFDR
- Description: Contains raw RGB images and reconstructed point clouds of 6 different wheat genotypes at two time instances (14 and 35 days after planting), with 10 instances each, for a total of 120 imaging sessions. Each session includes 140 RGB images (4056x3040 pixels) and corresponding 3D point clouds.
If you find our work useful, please cite our paper:
@article{hrzich2025lowcost,
title={A Low-Cost Photogrammetry System for 3D Plant Modeling and Phenotyping},
author={Hrzich, Joe and Beck, Michael A. and Bidinosti, Christopher P. and Henry, Christopher J. and Manawasinghe, Kalhari and Tanino, Karen},
journal={arXiv preprint arXiv:2504.16840},
year={2025},
url={https://doi.org/10.48550/arXiv.2504.16840}
}
@dataset{beck2025wheat,
title={3D Point Clouds of Wheat from RGB-images using Structure from Motion and Low-Cost Photogrammetry},
author={Beck, Michael A. and Hrzich, Joe and Bidinosti, Christopher P. and Henry, Christopher J. and Manawasinghe, Kalhari and Tanino, Karen},
year={2025},
publisher={Federated Research Data Repository},
doi={10.20383/103.01255},
url={https://www.frdr-dfdr.ca/repo/dataset/2e8d36ee-2183-4926-94d1-7323a702e309}
}