Open Pi-Image: A low cost-open source plant growth imaging and analysis platform
We have designed and constructed a near infrared image capture system based on a Raspberry Pi computer and PiNoir camera and custom 3D printed parts. This runs an extensible and modular open source software suite we developed called Open Pi Image that controls automated image capture and spawns image analysis. The Pi software can be accessed on any external system (e.g. a laptop) via a web server running on the Pi and the system can be embedded in inaccessible places. Open Pi Image is designed to incorporate new user provided scripts for analysis and can be easily extended and customised.
The Idea
Image capture and analysis is a cornerstone of many aspects of plant science, including the study of developmental morphodynamics, disease and infection processes and phenotyping in genetic screens, and all struggle with similar technical issues in image acquisition and processing.
The significant challenges across the domain are:
Cost – almost all image analysis currently requires propietary hardware and software pipelines from commercial providers at prohibitive capital and maintenance cost.
Self Shading – Controlled growth environments generally have limited space and fixed lighting points, these cause problems with subjects self shading when camera equipment is used within the environment.
Multi-Spectral image capture – different applications benefit from light capture in different parts of the electromagnetic spectrum, e.g luciferase reporter systems, infrared from photochemical quenching.
Image Processing – linear processing with single controller machines (a design often imposed by commercial constraint) limits throughput for large image sets.
Our long term objective is to produce a low capital cost, low maintenance, open source, extensible hardware and software component system that has simple interoperability between components allowing their re-use and re-integration as part of new solutions for different image acquisition and analysis problems. This will stimulate peer-to-peer development of further software and hardware components and seed a larger repository of compatible and reuseable components developed after and outside of our project and laboratories. Our project aim is to develop simple automation solutions for moving cameras _in situ_ to prevent shading of subject plants during image acquisition, to develop automated lighting rigs for high quality image capture and produce software libraries that allow simple and quick setup and control.
The rationale behind this proposal is that low power, cheap computing platforms such as the Raspberry Pi, low cost electonic components and successful open source scientific software, like NumPy and _sci-kit image_ for Python make it possible to develop cheap, functionable and standardised elements that can be combined into image acquisition and analysis rigs and pipelines.
The Team
Prof Alex Webb,
Research Group Leader, Department of Plant Sciences, University of Cambridge
Dr Dan MacLean,
Head of Bioinformatics, The Sainsbury Laboratory, Norwich
Project Outputs
Project Report
Summary of the project's achievements and future plans
Project Proposal
Original proposal and application
Project Resources
Software (‘opimage‘, ‘opimage_interface‘ & ‘opimage_things‘) and Hardware descriptions are available on GitHub
Open Pi-Image: A low cost-open source plant growth imaging and analysis platform
Summary
We have designed and constructed a near infrared image capture system based on a Raspberry Pi computer and PiNoir camera and custom 3D printed parts. This runs an extensible and modular open source software suite we developed called Open Pi Image that controls automated image capture and spawns image analysis. The Pi software can be accessed on any external system (e.g. a laptop) via a web server running on the Pi and the system can be embedded in inaccessible places. Open Pi Image is designed to incorporate new user provided scripts for analysis and can be easily extended and customised.
Report and Outcomes
Open Pi Image went very well according to plan. We successfully created open source Python software to allow a novice user to setup and run a Raspberry Pi/PiNoir Infrared Camera time lapse image capture system.
Software: We produced three base packages ‘opimage‘, ‘opimage_interface‘ and ‘opimage_things‘. ‘opimage’ is the central package containing the image analysis and statistical segmentation algorithm code, ‘opimage_things’ is a sub-package that controls external devices e.g the PiNoir camera on the Pi or motors for automating sample movement etc and ‘opimage_interface’ is a second sub-package that defines the web-interfaces through which modules and tools using the first two packages can be run. These are all installable easily through Python’s package manager in single line commands, source code is available at GitHub .
Currently, ‘opimage_interface’ has an interface that allows timelapse jobs to be setup and run through a graphical web interface. ‘opimage_analysis’ has methods that assist the segmentation of images of sideways photographed seedlings grown on vertical agar plates. The package is easy to extend to include new algorithms and methods. ‘opimage_things’ has methods for controlling camera devices on the Pi’s camera connection port and ‘opimage_interfaces’ presents a web interface for defining time-lapse photography regimes, these are also extendable.
We created an installer that allows the whole package to be installed onto the hardware with a single command-line invocation.
Hardware: We created a specification for a standalone Raspberry Pi unit with a PiNoir camera that uses two WiFi dongles, one to connect to the Internet, one to broadcast its own WiFi channel and serve webpages that show the interfaces that run the tools. This allows the Raspberry Pi and camera equipment to be located in difficult to reach places and accessed without a physical connection.
We have produced models for 3D printing of camera stands for the Pi Cameras.
Live tests: Our complete package from download to captured image analysis has been tested from start to end in a production pipeline in the Webb lab and we are now confident the tools can be released for use by others.
On-line instructions: Full step-by-step instructions on setting up and installing the tools are available at github.
Follow On Plans
We will finish the project by writing blog posts explaining the science behind using IR images and the advantages it has for plant analysis, and on how to convert and extract IR enriched signal from captured images.