Tests on laboratory animals often require observation of animal behaviour. Some simple
measurements can be performed manually, however, obtaining information on animal movement
requires different approach. The objective of our project was the development of a computer vision tracking system,
which would be capable of tracking at least one animal during the laboratory
tests.

The problem is well defined. The objective is to track
single animal (although the developed method successfully tracked up to two), during the standard "watermaze" test. In
this test, used mainly in pharmacology for drug testing, a laboratory animal
(rat in this particular case) is placed inside the water basin, approximately 2.5-3 meters in diameter
and approximately 30-40 centimeters deep. Rat will swim for a certain time in the water and try to find glass platform to
climb to.

The output of our system consists of spatio-temporal trajectory of the rat in the coordinate system of a water basin and
several parameters, which are obtained by analyzing the trajectory (trajectory length, time the animal needed to find the platform,

average velocity etc.).

The basin has been painted black, and a camera and lighting source have been placed above. Therefore, with the rat being
white, images with good contrast are available for processing. There is also low possibility that
anything else than a rat will be visible in the scene. Sample input image is
shown below.

Prior to tracking, camera is calibrated in X and Y direction (by specifying the visible length of a
line of known length on the screen) and several regions of interest can be
defined. Simple image processing algorithm was used to obtain animal position.
It involves background subtraction, followed by a low pass image
filtering, thresholding and blob detection. By adding some constraints on rat motion (limited maximum velocity and required
temporal continuity) we managed to filter out most of the noise. Finally, trajectories are smoothed an parameters are
calculated separately for the each region of interest. Acquired data can be
exported to tab-separated text file, which ensures compatibility with popular
spreadsheet applications, such as Microsoft Excel.

Our system is capable of tracking the animal autonomously during the whole test, using inexpensive consumer grade
Motion-JPEG acquisition hardware in real-time at up to 20 frames per second on a Pentium III 500 Mhz equipped
PC. The accuracy of our system is within several centimeters, depending of the image resolution used for tracking.
The screenshots of developed software are shown below (tracker application and
region editor).

This research project is a result of cooperation with Faculty of Medicine at University of Ljubljana.