Assessment of locomotion following exposure of animals to noxious or painful stimuli can offer significant insights into underlying mechanisms of injury and the effectiveness of various treatments. We developed a novel method to track the movement of mice in two dimensions using computer vision and neural network algorithms. By using this system we demonstrated that mice exposed to chlorine (Cl2) gas developed impaired locomotion and increased immobility for up to 9 h postexposure. Postexposure administration of buprenorphine, a common analgesic agent, increased locomotion and decreased immobility times in Cl2- but not air-exposed mice, most likely by decreasing Cl2-induced pain. This method can be adapted to assess the effectiveness of various therapies following exposure to a variety of chemical and behavioral noxious stimuli.
- total distance covered
chlorine (Cl2), is the ninth largest produced chemical by volume in the United States and is widely used for pulp bleaching, pharmaceutical manufacture, and maintenance of pathogen-free swimming pools (23, 27). Human exposures during industrial accidents or acts of terrorism may result in the development of acute lung injury (ALI) necessitating treatment with mechanical ventilation and supplemental oxygen (25, 26). We have shown that mice and rats exposed to 400–600 ppm of Cl2 develop respiratory distress, hypoxemia, airway hyperreactivity, decreased vectorial sodium transport across distal lung epithelia, and non-cardiogenic edema (13, 21, 22, 28, 29). Humans exposed to Cl2 report severe pain in their exposed tissues and airways presumably because of the stimulation of transient receptor potential ankyrin 1 (TRPA1) channels in airway sensory neurons and tissue damage by secondary reactive intermediates (2, 3, 26). Postexposure administration of analgesic agents to those affected by first responders may be of significant benefit. Pain is a key factor in the recognition of the severity of injury in both humans and animals exposed to noxious stimuli (16, 24). Reductions in locomotion and physical inactivity are often observed in animals experiencing pain, and these events may be reversed by the administration of analgesics (16, 24). Currently, a variety of commercial systems are used to assess locomotion changes as a pain-depressed behavior in rodents (5, 7, 8, 11, 17).
The purpose of the present study was to quantify changes in locomotion of mice exposed to sublethal concentrations of Cl2 and subsequently returned to room air, before and following the administration of the opioid analgesic buprenorphine (16). We used the video camera of an iPhone to track the movement of mice in two dimensions before and at various intervals postexposure to Cl2 gas and developed highly efficient algorithms utilizing neural network (NN) theory to compute times of activity and inactivity, total distance covered (TDC), and the mean velocity at 2-min intervals for up to 9 h postexposure. This system represents a low-cost but highly efficient alternative to the commercially available hardware and software packages currently available to study locomotion and can be adapted to a variety of experimental conditions.
MATERIALS AND METHODS
C57BL/6 male mice, weighing 20–25 g, were purchased from Charles River Laboratories (Wilmington, MA). They were housed in groups of three in regular mouse cages (Maxi-Miser #9, floor area of 435.7 cm2, Thoren Caging) under a 12:12-h light/dark cycle, in a temperature controlled environment in the animal facilities of the University of Alabama, and were acclimated for 4 days before experimental procedures. Access to food and water were ad libitum. All procedures described in this manuscript were approved by the University of Alabama at Birmingham IACUC.
Six mice at a time were placed inside a custom-made glass chamber (Specialty Glass) and exposed to 400 ppm Cl2 for 30 min as described previously (21, 29). The Cl2 concentrations in the chamber were monitored with a Cl2 detector (Interscan, model RM34–1000m). After each exposure the chamber was vented with compressed air for 2–3 min and the mice were returned to their cages, breathing room air for up to 9 h. Shortly (5–10 m) after being returned to room air, mice were injected intraperitoneally once with 0.05 mg/kg body wt buprenorphine (Buprenex, Wellness Pharmacy, University of Alabama Hospital, Birmingham, AL; vial concentration 0.3 mg/ml; diluted to 0.005 mg/ml; volume injected 0.01 ml/g) or an equal volume of pyrogen-free normal saline (0.01 ml/g; Hospira, Lake Forest, IL). Their movement in the cage was recorded for 2-min intervals before and at 0.1, 3, 6, and 9 h post-Cl2 exposure. These measurements were repeated with air breathing mice. Peripheral oxygen saturation was assessed periodically with a MouseOx pulse oximeter equipped with a neck collar according to manufacturer instructions (STARR Lifesciences.)
Video capture and acquisition.
Just prior to a recording session (2 m each), one mouse at a time was transferred from its home cage to an identical video capture cage with new bedding (video capture cage). A smartphone (iPhone 4, Apple), capable of capturing high definition video (HD, 720p, 1,280×720 pixels) at 30 frames/s, was mounted on a vertical plane 48 cm above the bottom of the cage. Its optical field included the whole floor area of 435.7 cm2. The video capturing sessions took place before exposure to Cl2, shortly after exposure (within 5 m), and at 3, 6, and 9 h postexposure while the mice were breathing room air. The video capture duration was necessitated by digital storage requirements and reasonable processing analysis times while at the same time allowing us to reach definitive conclusions to the questions posed. Similar recording times have been used in a number of behavioral studies (6). Mice were injected with buprenorphine or saline at the conclusion of the first postexposure video recording session and had time to recover from the injection prior to the next recording. After the video acquisition session, the captured video was transferred to a computer for analysis.
Video transformation and conversions.
Captured video was converted from MOV into AVI format. We identified the bottom of the video capture cage by using video cropping. We also resized the video frames to 160×120 pixels to optimize the processing time with MATLAB (see Video processing with MATLAB). The audio channel was removed to reduce the video size. These tasks were performed using open-source video editing software (Virtual Dub 1.9.11, http://www.virtualdub.org/).
Video processing with MATLAB. We used a series of algorithms, which we developed in MATLAB R2011a (Mathworks, Natick, MA) and gathered under the ARES (Advanced Rodent Effort Sequencer) using our open-source software suite. We used the SIMULINK toolbox of MATLAB to construct the algorithms to obtain the coordinates of the mouse positions over time. By using blob analysis, we visualized the mouse position in each frame by generating a green box surrounding the mouse; a red cross represented its centroid (the geometric center of the body shape after extracting the tail by using computer vision morphometric transformations in MATLAB) and a blue line with a variable length represented its instantaneous velocity vector (Figs. 1 and 2). The algorithm for the blob analysis was based on blob video detection after transforming the video to frame images with intensity color map and applying Otsu's threshold detection to each video frame. Otsu's method determines the threshold by splitting the histogram of the input image so that the variance for each of the pixel groups is minimized (18). The coordinates of the centroid in each video frame were stored in a variable (named simout) for postprocessing. We used a 200 ms temporal resolution for processing and storing the centroids in each frame for optimum resolution and data processing speeds. All algorithms are available as open-source software and can be run within the MATLAB program.
Calculation of TDC.
The Euclidean Distance (ED) covered by the mouse within 200 ms was calculated from two sets of coordinates representing the rodent position in a two dimensional (x,y) plane at the bottom of the cage derived from the centroid. The TDC was the sum of the EDs for 2 min (Fig. 1). We developed another algorithm in MATLAB, part of the ARES software, to extract the EDs and TDCs from the obtained simout variable for each video tracking session. To generate plots of total distance covered by the mouse over a 2-min period, we plotted the centroid coordinates in a 160×120 matrix representing the bottom of the cage. Each point is shown as a colored dot and indicates the mouse instantaneous velocity at this time point (Fig. 3). We also used the TDC values obtained at each time point to construct a plot of the mean TDC of each experimental group (treated with buprenorphine or vehicle) for different times postexposure (Fig. 4A).
NN design and analysis.
Human coders were instructed to define immobility (physical inactivity) events if there was no change of the centroid coordinates within 1 s (the limit of resolution of the human coders). They noted the exact time at which they identified the end or the start of a movement within 12 video clips provided in a shared drive. To conceal the time point of the video capture and the assignment of the mouse in a particular group, the video clips were gathered randomly in a blinded fashion and numbered. The coders provided the first author (A.F.) with notes concerning immobility time frames within the videos they watched. They did not discuss their results with each other. The performance of the NN was validated with confusion matrices and performance plots.
We used the simout variable obtained for each video capture session and extracted the sites labeled as immobile by the human coders. We then pooled signals containing EDs for 200 ms by sequentially appending them and refer to this pooled signal as immobility signal, which was then rearranged to a matrix of five ED values per 1 s. This is because each ED value was logged with a 200-ms resolution, and the resolution of optical recognition of immobility events by the human coders was 1 s.
Construction of the NN.
We used the NN Toolbox in MATLAB R2011a to construct a neural network for pattern recognition. Because we wanted to identify immobility events, we provided the NN with the immobility signal, which had the combined observations of two human coders. Within the immobility signal 70% of the data were used for training and 15% to validate that the network was generalizing and to stop training prior to over-fitting. The last 15% of the data were used as a completely independent test of network generalization.
A two-layer feed-forward network, with sigmoid hidden and output neurons was used, which is a good classifier for pattern recognition problems(9). The architecture of the NN had 5 input neurons, 20 neurons at a hidden intermediate layer, and 2 output neurons related to the immobility status of the time frame processed (1 s). The output was classified as immobile or mobile. The network was trained with a scaled conjugate gradient back-propagation algorithm, which is appropriate for pattern recognition problems (15). The performance of the NN reached a 90.6% overall accuracy for recognizing immobility events as can be seen in the confusion matrix used for validation (Fig. 5A) and achieved its best performance in epoch 45 of training (Fig. 5B).
Using the NN to identify immobility times-ethogram plots.
On the basis of the constructed NN, we designed a MATLAB algorithm that uses as input a tracked sequence of ED values obtained after a video tracking session for one mouse and generates the number of seconds within this video that the animal was immobile (immobility seconds). The algorithm also plots ethograms (events of a tracked behavior over a specific time frame) of mobility or immobility within 2 min of tracked video (Figs. 6 and 7). Currently the MATLAB software suite is required to run the ARES software we developed.
The statistical analysis was performed using Graphpad Prism 5.03 for Microsoft Windows (GraphPad Software, La Jolla, CA). The level of statistical significance was defined as P < 0.05. Normality tests were performed with the Kolmogorov-Smirnov test (Dallal-Wilkinson-Lillie for P value) and, depending on the outcome, data were analyzed with parametric or a nonparametric tests. Values are represented as means ± SE. Statistical significance among group means (saline vs. buprenorphine) for various times for exposure was tested using two-way ANOVA followed by Bonferroni post-test. One-way ANOVA with Bonferroni' s post-test was used to analyze the effect of buprenorphine on the locomotion patterns of mice that were exposed to air instead of Cl2.
The ARES algorithms accomplished the following tasks: 1) tracked the movement of the mouse within its cage (Fig. 2); 2) calculated the TDC within a 2-m period (Fig. 4A); 3) plotted the position of the mouse in a two-dimensional plane (Fig. 3); 4) used an automated NN based system (trained by 2 human coders) for the identification of mobility vs. immobility events (Figs. 6 and 7); and 5) constructed graphs depicting mouse's physical activity via locomotion detection (ethograms of movement or no movement) for each video capture session (Figs. 1 and 7). This technique is based on the calculation of the ED between two serial frames containing the position of the mouse (Fig. 1). The TDC for a 2-m period was calculated by adding the EDs acquired every 200 ms. The centroids of the rodent's position (the geometric center of rodent's shape) were plotted over time in a two-dimensional plane track-path representing the cage bottom (Fig. 3). A NN approach was used to assess whether the mice were moving or remained stationary (immobility and mobility status) and achieved 90.6% overall accuracy in correctly identifying mobility/immobility status of the rodent compared with the pooled decisions of the human coders (Figs. 1 and 5). Thus the ARES suite and MATLAB commands can be used to automatically track events of motion and create ethograms (Figs. 6 and 7).
Mice exposed to Cl2 (400 ppm for 30 min) and returned to room air exhibited depressed locomotion as shown by marked decreases of TDC (Fig. 4A) and increased immobility times (Fig. 7) lasting throughout the duration of our measurements (9 h postexposure). A single injection of buprenorphine shortly on return to room increased TDC (Fig. 4A) and decreased immobility times (Fig. 7). These results indicate that the Cl2-exposed saline-treated mice were more immobile and covered less distance at 6 h compared with the buprenorphine ones, whereas they were almost equally immobile but covering less distance at 9 h. In contrast, injection of buprenorphine in air breathing mice resulted in either no change (up to 6 h) or decreased TDC at 9 h postexposure (Fig. 4B). To highlight the differential effects of buprenorphine in Cl2 and air breathing animals we calculated the difference in TDC at 6 and 9 h compared with 3-h postinjection. These data are shown in Fig. 4C. As can be seen, buprenorphine increased TDC in Cl2 exposed but decreased TDC in air breathing mice.
Buprenorphine is administered routinely to patients with chronic pain. Measurements of peripheral oxygen saturation showed that although mice were hypoxic shortly after exposure to Cl2, they had near normal levels at 6 h and 9 h postexposure (Fig. 8). These data suggest that pain and not hypoxia contributed to decreased locomotion and thus physical inactivity. This difference can also be observed by comparison of the corresponding track paths (Fig. 3, A–D, saline group and E–H, buprenorphine group).
Locomotion studies provide an essential behavioral index in studies of pain-depressed behavioral physiology and injury-severity models. A reduction in locomotion in animal models is often related to either severe pain or injury whereas a reversal in this reduction produced by analgesics can provide critical translational data about the efficacy of potentially analgesic drugs (16, 24).
Currently, there are numerous methods to measure locomotion in rodents (5, 7, 8, 12, 17, 20). Most of these methods rely on expensive equipment, such as custom-made animal cages that differ from their home cage environment, special video capture equipment, and beam crossing sensors. Software packages can be expensive because they are tailored to the specific features of the hardware. Finally, the data obtained from such devices provide a rather limited quantification of the behavior actually taking place, e.g., number of grid or beam crossings.
The novelty of our approach lies in its use of a home cage automated detection approach, a smartphone, and algorithms written in MATLAB, ensuring that locomotion is assessed in an environment (video capture cage) that is identical to its home cage. This is very important because transferring rodents to a new and unfamiliar test environment will drastically alter behavioral patterns (19) and thus introduce significant errors. Additionally, instead of static sensors (infrared or laser beams) we track each mouse continuously with an iPhone camera and a trained NN that identifies events of immobility vs. mobility (physical inactivity vs. activity). Neural networks allow unsupervised tagging of video sessions by computer software trained to distinguish mobility-locomotion vs. immobility events and time of occurrence. It is known for years in the behavioral field that labeling and tagging videos is a time-consuming task that requires trained personnel. In the current implementation of the algorithm, the NN reached a high level of performance (Fig. 5, A and B) and can be used as an artificial intelligence aid to tag videos tracking locomotion of rodent from a top-two-dimension view using our algorithms. The NN acts as an add-on to simplify the process of unsupervised tagging. This automated approach is highly accurate, objective, and highly reproducible.
The speed, frequency, and duration of locomotion have been thought to represent pain-depressed behavior or injury severity (16, 24). By using our method we were able to identify for the first time that inhalation of sublethal concentrations of Cl2 (400 ppm for 30 min), known to result in pain through activation of TRPA1 receptors and tissue injury (2–4, 10, 28) lead to a significant reduction of locomotion and thus induces physical inactivity (Figs. 4 and 7). Postexposure administration of buprenorphine, a common analgesic, led to improved locomotion and fewer events of immobility, compared with Cl2-exposed, vehicle-treated mice. In contrast, in our studies, buprenorphine had either no effect or decreased locomotion (at 9 h postadministration) in air breathing mice. These results indicate that the salutatory effect of buprenorphine on locomotion was most likely attributable to Cl2-induced pain alleviation. In previous studies, investigators reported a transient increase in locomotion in rats and mice within 1 h of buprenorphine administration (1, 11). In addition, Liles and Flecknell (14) found that buprenorphine administration in rats not experiencing pain increased locomotion transiently at 5 h postadministration. However, the authors noted that different results may be expected in animals experiencing pain. Thus buprenorphine administration in Cl2-exposed humans experiencing pain may be of significant value by increasing their locomotion, thus allowing them to move away from the epicenter of Cl2 release. In addition, assessment of locomotion with our method may establish an objective clinical biomarker, which will be useful in assessing the severity of injury and effectiveness of various treatments.
One limitation of our method is the inability of smartphone cameras to film in the dark. Thus it is not possible to assess locomotion at night without additional lighting (which may alter locomotion) or an integrated infrared device. In addition, the short focal distance (f = 3.85 mm) of the iPhone camera lens may introduce optical distortion in the captured images and thus contribute to measurement error of the mouse location. However, all measurements were performed with the same device, mounted at 48 cm above the floor of the cage and focused on the center of the floor. Any systematic errors induced in the measured parameters are the same for every video capture.
In conclusion, we developed an automated system to track rodent locomotion by video recording of their movements with the camera of a smartphone and analyzing the records with NN algorithms. By using this technique we clearly distinguished mobility vs. immobility events and demonstrated that mice exposed to Cl2 in concentrations likely to be encountered in the vicinity of industrial accidents and acts of terrorism develop decreased locomotion even 9 h postexposure. Furthermore, a single injection of buprenorphine, an analgesic commonly prescribed to patients for the management of chronic pain, increased mobility significantly. The algorithms we developed can easily be adapted to assess locomotion in a variety of settings. Thus our novel approach provides an objective way to assess injury severity or treatment efficiency attributable to an intervention in laboratory animals and could be a valuable tool in translational, behavioral physiology, and veterinary applications.
This work was funded by the National Institute of Environmental Health Sciences Grants 5U54ES017218 and 5U01ES015676 to S. Matalon and a European Respiratory Society Fellowship (LTRF58-2010) to S. G. Zarogiannis.
S. Matalon was a consultant for Angion (Long Island, NY). In the past, S. Matalon received research funding from Sepracor, to test the efficacy of BROVANA in the amelioration of Cl2-induced lung injury and attended a research conference sponsored by Sepracor to report the results of these studies.
Author contributions: A.S.F., T.J.N., and S.M. conception and design of research; A.S.F., S.G.Z., and A.R. performed experiments; A.S.F., S.G.Z., and S.M. analyzed data; A.S.F. and S.M. interpreted results of experiments; A.S.F. and S.M. prepared figures; A.S.F., S.G.Z., and S.M. drafted manuscript; A.S.F., S.G.Z., A.R., T.J.N., and S.M. edited and revised manuscript; A.S.F., S.G.Z., A.R., T.J.N., and S.M. approved final version of manuscript.
The authors thank Dr. Asta Jurkuvenaite, Dr. Ahmed Lazrak, and Ms. Solana Fernandez for their contribution on the development of the neural network (coding section) and Ms. Gloria Y. Son for her editorial assistance.
- Copyright © 2012 the American Physiological Society