View source: R/boxes_to_spatial_polygons.R
boxes_to_spatial_polygons | R Documentation |
Convert xml crown annotations into projected bounding boxes. In order to plot the annotations, they need to be projected and overlayed on RGB boxes
boxes_to_spatial_polygons(boxes, raster_object, project_boxes = TRUE)
boxes |
A data frame with xmin, xmax, ymin, ymax columns. Each row is a crown bounding box. |
raster_object |
A RGB raster to overlay annotations |
project_boxes |
Whether boxes need to be projected to utm from image coordinates (origin 0,0 top left) |
SpatialPolygons object of annotations
xml<-get_data("SJER_052","annotations")
annotations<-xml_parse(xml)
rgb_path<-get_data("SJER_052","rgb")
rgb<-raster::stack(rgb_path)
ground_truth <- boxes_to_spatial_polygons(annotations,rgb)
plot(ground_truth)
s
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.