Animal Cage Camera


Contents

Overview
Motivation
Operation
Tracking
Webcams
Links

Overview

[11-DEC-23] The Animal Cage Camera (ACC) operates with our Videoarchiver software to provide video that is synchronous with the data acquisition computer clock to within ±50 ms. The ACC is a Power-over-Ethernet (PoE) device that requires only one network cable connection to a PoE switch for power and communication. We place the ACC in a Faraday enclosure, connect it with a shielded network cable to to an network feedthrough at the wall of the enclosure, and then with a shielded or unshielded network cable to a PoE switch. We connect this switch to our data acquisition computer, and so allow the data acquisition computer to download video from the camera.


Figure: Two Animal Cage Cameras, Version A3034B1-A. The A3034B1-A's wide-angle DSL227 lens and IMX219 image sensor provide a full-color, 148-degree diagonal field of view.

The Neuroplayer program makes sure that telemetry recordings are synchronized to ±50 ms with the data acquisition computer clock. Assuming we have both the Videoarchiver and Neuroplayer running on the same computer, the result is synchronization of telemetry and video to within ±100 ms. Our lamp scheduling program allows us to turn on and off the infrared and white lights on a twenty-four hour cycle of our choosing.


Figure: The A3034B1-A Held By a Mobile Phone Mount. Note the hole above the lens, which gives access to the firmware reset switch.

The ACC video recordings are synchronous to ±100 ms with respect to a central data acquisition computer's clock. Commercial webcams provide synchronization of no better than ±60 s per day. We can place the ACC right up against an animal cage wall, from which vantage point we can view and illumnate the entire cage with the ACC lamps and camera. Commercial webcam lenses do not provide the depth of field required to view an entire animal cage from so close to the wall, and when we move them back from the wall, reflections of their their built-in infrared lights obscure our view of the cage, so that we are forced to provide separate illumination from above or the sides. The ACC recordings are compatible with our Neuroplayer, so we can navigate from one location to another in our telemetry recordings and view simultaneous video automatically.

Motivation

When commercial CCTV camera systems record continuous video, they produce a sequence of files on our data acquisition computer, each of which is supposed to span a specified length of time. When we view these files, we find that the length of time spanned by each file is a few seconds longer or shorter than specified. Each file has a name that gives its time of creation, and the difference in creation time from one file to the next differs by a few seconds from length of the video contained in each file. When we start viewing a new file recorded by a CCTV system, we must wait a few seconds before the picture establishes itself. As a result of these problems, we cannot rely upon synchronization between video produced by such systems and recordings obtained form our subcutaneous transmitter system. In practice the two chronologies disagree by tens of seconds, and in a manner that we cannot predict or correct for. Our Animal Cage Camera (ACC) is designed to solve these synchronization and viewing problems, and provide superb image quality in both light and darkness.

Operation

[14-NOV-22] We connect ACCs to a PoE switch, along with our data acquisition computer and our telemetry server. In the diagram below, we see an example of how ACCs and a telemetry system can be set up to operate together.


Figure: Animal Cage Camera and Octal Data Receiver Connections.

The ACC provides video that is synchronous with our subcutaneous transmitter recordings to within ±100 ms over any recording duration. The camera streams its video as separate frames at a fixed rate. These are received by the Videoarchiver process on the video recording computer, where they are assembled and compressed into a video that is synchronous with the local computer clock. Given that the EEG recorded by our subcutaneous transmitters is also synchronized to the local computer clock, the result is EEG and video synchronized to the same clock within a twentieth of a second. In the Neuroplayer Tool, we specify a directory containing the video files, as well as a directory containing the EEG recording files, we can navigate through the EEG recordings and see the synchronous video displayed automatically.

Version Features Image Sensor Lens FOV Video
A3034B1-A Raspberry Pi 3B+, raspivid interface.
Requires unshielded cable to Faraday enclosure
IMX219 DSL227 148° 820 × 616, 20 fps,
H264, crf=23
A3034C1-A Raspberry Pi 3B+, raspivid interface. IMX219 DSL227 148° 820 × 616, 20 fps,
H264, crf=23
A3034C2-A Raspberry Pi 3B+, libcamera interface. IMX219 DSL227 148° 820 × 616, 20 fps,
H264, crf=27
A3034C2-B Raspberry Pi 3B+, libcamera interface. IMX219 DSL215 180° 820 × 616, 20 fps,
H264, crf=27
Table: Versions of the A3034. We have FOV for Field of View, and we specify the diagonal field of view in degrees. Cameras running the libcamera interface provide better color balance.

The image quality we obtain from the ACC is superior to that of low-cost CCTV systems. The ACC lens's depth of field and sharpness of focus, and the superb exposure compensation of its image sensor, provide clear, sharp images of laboratory animals in poorly-lit cages, even when the camera is only ten centimeters from the cage wall or ceiling. By default, we ship the ACC with focal range 40 cm and depth of field 20 cm to infinity. We can adjust the focus for closer or farther viewing by loosening two screws on either side of the lens, rotating the lens, and tightening the screws again.


Figure: DSL227 Images in White (Left) and Infrared (Right) Light.

The ACC provides both white and infrared illumination that we can use to enhance image contrast, take pictures at night, or generate twenty-four hour illumination cycles. In order to view animals at night in infrared light, our lenses must not include an infrared-blocking filter. Without an infrared-blocking (NoIR) filter, the colors we record will be affected by infrared light from any source. The standard ACC does a poor job of recording colors in sunlight, or when its infrared lights mixes with ambient white light. We recommend operating the ACC in white LED or flourescent lighting during the day, and infrared at night. The Videoarchiver's scheduler program allows us to set up twenty-four hour programs of alternating white and infrared illumination.


Figure: Images of Brightly-Colored Object in White LED Light (Left), Infrared LED Light (Center), and White Plus Infrared Light (Right).

The field of view of the ACC lens is such that it will view the entire animal cage form one end, even if we press the lens right up against the wall at one end. When we place an ACC right up against a cage wall, we will see reflections of its white and infrared lights around the periphery of our image, but we still see almost the entire cage in the view between the lights.

 
Figure: Reflections of White Lights in Glass Pane, A3034C2-A Camera. Diagonal field of view is 148°. Left: Glass 0 cm from lens. Right: Glass 5 cm from lens.

When we move the camera five centimeters away from the cage, our reflections appear right in the middle of our view of the cage. Thus it is important for the lens to permit us to move right up to the wall. Our 148° diagonal field of view cameras are designed to illuminate their own cages while viewing from close to the wall.


Video: Latency of the A3034C2. We see movement being propagated through repeated images.

The streaming latency of a video camera is the delay between movement in its field of view and the moment we see that movement displayed. We measure the streaming latency of the ACC by pointing the camera at its own live view and rotating the camera. We now see the same latency repeated multiple times. The streaming latency of the A3034C2-A is roughly 100 ms. The recording latency is the delay between an event occuring in telemetry time and the event occuring in video time. We measure recording latency with the help of Implantable Stimulator-Transponders 9(a href="../IST">ISTs). The recording latency of the ACC is ±50 ms.

Tracking

[16-JAN-23] One use of video recordings is to track the movements of individual animals. We can usually treat animals as blobs in image analysis, and track them with blob-tracking algorithms. When we have more than one animal in a cage, the animals are near-identical in appearance, the animals often vanish beneath obstacles, and often cluster together, video blob tracking fails. But if we have subcutaneous transmitters (SCTs) implanted in our animals, we can use an Animal Location Tracker (ALT) to measure the approximate movements of each animal, compare these approximate movements to those of the blobs produced by blob tracking, and so determine which blob corresponds to which transmitter. We call this application of ALT tracking information disambiguation of video blob tracking. This disambiguation is possible because the ACC videos are well-synchronized with the our SCT telemetry system.

A human being watching video recorded by our ACCs can tell when an animal is moving, sleeping, eating, scratching, or having an epileptic seiure. It is, in principle, possible for us to analyze our ACC recordings and use them to identify such events automatically. We do not provide such analysis software, but there are many groups working on the problem, see here for an example. Our hope is that ACC recordings will soon be able to provide event detection through application of such analysis.

Webcams

[09-JAN-23] We sell the ACC for US$1200 each, with no volume discount. If you can tolerate ±60 s synchronization between telemetry and video, we suggest you instead use a Telemetry-Compatible Webcam (TCW). A TCW is any webcam we have tested for compatibility with our telemetry system. Only power over ethernet (PoE) cameras are compatible with our telemetry system, because we approve only PoE cameras within our Faraday enclosures. But some PoE webcams generate so much noise that they interfere with telemetry reception. In one system, for example, we observed that telemetry reception dropped to 50% when we turned on the webcam infrared lights. To avoid such problems, purchase one of our TCWs and follow the manufacturer's instructions to set up the cameras. Although we guarantee these cameras are compatible with our telemetry system, we do not warranty their performance in any way, nor do we offer assistance in their configuration or use.

Animal Cage Camera (A3034): A high-resolution, power-over-ethernet camera with remote-controlled white and infrared illumination. Synchronization of video and telemetry within ±100 ms..

Videoarchiver Tool: Manual for the Videoarchiver, a LWDAQ Tool, which records video from multiple ACCs in such a way that it may be played back synchronously with EEG and ALT recordings.

Neuroplayer Tool: Manual for the Neuroplayer, a LWDAQ Tool that plays simultaneous video recorded from ACCs, biometric signals recorded from subcutaneous transmitters (SCTs), and activity monitoring recorded by animal location trackers (ALTs).

Videoarchiver Libraries: Archive of libraries for MacOS, Linux, and Windows necessary to run the Videoarchiver in LWDAQ. Download, decompress, and place the Videoarchiver folder next to your LWDAQ folder.

Real-Time System Setup: Watch us put together a telemetry and video recording system in five minutes.

Telemetry Compatible Webcam (TCW): An inexpensive power-over-ethernet camera with infrared illumination that does not interfere with our telemetry system. Synchronization of video and telemetry within ±60 s.

Animal Location Tracker (ALT): A platform of radio-frequency pick-up coils that measures the movement of individual subcutaneous transmitters in a cage above.

Test_21AUG20.zip: Fifty-five 20-s videos with accompanying telemetry from two transmitters mounted on mouse toys.

Test_13JUN19.zip: Four 600-s videos with accompanying telemetry from an animal with an Implantable Sensor with Lamp (ISL). We see the light flashing, and unwanted lamp artifact in the recorded EEG signal, which is perfect for checking synchronization of video.

Test_05JUN18.zip: Ten 60-s videos with accompanying telemetry from four transmitters being handled in a Faraday enclosure.

Video Blob Tracking (VBT): A description of how we analyze video frames to obtain the coordinates of animal-like objects. This link leads to our GitHub repository, where we keep the developing software files.

Parts and Prices: A list of devices and their prices in various quantities.