A shiny app to define a court reference
Usage
ov_shiny_court_ref(
image_file,
video_file,
t = 60,
existing_ref = NULL,
launch_browser = getOption("shiny.launch.browser", interactive()),
...
)
Arguments
- image_file
string: path to an image file (jpg) containing the court image (not required if
video_file
is supplied)- video_file
string: path to a video file from which to extract the court image (not required if
image_file
is supplied)- t
numeric: the time of the video frame to use as the court image (not required if
image_file
is supplied)- existing_ref
list: (optional) the output from a previous call to
ov_shiny_court_ref()
, which can be edited- launch_browser
logical: if
TRUE
, launch the app in the system browser- ...
: additional parameters (currently ignored)
Examples
if (interactive()) {
## define a court reference from scratch
ov_shiny_court_ref(video_file = ov_example_video(), t = 5)
## or modify an existing one
crt <- data.frame(image_x = c(0.05397063, 0.95402573, 0.75039756, 0.28921230),
image_y = c(0.02129301, 0.02294600, 0.52049712, 0.51884413),
court_x = c(0.5, 3.5, 3.5, 0.5),
court_y = c(0.5, 0.5, 6.5, 6.5))
ref <- list(court_ref = crt, net_height = 2.43)
ov_shiny_court_ref(video_file = ov_example_video(), t = 5, existing_ref = ref)
}