if (FALSE) {
# dontrun is to avoid forcing users to install additional dependencies
wd_images_OCR <- system.file("pictures/full_size_for_ocr", package = "camtrapR")
library(magick)
# define geometries
geometry1 <- geometry_area(x_off = 0, y_off = 0, width = 183, height = 37)
geometry2 <- geometry_area(x_off = 196, y_off = 0, width = 200, height = 17)
geometry3 <- geometry_area(x_off = 447, y_off = 0, width = 63, height = 17)
geometry4 <- geometry_area(x_off = 984, y_off = 0, width = 47, height = 17)
geometry5 <- geometry_area(x_off = 0, y_off = 793, width = 320, height = 17)
# combine geometries into list
geometries <- list(date = geometry1,
time = geometry2,
sequence_id = geometry3,
temperature = geometry4,
camera_model = geometry5)
df_image_data <- OCRdataFields(inDir = wd_images_OCR,
geometries = geometries,
invert = TRUE)
df_image_data
# note the mistake in "camera_model"
# it should be "PC850", not "PC8S0O"
# date and time are correct though
}
Run the code above in your browser using DataLab