This function is used to define the reference points on a court image, to be used with ov_transform_points().
The court coordinate system is that used in datavolley::dv_court(), datavolley::ggcourt(), and related functions.
Try plot(c(0, 4), c(0, 7), type = "n", asp = 1); datavolley::dv_court() or ggplot2::ggplot() + datavolley::ggcourt() + ggplot2::theme_bw() for a visual depiction.
Arguments
- image_file
string: path to an image file (jpg) containing the court image (not required if
video_fileis supplied)- video_file
string: path to a video file from which to extract the court image (not required if
image_fileis supplied)- t
numeric: the time of the video frame to use as the court image (not required if
image_fileis supplied)- type
string: currently only "corners"
Examples
if (interactive()) {
crt <- ov_get_court_ref(image_file = system.file("extdata/2019_03_01-KATS-BEDS-court.jpg",
package = "ovideo"))
}
