Pool & room

Cameras, frame rate and seeing the whole pool

The camera is your most patient observer. Give it a clear view.

Every measure you report is only as good as the video it came from. A camera that can't see the whole pool, or that drops frames, quietly changes path length and speed. Here's how to set it up so you can trust the numbers.

Questions people ask

Will the camera see my whole pool or maze?

The whole tracking area should almost fill the camera image. Before you buy a pool, check that your ceiling height and lens can fit it in. If not, contact HVS. Your local ethics committee, licence conditions and vet always take precedence.

More detail

HVS: the tracking area should almost fill the view top to bottom or left to right; test lenses on a tripod at the same distance first [HVS]. All sides must be in view [Nunez 2008].

Going deeper

Illustrative: a 60° lens sees a width of about 1.15 × its height above the water, so a 2 m pool needs at least about 1.75 m plus a margin.

Sources: Nunez (2008). Morris Water Maze Experiment. Journal of Visualized Experiments (19). doi:10.3791/897

Related: How should the camera be positioned? · Can I use my own webcam instead of the HVS camera?

How should the camera be positioned?

Position the camera so the pool or maze almost fills the picture. 1) Adjust height or lens until the arena nearly fills the view. 2) Keep camera settings the same for the whole experiment. 3) If the pool will not fit, contact HVS via the Support button or contact page.

More detail

Position the camera so the tracking area is as large as possible, almost filling the view top to bottom or left to right. With the HVS Image LabCam, test lenses by pointing the camera at a wall the same distance away as the maze surface. Keep camera settings constant throughout the experiment. If the pool cannot fit in the image, contact HVS via the Support button or contact page.

Going deeper

Changing camera settings mid-experiment breaks consistency with the calibration, so set up and test with dummy trials before live trials.

Related: Will the camera see my whole pool or maze? · Why do I see the laptop's built-in webcam instead of my tracking camera?

How do I choose a lens and set up the LabCam or a third-party camera?

Choose the lens that focuses at your mounting distance and makes the arena nearly fill the image; then keep camera settings fixed for the whole experiment. 1) Test lenses on a tripod pointing at a wall the same distance away. 2) For a webcam, close HVS Image, use the camera's own software to focus, then turn auto-focus off. 3) Set anti-flicker to your mains frequency. 4) Note your settings.

More detail

With the LabCam, fix the camera on a tripod aimed at a wall the same distance away as the maze surface will be, and try lenses until one focuses correctly and the tracking area almost fills the calibration window. Keep the same camera settings throughout an experiment; changing them (like changing lighting) could invalidate data, so note them in case the camera is unplugged. With a third-party camera, exit HVS Image first (only one program can use the camera at a time), open the camera's software (for example Logitech: Quick Capture, Video, Controls), let auto-focus focus on the arena, then untick auto-focus so it holds; untick face-following and auto-light features; use brightness and contrast only after optimising lab lighting; match anti-flicker to your mains frequency. Repeat for each camera in 3D tracking.

Going deeper

A slightly blurred focus can help when tracking dark animals on a white open field, because droppings and tails fade lighter than the body. For the LabCam with manual rings: measure lens-to-floor distance, focus on a mouse-sized object at that distance, tighten the adjuster screws, and keep the aperture ring open. A black image with a third-party webcam is often its own software holding the camera; close it. If your tracking area does not fit, contact HVS.

Related: Can I use my own webcam instead of the HVS camera? · How should the camera be positioned?

What frame rate should I use for tracking?

25–30 fps is plenty for path, latency and zone measures. Keep the same frame rate, resolution and settings for every animal in a study. Your local ethics committee, licence conditions and vet always take precedence.

More detail

HVS Image samples at up to 60 Hz and smooths to one position per 100 ms for its measures [HVS]. Keep camera settings constant throughout [HVS]. Smoothing is needed because tracking noise distorts distance and speed [Hen 2004].

Going deeper

Illustrative: at 20 cm/s, 25 fps means 0.8 cm per frame. Latency resolution is 40 ms, which is negligible for 10–120 s trials.

Sources: doi:10.1016/j.jneumeth.2003.10.013

Related: Why does path length or speed change with frame rate? · What is the Nyquist frequency and why does it matter?

Why does path length or speed change with frame rate?

Low rates cut corners on tight turns (path too short); high rates add jitter (path too long) unless the data are smoothed. This is why HVS smooths positions to 100 ms. Your local ethics committee, licence conditions and vet always take precedence.

More detail

Path length is the distance travelled, added up between successive tracked positions, and speed is that distance divided by time, so both depend on how often positions are sampled. Low frame rates cut corners on tight turns and under-read the path; high frame rates add positional jitter that over-reads it. Tracking features are sensitive to noise and need smoothing [Hen 2004]; HVS smooths to 100 ms [HVS].

Going deeper

Illustrative simulation: 0.2 cm jitter added about 1%, 7% and 44% to a 100 cm path at 10, 25 and 60 Hz unsmoothed; 100 ms averaging restored it. A 2 cm-radius turn is under-read by about 16% at 5 Hz and under 1% at 25 Hz.

Sources: doi:10.1016/j.jneumeth.2003.10.013

Related: What frame rate should I use for tracking? · Why use path efficiency ratio rather than path length?

What is the Nyquist frequency and why does it matter?

To capture a movement, you must sample more than twice as fast as it happens. At 25 fps the limit is 12.5 Hz: fine for walking and swimming paths, but not for whisking or tremor. Your local ethics committee, licence conditions and vet always take precedence.

More detail

The Nyquist frequency is half the sampling rate: the fastest movement that a recording can capture, so to record a movement you must sample at more than twice its frequency. Sampling theorem [Nyquist 1928; Shannon 1949]. Exploratory whisking is 5–15 Hz and foveal whisking 15–25 Hz [Berg & Kleinfeld 2003], so it needs at least 50 fps in theory and high-speed video in practice.

Going deeper

Rule of thumb: sample at 5–10 times the fastest movement of interest. Aliasing cannot be removed after recording. Smoothing is a low-pass filter: a 100 ms window suppresses movements at about 10 Hz and above.

Sources: doi:10.1109/T-AIEE.1928.5055024; doi:10.1109/JRPROC.1949.232969; doi:10.1152/jn.00600.2002

Related: How many pixels do I need per centimetre? · My video pulses or shows rolling bands. What is happening?

My video pulses or shows rolling bands. What is happening?

Your lights are flickering at a rate that beats with the camera's frame rate. Set the camera's anti-flicker setting to your mains frequency (50 Hz in the UK) and use flicker-free lights. Your local ethics committee, licence conditions and vet always take precedence.

More detail

Set anti-flicker to your mains frequency [HVS]. LED current modulation is the subject of IEEE 1789 [IEEE 2015]. Lamps on 50 Hz mains flicker at 100 Hz.

Going deeper

The beat between flicker and frame rate is temporal aliasing [Shannon 1949]. Check a recorded video before you start.

Sources: doi:10.1109/IEEESTD.2015.7118618; doi:10.1109/JRPROC.1949.232969

Related: What is the Nyquist frequency and why does it matter? · How many pixels do I need per centimetre?

How many pixels do I need per centimetre?

Make the arena almost fill the image. For centre-point tracking of a mouse or rat, a standard 640-pixel image across the pool is usually enough. Avoid fine stripes or mesh in view, which can cause moiré. Your local ethics committee, licence conditions and vet always take precedence.

More detail

There is no fixed minimum, but the more camera pixels cover each centimetre of the arena, the more precisely position and path are measured. Tracking area should almost fill the view [HVS]. So place and zoom the camera so the tracking area almost fills the image, and keep the animal at least several pixels across.

Going deeper

Illustrative: 640 px across 130 cm is about 4.9 px/cm (2 mm per pixel). A mouse spans about 40–50 px, but a 5 mm paw only 2–3 px, so it is not reliably resolved.

Related: What is the Nyquist frequency and why does it matter? · My video pulses or shows rolling bands. What is happening?

Camera placement and calibration go together; see Morris water maze calibration.

Spotted a mistake, or know a better source? Tell us and we'll fix it and say so on our corrections page.