A Simple Setup to Perform 3D Locomotion Tracking in Zebraﬁsh by Using a Single Camera

: Generally, the measurement of three-dimensional (3D) swimming behavior in zebraﬁsh relies on commercial software or requires sophisticated scripts, and depends on more than two cameras to capture the video. Here, we establish a simple and economic apparatus to detect 3D locomotion in zebraﬁsh, which involves a single camera capture system that records zebraﬁsh movement in a specially designed water tank with a mirror tilted at 45 degrees. The recorded videos are analyzed using idTracker, while spatial positions are calibrated by ImageJ software and 3D trajectories are plotted by Origin 9.1 software. This easy setting allowed scientists to track 3D swimming behavior of multiple zebraﬁsh with low cost and precise spatial position, showing great potential for ﬁsh behavioral research in the future.

Zebrafish is well-known as an ideal experimental animal model in biomedical research, especially in the fields of developmental and genetic studies and drug discovery approaches [1][2][3][4]. It has become widely used within the field of pharmaceutical research and toxicology, in which ideally thousands of chemicals can be screened rapidly in vivo for therapeutic and toxic potential that are related to human disease susceptibility and risk [5]. In addition, zebrafish is also an excellent model for behavioral research because of their consistency and the rational refection of their mental and physical changes to new environments, and a comparable neural circuit system with high vertebrate counterparts [6][7][8]. Therefore, zebrafish has emerged as a promising new organism for research on anxiety due to their robust cortisol stress response, behavioral strain differences, and sensitivity to drug treatments or predators as well as their change in alarm pheromones [9][10][11][12]. There are various models commonly used to assess zebrafish behavior, include shoaling test [13][14][15], social preference [16,17], light-dark box [18][19][20], open-field [21][22][23], and novel tank [24,25] models. Among these models, they required accurate, reliable, and reproducible detection of the subject's spatiotemporal location. Previously, the manual quantification of animal behavior may have suffered systematic errors, leading to data misinterpretation [26]. In contrast, computational video-tracking technologies can record and analyze movements and optimize observation on multiple behavioral endpoints to reduce internal influence [27]. Moreover, another advantage of using the video-tracking approach is its ability to repetitively store, replay, and analyze recorded videos, instead of observing every behavioral endpoint with only human eyes [28,29].
Based on the position of fish, computer-vision tracking can be classified into two-dimensional (2D) and three-dimensional (3D). Even though 2D tracking was feasible to analyze fish behavior, it was still not sufficient to describe their motion behavior precisely. Moreover, not only zebrafish but also other animals such as birds and insects move freely in a 3D space, generating complex behavior and multi-dimensional datasets. While 3D tracking can better reflect the actual behavior of animals, the interest of applying 3D systems to research is growing. 3D trajectory reconstruction is a method for analyzing behavioral research that has been performed in multiple animal models, such as bats, rodents, insects, and primates [30][31][32]. The resolution of 3D behavior studies showed high accuracy and capability to detect subtle behavior alterations that may be neglected in 2D tracking [33]. Several 3D tracking techniques have been developed by using software such as Track3D from Noldus company (http://www.noldus.com/) and ZebraLab 3D from Viewpoint company (http://www. viewpoint.fr/en/home). These software programs have been introduced to zebrafish researchers to study behavior; however, the selling price was expensive and thus unaffordable to most laboratories. Therefore, several open-access software packages compiled by Matlab [33][34][35] or OpenCV scripts have been programed [36,37]. With either commercial or home-made software, two or more cameras were required to capture the movement simultaneously. In addition, to obtain more precise spatial position information, the calibration setting is important to perfectly align the XYZ position of images captured by multiple cameras [29,38]. idTracker is an open source program that is used for collecting motion trajectories by matching the feature on all crossing frames of objects based on appearance analysis [35]. Previously, idTracker was designed for tracking 2D movement. In this study, we explored the potential to use idTracker to process 3D tracking of zebrafish for the first time. In our method, 3D trajectory reconstruction involves two major specifications, including temporal and spatial modeling. Spatial reconstruction visualized zebrafish swimming; a schematic of the apparatus design is shown in Figure 1. The tracks produced by measuring the temporal activity allow us to visualize zebrafish activity during the experimental time ( Figure 2) [39]. Based on the position of fish, computer-vision tracking can be classified into two-dimensional (2D) and three-dimensional (3D). Even though 2D tracking was feasible to analyze fish behavior, it was still not sufficient to describe their motion behavior precisely. Moreover, not only zebrafish but also other animals such as birds and insects move freely in a 3D space, generating complex behavior and multi-dimensional datasets. While 3D tracking can better reflect the actual behavior of animals, the interest of applying 3D systems to research is growing. 3D trajectory reconstruction is a method for analyzing behavioral research that has been performed in multiple animal models, such as bats, rodents, insects, and primates [30][31][32]. The resolution of 3D behavior studies showed high accuracy and capability to detect subtle behavior alterations that may be neglected in 2D tracking [33]. Several 3D tracking techniques have been developed by using software such as Track3D from Noldus company (http://www.noldus.com/) and ZebraLab 3D from Viewpoint company (http://www.viewpoint.fr/en/home). These software programs have been introduced to zebrafish researchers to study behavior; however, the selling price was expensive and thus unaffordable to most laboratories. Therefore, several open-access software packages compiled by Matlab [33][34][35] or OpenCV scripts have been programed [36,37]. With either commercial or home-made software, two or more cameras were required to capture the movement simultaneously. In addition, to obtain more precise spatial position information, the calibration setting is important to perfectly align the XYZ position of images captured by multiple cameras [29,38]. idTracker is an open source program that is used for collecting motion trajectories by matching the feature on all crossing frames of objects based on appearance analysis [35]. Previously, idTracker was designed for tracking 2D movement. In this study, we explored the potential to use idTracker to process 3D tracking of zebrafish for the first time. In our method, 3D trajectory reconstruction involves two major specifications, including temporal and spatial modeling. Spatial reconstruction visualized zebrafish swimming; a schematic of the apparatus design is shown in Figure 1   Zebrafish of the wild type AB strain from Chung Yuan Christian University were used for testing. All animal experiments in this study were performed in accordance with the guidelines issued by the animal ethics committee of Chung Yuan Christian University (Number: CYCU104024, issue date 21 December 2015). Adult zebrafish (six months old) with the same batch of fertilization were used in this study. Maintenance and routine culture for the zebrafish were based on the method described by Avdesh et al. [40]. Videos were captured by a Canon EOS 600D camera with a longrange zoom lens. A zoom lens (EF-S 55-250 mm, Canon) was placed 5 m in front of the water tank ( Figure 1A) to reduce the gap border distraction in the borders of tank ( Figure 1B). The resolution of the video was 1280 × 720 pixels, and frame rate was 50 fps (frames per second) in black-and-white mode. A higher frame rate gives a more accurate tracking result, although it takes a longer time to finish the analysis. An acrylic tank, with a size of 20 × 20 × 20 cm (water level at ~14.5 cm), was covered with non-transparent shields on both the left and right sides to prevent distraction affecting the zebrafish during recording. For each video, six fish with the same gender were put into water tank and recorded for 5 min. Tanks were set up with a custom-designed Light-emitting diode (LED) light platform (by ZGene Biotech Inc., http://www.zgenebio.com/) as a background light source to generate a high contrast video. The LED light color temperature was set at 5500 K. The LED intensity was around 530 lux from the source to the border of the tank, while was around 980 lux in the middle of the tank. A longer mirror (30 × 30 cm) placed at 45° from the top border of the tank was used to reflect all images. The setting of the tank and LED light platform is shown in Figure 1C,D. One the other hand, some important factors regarding the fish that may affect the tracking data need to be considered, such as (1) the gender of the fish (in certain temperatures, male fish swim faster than female fish [41]), (2) the density of the fish [42] (in our case, in a 20 × 20 × 20 cm tank with a water level of ~14.5 cm, 5-10 fish are ideal), and (3) the age of the fish (endurance, sprint performance, and turning frequency may decrease with increased age [43]). The fish also must be adapted to the new environment for at least 15 min before capturing the video in order to reduce anxiety and increase the fish constancy.
For the details of launching our apparatus and settings, idTracker software was installed in a desktop computer with Intel i7-5820K core @ 3.3 GHz and 64 Gb RAM memory. Our method Zebrafish of the wild type AB strain from Chung Yuan Christian University were used for testing. All animal experiments in this study were performed in accordance with the guidelines issued by the animal ethics committee of Chung Yuan Christian University (Number: CYCU104024, issue date 21 December 2015). Adult zebrafish (six months old) with the same batch of fertilization were used in this study. Maintenance and routine culture for the zebrafish were based on the method described by Avdesh et al. [40]. Videos were captured by a Canon EOS 600D camera with a long-range zoom lens. A zoom lens (EF-S 55-250 mm, Canon) was placed 5 m in front of the water tank ( Figure 1A) to reduce the gap border distraction in the borders of tank ( Figure 1B). The resolution of the video was 1280 × 720 pixels, and frame rate was 50 fps (frames per second) in black-and-white mode. A higher frame rate gives a more accurate tracking result, although it takes a longer time to finish the analysis. An acrylic tank, with a size of 20 × 20 × 20 cm (water level at~14.5 cm), was covered with non-transparent shields on both the left and right sides to prevent distraction affecting the zebrafish during recording. For each video, six fish with the same gender were put into water tank and recorded for 5 min. Tanks were set up with a custom-designed Light-emitting diode (LED) light platform (by ZGene Biotech Inc., http://www.zgenebio.com/) as a background light source to generate a high contrast video. The LED light color temperature was set at 5500 K. The LED intensity was around 530 lux from the source to the border of the tank, while was around 980 lux in the middle of the tank. A longer mirror (30 × 30 cm) placed at 45 • from the top border of the tank was used to reflect all images. The setting of the tank and LED light platform is shown in Figure 1C,D. One the other hand, some important factors regarding the fish that may affect the tracking data need to be considered, such as (1) the gender of the fish (in certain temperatures, male fish swim faster than female fish [41]), (2) the density of the fish [42] (in our case, in a 20 × 20 × 20 cm tank with a water level of~14.5 cm, 5-10 fish are ideal), and (3) the age of the fish (endurance, sprint performance, and turning frequency may decrease with increased age [43]). The fish also must be adapted to the new environment for at least 15 min before capturing the video in order to reduce anxiety and increase the fish constancy.
For the details of launching our apparatus and settings, idTracker software was installed in a desktop computer with Intel i7-5820K core @ 3.3 GHz and 64 Gb RAM memory. Our method provided several important endpoints, such as the total traveled distance, average speed, and a traceable path of swimming pattern (see Table S1 for detail). The protocol was listed as follows:
"Number of individuals" must be set to the number of zebrafish used. 3.
Set the "Intensity threshold". For this parameter, the system is going to consider the pixels with a lower intensity than this threshold as the animals (vice versa, if "Invert contrast" is checked). 4.
"Minimum size" of the fish must be determined. The blobs will be rejected if they are smaller than the minimum size entered. 5.
If the sizes of the animals are larger than 2000 pixels, a number higher than 1 must be input in the "Resolution reduction" (the number of pixels will be divided by n 2 , where n is the number in the box). 6.
To activate the background removal option, "Remove background" and click "Comp were selected Bckgrnd" button to compute before the tracking process starts. 7.
If only part of the video will be tracked, the "Interval" box must be selected. 8.
The number of reference frames must be set. A lower number should be chosen for increased speed, and a higher number should be chosen for increased accuracy. 9.
The Region of Interest (ROI) and/or exclude regions can also be adjusted by pressing on the "Include region", "Exclude region", and "Clear" buttons. 10. The number of processors also can be set by filling a number in the "# of processors" box, indicating to how many processors idTracker will be applied ('Inf' means that idTracker will be used for all available processors). 11. Finally, the analysis will be started by pressing the "Start" button. If "S&E" (Save & Exit) button is selected, the program will end without starting the tracking. All tracking parameters can be used later if the "Load previous data" button is selected.
After the analysis is performed, all data will be saved in the same folder with the video and exported to Microsoft Excel to perform statistical analysis. More details about idTracker can be obtained from the website: http://www.idtracker.es/. If the tracking result shows a low level of reliability (less than 70%), it may due to the following reasons. (1) Short duration of the recorded video (and/or the individuals do not move often). (2) The individuals came across very frequently, therefore, fragments between crossings were too short (a less crowded setup is recommended for this case). (3) The illumination was not uniform. (4) The video had low quality or resolution.
For 3D swimming pattern analysis, each video must be analyzed by idTracker twice (top view and side view, respectively) to capture the XY and YZ positions. The Y axis dimension from these two datasets must be compared and aligned before being combined ( Figure 1E). After X, Y, and Z axis data are collected, behavioral endpoints are measured according to previous criteria [44][45][46][47][48]; calculation formulation and data significances are listed in Table S1. For converting pixel dimension into the standardized length dimension, image processing programs are required. In this method, ImageJ [49], an open source image processing software, was used. First, we applied Adobe Photoshop to convert the video frames into layers. Later, the layers can be opened in ImageJ. At the end, we highlighted the known distance area on the layer and pressed "Analyze" → "Set Scale" → fill "Known distance" box, and the scale in pixels/standard length dimension can be acquired. This data analysis process can be done by using either Microsoft Excel or a commercial scientific graphing and statistics software (ex. GraphPad Prism, version 6, La Jolla, CA, USA). The trajectories plot from the data was performed by using powerful data analysis or publication-quality graphing software. In this study, Origin 9.1 from OriginLab (Northampton, MA, USA) was used. The detail protocols on operating 3D tracking and software are available in Supplementary protocol. To evaluate our model, we treated zebrafish with 2% ethanol (EtOH) and used one camera to record the corresponding 3D swimming behavior changes. We used EtOH because it is one of the most prevalent recreational drugs and has been associated with many diseases of the brain and hazardous behavior. Previous studies have revealed that acutely given ethanol has a stimulatory effect on locomotion in fish larvae [50]. Furthermore, increased locomotor activity was also observed upon administration of EtOH in rodents [51]. In our study, six-month-old male adult zebrafish were used as control and treated groups. The fish were left in the tank for 15 min to acclimate and avoid anxiety before videos were taken. We observed that most of the time, the control fish swam in the middle or near top side of the tank (Figure 2A, Table S2 and Video S1). This suggested that the fish showed low level of anxiety after acclimation, which was consistent with the normal average speeds and movement time ratios published in a previous study [52]. On the contrary, in the 2% EtOH-treated group, different swimming behaviors were observed, as fish swam near the bottom side of the tank ( Figure 2B, Table S2 and Video S2). We also found that the average speeds and rapid movement time ratio of zebrafish were significantly increased in the 2% EtOH-treated group ( Figure 3A,B). This unusual behavior may due to acute EtOH effects on a number of motor responses in zebrafish in a dose-dependent manner, which were similar to previous reports [53]. EtOH, which is known for affecting the central nervous system by engaging a large number of molecular and cellular mechanisms, alters complex behavioral patterns and leads to ethanol addiction. Therefore, EtOH also increased the anxiety level in zebrafish, which made the fish stay in the bottom part of the tank ( Figure 3C and Video S2). Alternatively, a previous study also suggested that the decreased distance from bottom could also be due to the sedative effects of ethanol [54]. In addition, the 2% EtOH manipulations affected the erratic movements of the zebrafish, as measured by meandering ( Figure 3D). This group showed a lower level of meandering compared with the control group. This phenomenon is consistent with results showing that EtOH in high concentrations causes small changes in meandering [50]. On the other hand, no significant difference on average angular velocity was detected in both the control and 2% EtOH-treated zebrafish ( Figure 3E). Another study made same conclusion that ethanol showed no effects on average angular velocity in certain concentration [50]. However, we observed that the total distance traveled in the 2% EtOH-treated zebrafish was significantly higher than that of the control group ( Figure 3F). Previous studies demonstrated that when zebrafish were exposed to ethanol, both larvae and adult showed dose-dependent locomotor responses. The intermediate dosage resulted in hyperactivity, and high doses caused hypoactivity and sedation [53,55,56]. Locomotion behavior reflects the general motor aspects of swimming zebrafish and may be decreased depending on the anxiogenic effect of certain chemicals. Taken together, the use of EtOH as a solvent in behavioral assays was not recommended and should be taken into careful consideration in the associated assay.
Finally, we performed comparisons of several 3D swimming tracking tools to highlight the significant improvements of our new protocol (Table S3). Basically, our method (with one mirror) is similar to Zhu and Weng's method (which requires two mirrors) [32] that also uses only one camera to capture 3D images. Other methods need at least two cameras to capture images simultaneously from different axes [46,[57][58][59], which make the operation more difficult and more expensive. In addition, with the application of idTracker, we are able to perform 3D tracking on multiple subjects. This improvement overcame the limitation of most previous tools that are only able to perform 3D tracking on a single object [46,[57][58][59]. In addition, images recording using a 55-250-mm zoom lens can reduce the image distortion and make the spatial position measurement more precisely. This simple setting can significantly reduce the effort needed to perform positional calibration in previous published methods [32,46,[57][58][59]. Furthermore, this setting also has proven its capability to track the movement of multiple~1-cm body length juvenile zebrafish (~45 days old) (Video S3). One limitation of the current method is the low percentage of identities reliability if numerous fish cross each other at certain point quite often. This disadvantage also limits the number of zebrafish that can be used in the present novel tank, even though this difficulty can be overcome by using a larger tank. Whilst 3D movement tracking could be done with a higher number of zebrafish (10 fish) in the current novel tank, the percentage of identities reliability was low (less than 70%). Thus, the authors recommend that the number of fish remains limited in order to obtain a higher percentage of identities reliability and more rapid processes. Recently, several new tools, such as Gaussian Process Latent Variable Models (GPLVMs) [60][61][62][63] and deep Convolutional Neural Networks (CNNs) [64][65][66], have been developed to perform 3D motion tracking on single or multiple markerless objects on a large scale. By utilizing those new methods, it might be possible to improve the reliability and precision of 3D tracking on multiple zebrafish individuals in the future.
was detected in both the control and 2% EtOH-treated zebrafish ( Figure 3E). Another study made same conclusion that ethanol showed no effects on average angular velocity in certain concentration [50]. However, we observed that the total distance traveled in the 2% EtOH-treated zebrafish was significantly higher than that of the control group ( Figure 3F). Previous studies demonstrated that when zebrafish were exposed to ethanol, both larvae and adult showed dose-dependent locomotor responses. The intermediate dosage resulted in hyperactivity, and high doses caused hypoactivity and sedation [53,55,56]. Locomotion behavior reflects the general motor aspects of swimming zebrafish and may be decreased depending on the anxiogenic effect of certain chemicals. Taken together, the use of EtOH as a solvent in behavioral assays was not recommended and should be taken into careful consideration in the associated assay.  In conclusion, we reported a simple setup to perform 3D locomotion tracking in zebrafish by using a single camera, a specially designed water tank, and idTracker software. We believe this simple method will help researchers to perform 3D locomotion tracking in zebrafish or other fish species to study some interesting behaviors such as open field swimming, shoaling, anxiety, fear, and social interaction.