View source: R/transformation.R
ov_get_court_ref | R Documentation |
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.
ov_get_court_ref(image_file, video_file, t = 60, type = "corners")
image_file |
string: path to an image file (jpg) containing the court image (not required if |
video_file |
string: path to a video file from which to extract the court image (not required if |
t |
numeric: the time of the video frame to use as the court image (not required if |
type |
string: currently only "corners" |
A data.frame containing the reference information
ov_transform_points()
, datavolley::dv_court()
, datavolley::ggcourt()
if (interactive()) {
crt <- ov_get_court_ref(image_file = system.file("extdata/2019_03_01-KATS-BEDS-court.jpg",
package = "ovideo"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.