This tool aims to automate the length measurement of plant roots on images. It is based on OpenCV 4.
Warning
The results of the current implementation need more validation. Do not trust the current results!
Requirements: OpenCV needs to be installed (https://opencv.org/releases/).
Run make
in the terminal in this directory.
call this program with a path to an image (e.g. JPG, TIFF, PNG) to analyze as command line argument.
./rootDetection path/to/img.jpg
It will open a window to pick a reference length of ten millimeters. One moves the reference points via the cursor keys and accepts the first as well as the second reference marker with 'Enter'.
Then, the image is opened twice. The black and white image shows the threshold, used for the current measurement and the colored image shows the input image with overlays for the detected roots, together with their estimated length.
For better readability, the colors of the overlays can be changed from monochromatic green to a palette of different colors with the key 'c'
The application can be controlled via the keyboard.
Key | Function |
---|---|
↑/↓/←/→ | Move reference marker around |
↵ | Set marker |
Key | Function |
---|---|
↑ | Decrease threshold by ten |
↓ | Increase threshold by ten |
← | Decrease threshold by one |
→ | Increase threshold by one |
+ | Zoom in |
- | Zoom out |
w/a/s/d | Move around in zoomed view |
c | Switch color mode |
ESC/↵ | Quit application |