This script allows to reproduce Figure 5 that shows plant representations at different development stages (one to eight weeks after sowing) for (a) top and (b) side images, and time courses of the number of pixels corresponding to plants extracted from side and top views (c)
The following materials are available at
A folder named Maize whole plant image dataset contains:
Image dataset: image dataset of side and top RGB images of a single plant that can be used in the segmentation pipeline (https://github.com/openalea/eartrack)
Segmented image dataset: output images of the segmentation pipeline
Image analysis features: csv file containing all image analysis features from the image dataset provided above
Plant representations at different developmental stages (one to eight weeks after sowing) for (a) top and (b) side images
#Required R packages
if (!require("EBImage")) install.packages("EBImage")
par(mfrow=c(2,5))
#top images
topimage= list.files("./FIG5/top/")
for(image in topimage){
imageiday = readImage(paste("./FIG5/top/", image,sep=""))
display(imageiday, method='raster')
}
#side images
sideimage= list.files("./FIG5/side/")
for(image in sideimage){
imageiday = readImage(paste("./FIG5/side/", image,sep=""))
display(imageiday, method='raster')
}
This exemple is based on a csv file that contains image analysis features from one single plant
#Load csv file
data_output <- read.csv("./segmentationdata.csv")
knitr::kable(head(data_output))
| datetime | viewtypeid | angle | convex_hull_perimeter | width | convex_hull_area | object_sum_area | height_over_pot | height_under_pot | height | Sowing | Day | DAS |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 14/04/2017 01:06 | 1 | 0 | 219.1609 | 71 | 2231.5 | 1577 | NA | NA | 71 | 96 | 14/04/2017 | 8 |
| 14/04/2017 01:06 | 2 | 0 | 303.7828 | 50 | 3066.0 | 1713 | 138 | 0 | 137 | 96 | 14/04/2017 | 8 |
| 14/04/2017 01:06 | 2 | 330 | 278.4993 | 31 | 1549.0 | 1171 | 134 | 0 | 133 | 96 | 14/04/2017 | 8 |
| 14/04/2017 01:06 | 2 | 300 | 273.5317 | 32 | 2371.5 | 1382 | 131 | 0 | 130 | 96 | 14/04/2017 | 8 |
| 14/04/2017 01:06 | 2 | 270 | 295.2435 | 55 | 3674.5 | 1515 | 132 | 0 | 131 | 96 | 14/04/2017 | 8 |
| 14/04/2017 01:06 | 2 | 240 | 313.4547 | 70 | 4645.5 | 1663 | 133 | 0 | 132 | 96 | 14/04/2017 | 8 |
Time courses of the number of pixels corresponding to plants extracted from side and top views.
par(bg=NA)
plot(object_sum_area/10^3~DAS, type='b', data=data_output[data_output$viewtypeid==1,], las=1, col=2, pch=1, ylab='Pixel number (10^3)', xlab="Days after sowing")
points(object_sum_area/10^3~DAS, type='b', data=data_output[data_output$angle==90,], col=2, pch=0, ylab='', las=1)
legend("topleft", c("Top view","Side 90° view"), pch=c(1,0), col=c(2,2), bty='n')