Canopy cover extractor
Canopy Cover by Plot (Percentage of Green Pixels)
- Zongyang Li, Donald Danforth Plant Science Center, St. Louis, MO
- Maxwell Burnette, National Supercomputing Applications, Urbana, Il
- Robert Pless, George Washington University, Washington, DC
This extractor processes binary stereo images and generates values of plot-level percent canopy cover traits that are inserted into the BETYdb trait database.
The core idea for this extractor is a plant-soil segmentation. We apply a threshold to differentiate plant and soil, and do a smoothing after binary processing. From this difference, it returns a plant area ratio within the bounding box.
- Evaluation is triggered whenever a file is added to a dataset
- Following data must be found
- _left.bin image
- _right.bin image
- dataset metadata for the left+right capture dataset; can be attached as Clowder metadata or included as a metadata.json file
- The configured BETYdb instance will have canopy coverage traits inserted
The core idea for this extractor is a plant-soil segmentation. We apply a threshold to differentiate plant and soil, and do a smoothing after binary processing. At last it returns a plant area ratio within the bounding box.
Split image data into R,G,B channel, and make a tmp image.
For each pixel, if G value is T(threshold) higher than R value, make this pixel as foreground, and set the tmp pixel value to 255, so all tmp pixels are 0 or 255.
Use a filter to blur this tmp image,
Threshold the blurred tmp image with a threshold of 128 to get a new mask image that represents our plant (foreground) detections.
Output ratio = foreground pixel count / total pixel count
- G - R Threshold is set to 5 for normal situation.
- Blur image to new mask threshold is set to 128
We believe the tested threshold works well in a normal illumination. Below are three examples of successful segmentation:
At the same time, there are some limitations with the current threshold. Here are some examples:
- Image captured in a low illumination.
- Image captured in a very high illumination.
- In late season, panicle is covering a lot in the image, and leaves is getting yellow.
- Sometimes an unidentified sensor problem results in a blank image.
For more details, see related discussions, including: https://github.com/terraref/reference-data/issues/186#issuecomment-333631648