if(interactive()){
library(pliman)
flax <- image_pliman("flax_leaves.jpg", plot =TRUE)
res <-
analyze_objects_shp(flax,
nrow = 3,
ncol = 1,
watershed = FALSE,
index = "R/(G/B)",
plot = FALSE)
plot(res$final_image_mask)
plot(res$shapefiles)
# distance from each leave within each row
result <- object_map(res)
result$distances
result$cvs
result$means
}
Run the code above in your browser using DataLab