check_camera_drift: Generates diagnostic table assessing drift of HD CBASS...

View source: R/check_camera_drift.R

check_camera_driftR Documentation

Generates diagnostic table assessing drift of HD CBASS cameras

Description

Generates diagnostic table assessing drift of HD CBASS cameras. Outputs: Transect - Name of Transect st_time - Start time of transect end_time- End time of transect Vid_drift - Estimated drift between video and real time in seconds (calculated as video duration - transect duration. Negative indicates that the video is shorter than the true time of the transect.) fps_mosaic - fps at which video was mosaiced fps_rec - fps at which frames were recorded i & j - counters for loops (useful for debugging) table_issue - Lets you know if there were any issues detected with the camera table n_frames_diff - Number of frames recorded in table minus number of images in picture directory correction_factor - If substantial vid_drift you can multiply time in video by this to get real time into the transect transect_dur_mins - Duration of transect in minutes vid_dur_mins - Duration of videos in minutes n_frames - number of frames in video (images of size zero at the end of transect are not counted as frames) max_frame_diff - The value with the maximum magnitude of time difference between two subsequent frames in seconds table_path - path where camera table was read from

Usage

check_camera_drift(
  CBASS_dir,
  camera_folder_name = "blackfly",
  table_name = "",
  vid_length = 1,
  has_colnames = TRUE,
  fixed_tables_dir = NULL,
  fixed_tables = NULL,
  max_diff_thresh = 2,
  Media_Info_Path =
    "C:/Users/socce/OneDrive - University of South Florida/ODB_Documents/Grad School/Software/Media_Info/MediaInfo.exe"
)

Arguments

CBASS_dir

directory of CBASS files

camera_folder_name

name of camera folder (e.g. "blackfly," "colorfly," "avt")

table_name

name of camera tables (e.g. "blackfly.tsv")

vid_length

length of video files in minutes

has_colnames

Logical specifying whether camera tables hav column names

fixed_tables_dir

Dataframe of fixed tables with first column as transect directory and second column as the name of the sub_directory (Use if some tables broken and you want to rerun with these tables)

fixed_tables

name of fixed tables (e.g "blackfly_fixed.tsv")

max_diff_thresh

Threshold in seconds for magnitude of difference in seconds between subsequent frames to replace correction factor for Vid_drift with NA

Media_Info_Path

Path to Media Info program


ailich/mytools documentation built on Jan. 7, 2023, 11:16 a.m.