Here’s some work I did with others for a paper led by Martyna Syposz. The paper is open access and available here.
The requirement was to track birds as they moved across each frame of a video of thermal images taken with a modern infrared camera. In the methods this is described as follows: We counted the number of birds in flight in the videos recorded by the thermal camera using the Motion-Based Multiple Object Tracking module in MATLAB (R2017a, MathWorks Inc.), which tracks moving objects in two dimensions. The parameters were set to track objects bigger than 20 pixels and smaller than 4000 pixels, as the module performed well with those parameters upon a visual inspection. This threshold was set to recognise only birds that were 5–85 m from the camera. To validate this method, birds were manually counted in 5-min samples (with a start point generated at random) of each c.1-h video that was run through the software, for a total of 4 h out of the 47 h 28 min of footage. We found that the counts performed by the module and manual counts were highly correlated (Pearson’s Correlation test sample estimates 96.72% ± 0.93%, t238 = 58.791, P < 0.001, Supplementary Fig. S1).
To make this convenient we designed a very simple graphical user interface in MATLAB so that we could quickly view the tracking capability of the software under different user selected parameters. Here’s a very small sample of the software in action: