| plot_gcp | R Documentation |
GCPs are used to georeference images by providing known coordinates for specific points in the image. This function plots GCPs onto the original map (i.e. using the pixel coordinates of the points on the original image before georeferencing). This can be helpful in thinking about here additional GCPs might be needed to improve the transformation.
plot_gcp(image_obj, gcp, col = "red")
image_obj |
An array representing the image (colour images are generally imported as an array of nx x ny x 3 colour channels), or a file path to the image (currently this can only be of type .jpg). |
gcp |
A dataframe of GCPs, containing at least columns |
col |
The colour of the points to be plotted on the image. Default is "red". |
A plot with the GCPs
# Get the path to an example image included in the package
img_path <- system.file("extdata/europe_map.jpeg", package = "crstools")
# load some previously captured GCPs
gcp_europe <- readRDS(system.file(
"extdata/europe_gcp_georef.RDS",
package = "crstools"
))
# plot
plot_gcp(img_path, gcp = gcp_europe)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.