Take a video of a mouse moving around in an experimental environment and quantify where it spent time and how much it moved.
Requirements
Video - Has to be recorded from a stationary point and contain at least 1
second without the animal (ask me about circumventing this
requirement). The format of the video (avi, mpg, etc.) does not matter.
The area to be analyzed can be cropped to a rectangle by the script.
Matlab - The analysis is performed in matlab using a set of scripts from the claffey_matlab library.
ffmpeg - The video is sliced up into images to be analyzed by a free
command line program called ffmpeg. This has to be installed and working
on your system.
Overview
1. Start matlab and open the script
2. File: Select the file to be analyzed
3. Background: Specify the time in the video to use for the background calibration
4. Regions: If you want to produce analysis that details where the
mouse was relative to certain regions, you are then prompted to
highlight those regions in the background image. Even if you do not
specify regions, the x/y coordinates and amount of movement by time are
still available.
5. Analyze: Specify the time in the video to analyze (e.g. from
2min 37seconds to 5min 37seconds). The bulk of the processing happens in
this step.
6. Review: A GUI allows you to view the results of the object tracking with time lapsed.
7. Export: The data is available:
in an HTML report
in the clipboard so that it can be pasted into an application such as Excel
in its complete form as a matlab data file
in a exported time lapsed video file (AVI) showing the object tracking