choose_gcp.RdGCPs are used to georeference images by providing known coordinates for specific points in the image. This functions extracts the pixel coordinates (coded as the origin on the bottom left corner, see below) of the GCPs from the image, and allows the user to input their corresponding geographic coordinates (longitude and latitude).
choose_gcp(image_obj, gcp = NULL, col = "red")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 (currenly this can only be of type .jpg).
(optional) A dataframe of GCPs, containing columns id, x,
y,longitude, latitude. This is used if we want to add additional GCP
to an existing list (usually created by running this function multiple
times).
The colour of the points to be plotted on the image. Default is "red".
A dataframe with the GCPs, including the image coordinates and their corresponding geographic coordinates.
NOTE: There are two conventions on how to define pixel coordinates. In this
function (and more generally throughout crstools), the origin is defined as
the bottom left corner of the image, with x increasing to the right and y
increasing upwards. This is consistent with the convention used in many image
processing libraries. However, some libraries (like OpenCV and GDAL) define
the origin at the top left corner, with y increasing downwards. Be sure to
check which convention your image processing library uses when working with
pixel coordinates.