Skip to content
This repository has been archived by the owner. It is now read-only.

MPIBR/OpenFieldAnalysis

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

OpenFieldAnalysis

Analysis routines for an open field experiment with mice

Description of the experiment

The open field arena was a square enclosure made of plastic, 100.0 x 100.0 x 30.0 cm, with gray walls and gray floor. For the purposes of this report, one inner and one outer zone was defined (see figure below):

  1. Inner zone was a 40 x 40-cm square situated at 30 cm from each wall (the remaining of the field was outer zone 1),

  2. Outer zone was the remaining area of the arena

Zone diagram

The open field was lit by a neon tube that yielded about 180 lux in the center of the field.

Videotracking

All analysis was performed using Matlab R2016a (The MathWorks Inc., MA, USA) and the Image Processing Toolbox.

  • The first image in a recording was thresholded at a luminance level of 0.5 to segment the white floor of the plastic enclosure.
  • The four corner points of the largest binary object where calculated corresponding to the four corners of this area.
  • A transformation matrix was estimated based on the coordinates of the four corners of the enclosure in the image and its known real size in mm.
  • To compensate for misalignements of the camera over the enclosure this affine transformation was applied to all images in a recording.
  • The image was cropped by substracting a border of 5px, discarding residual dark portions of the image due to misalignement.
  • Each frame in the video was then thresholded at a luminance level of 0.5 and inverted.
  • The largest black object in each frame was determined, corresponding to the silouette of the mouse.
  • The centroid of this object was calculated as an estimate for the position of the mouse. This position is based on the warped but not cropped image.

Change the paths of your files and the parameters in the script trackAllFiles.m and run.

Analysis

A recording has to last at least 11min. A 10min interval (1min - 11min) is used for the analysis.

figure_histogram.m generates a simple barplot, showing the fraction of time spent in the inner vs outer area of the arena WT vs MT.

figure_trace.m generate a simple plot, showing the trace of the mouse over time.

Change the paths of your files and the parameters in these scripts and run. Note that the framerate is automatically derived from the video file.

In collaboration with:

Beatriz Alvarez-Castelao beatriz.alvarez-castelao@brain.mpg.de

Belquis Nassim belquis.nassim@brain.mpg.de

About

Analysis routines for open field experiment

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages