ETHZ-INS / DLCAnalyzer

R Scripts to analyze deep lab cut point data and related data
GNU General Public License v3.0
60 stars 16 forks source link

CutTrackingData for multiple files #11

Open simonecnascimento opened 2 years ago

simonecnascimento commented 2 years ago

I am analyzing multiple 15min videos, but sometimes the recordings are longer. I know that I could delete (end=X) the final frames, but since the videos do not have the same number of extra frames, I would like to know how I can select the first 9000 frames? I am using the pipeline function below:

pipeline <- function(path){ Tracking <- ReadDLCDataFromCSV(path, fps = 10) Tracking <- CalibrateTrackingData(Tracking, method = "area", in.metric = 46*46, points = c("topleftcorner", "toprightcorner", "bottomrightcorner", "bottomleftcorner")) Tracking <- CleanTrackingData(Tracking, likelihoodcutoff = 0.95) Tracking <- CutTrackingData(Tracking, ????) Tracking <- AddOFTZones(Tracking, scale_center = 0.5, scale_periphery = 0.8, scale_corners = 0.4, points = c("topleftcorner", "toprightcorner", "bottomrightcorner", "bottomleftcorner")) Tracking <- OFTAnalysis(Tracking, movement_cutoff = 5, integration_period = 5, points = "head") return(Tracking) }

lukasvonziegler commented 1 year ago

The Documentation for CutTrackingData (in the R code) highlights different ways of cutting the data. In your case you would use

Tracking <- CutTrackingData(Tracking, keep.frames = c(1:9000))

Best, Lukas