bemovi processing

If you did not carry on with the analysis, re-load the necessary packages and paths:


# project directory (you create this one yourself) <- "/Users/Frank//Bemovi demo/"

# you also have to provide two folders:
# the first contains the video description
# the second holds the raw videos
video.description.folder <- "0 - video description/"
video.description.file <- "video.description.txt" <- "1 - raw/"

# the following intermediate directories are automatically created <- "2 - particle data/" <- "3 - trajectory data/"
temp.overlay.folder <- "4a - temp overlays/"
overlay.folder <- "4 - overlays/" <- "5 - merged data/"
ijmacs.folder <- "ijmacs/"

# video frame rate (in frames per second)
fps <- 25

# size of a pixel in micrometer
pixel_to_scale <- 1000/240

Process data

For further processing in R, the data has to be loaded from the merged database (Master.RData), which is placed in the


The data is saved under the name as a data.table, for efficient processing of the usually large tables (more than 1,000,000 rows).

Although the video segmentation should be fine-tuned to yield the highest signal-to-noise ratio, a fraction of the identified trajectories may still be artefactual trajectories. To remove these, the filter_data() function selects trajectories based on the minimum net displacement, their duration, the detection frequency and the median step length. <- filter_data(,50,1,0.1,5)$type <- "filtered data"$type <- "raw data"

The following figure shows the effect of the filtering.