AUTOMATED GENERATION OF HIGH-QUALITY 3D POINT CLOUDS OF ANTLERS USING LOW-COST RANGE CAMERAS

Three-dimensional imaging demonstrates advantages over traditional methods and has already proven feasible for measuring antler growth. However, antlers' velvet-covered surface and irregular structure pose challenges in efficiently obtaining high-quality antler data. Animal data capture using optical imaging devices and point cloud segmentation still require tedious manual work. To obtain 3D data of irregular biological targets like antlers, this paper proposes an automated workflow of high-quality 3D antler point cloud generation using low-cost range cameras. An imaging system of range cameras and one RGB camera is developed for automatic camera triggering and data collection without motion artifacts. The imaging system enables motion detection to ensure data collection occurs without any appreciable animal movement. The antler data are extracted automatically based on a fast k-d tree neighbor search to remove the irrelevant data. Antler point clouds from different cameras captured with various poses are aligned using target-based registration and the normal distribution transformation (NDT). The two-step registration demonstrates precisions of the overall RMSE of 4.8mm for the target-based method and Euclidean fitness score of 10.5mm for the NDT. Complete antler point clouds are generated with a higher density than that of individual frames and improved quality with outliers removed.


INTRODUCTION
Antlers are bony cranial outgrowths of Cervidae animals, including deer, elk, and moose, composed of internal (cartilage and bone) and external components (skin, blood vessels, and nerves; Li, 2012). Unlike other skeletal structures, antlers regenerate annually and reportedly maintain their original form in subsequent years (Goss, 1995). After maturation and shedding in the winter, springtime regeneration of antlers occurs at an explosive rate (up to centimeters per day) during the growing season, a process that is challenging to evaluate and monitor. This unique feature has been broadly noted, and many studies have focused on the underlying mechanism with the goal of realizing limb regeneration in other mammals.
Antlers are widely used in traditional oriental medicine and are reportedly beneficial for humans in boosting immunity and propagating longevity. Numerous studies have demonstrated the pharmacological potentials of antlers for boosting immunity, propagating longevity, and preventing diseases (Kawtikwar et al., 2010). Other medical values including anti-fatigue, antiosteoporosis, anti-bacterial, anti-stress, and anti-oxidation effects have also been investigated for research and commercial uses (Wu et al., 2013). These properties are primarily ascribed to the hairy skin covering the antlers known as velvet.
Antlers are well suited as biomonitors of environmental pollution as containments like lead and fluoride accumulate in the formation of antler bone (Kierdorf and Kierdorf, 2005). Antlers are also viewed as ideal subjects for studying the mechanical properties of boney tissues because they are more resistant to fracture and impact than all known bones (Currey, 2010;Landete-Castillejos et al., 2012). Furthermore, the mineral tissue distribution in antlers has been evaluated to determine the relationship between mechanical properties and mineral composition (Landete-Castillejos et al., 2012).
To fully understand antler "performance", i.e., the measurement of growth and form, is fundamental to all studies of regeneration and healing after injury. Most researchers are currently using traditional manual measurements with tape measures and calipers to acquire antler dimensions. Though these tools are easily accessible, inexpensive, and suitable for some cases, the disadvantages are obvious: (1) Antlers are irregularly shaped with a coronet, shaft, beam, seal, sprouts, and multiple tines (Severinghaus, 1991) as shown in Figure 1. A tapeline can only measure the one-dimensional length. Numerous measurements on a living animal are hence required to fully describe the geometry, which can be tedious and time-consuming. The acquisition of many different Euclidean distances is possible, but data handling and subsequent analysis would be unwieldy.
(2) Manual tape measurement is prone to mistakes and is highly subjective. It can introduce reading errors and other errors such as the selection of reference points for length measurement and location of the endpoints on the rounded edges of antler tines. The antlers feature torsion and curvature and are covered by velvet. The plastic tape measure may not entirely fit the shape of the antler, leading to inaccuracy. The reference point selection may vary for different observers.
One solution is repeated measurement, but this adds more workload for the observers and prolongs the measuring, which can increase the stress the animal experiences. Moreover, measurement errors may propagate due to inaccurate landmarking, which is compounded by changes to landmarks with growth.
(3) Animals must be stationary during the measuring procedure, which can only be realized by live-capturing or drugs. However, live captures are typically costly, involve risks of injury or substantial disturbance to the animals, and are impossible in many situations (Pelletier et al., 2004). Wild animals are sensitive to the environment, and their antlers function as weapons when they feel threatened. It is hard to keep the animals still unless applying an anesthetic or sedative. And the usage of drugs can be costly and cause unnecessary pain or distress for the animals (Rowsell, 1991).
(4) The accumulated manual measurements for long-term projects would be inconvenient to manage or refer to for other antler-related research. Some image-based measuring systems have been designed for antler measurement. Bergeron (2007) created an aluminum frame holding parallel laser pointers and a digital camera to remotely take pictures of horns and calculate horn growth based on the fixed distance between the two laser points. Demarais invented an imagebased antler estimating system to determine an accurate 3D estimate of antler characteristics by statistically manipulating 2D measurements from photographic images and scoring the attributes for comparison (Demarais et al., 2013). Though image-based methods avoid contact measurement and enable fast data collection for digitalized data storage and management, there are several shortcomings: (1) The implementation of this method is much more complicated and time-consuming than manual measurement.
(2) Only limited information in two dimensions can be derived from the collected images. The complex morphology of antlers cannot be fully represented.
(3) Hundreds of score-known specimens are needed to establish the reference database and construct predictive regression equations to estimate 3D measurements from images, which takes great efforts to gather the specimens and conduct the measurements.
Considering both animal welfare and measurement accuracy, noncontact optical imaging methods are advantageous, and the use of a range camera has proven feasible for measuring antler growth velocities (Lichti et al., 2016). During their rapid growth, antlers are covered in dark velvet (hairy skin) that is essentially monochromatic and lacking in texture, so measurement by stereo vision approaches is challenging. Time-of-flight (ToF) range cameras offer advantages since they can rapidly generate a 3D point cloud of an object's surface of interest without any contact or interference with the animals (Lange and Seitz, 2001). The 3D point cloud can fully capture the antlers digitally and can then be analyzed to estimate antler lengths at intervals to estimate growth velocity and to document 3D changes in antler form during and between growing seasons. Meanwhile, the 3D point cloud can be viewed, documented, and compared for long-term projects and can enlarge the antler database for relevant studies. However, obtaining 3D data can be challenging due to uncontrolled animal motion and antler self-occlusion. This paper introduces an automated workflow of 3D antler point cloud obtainment with improved quality and density using multiple low-cost range cameras and an RGB camera.

Time-of-flight camera
The ToF camera is a range imaging system based on the time-offlight principle. TOF cameras illuminate the scene with amplitudemodulated light and obtain distances by measuring the phase shift between the illumination and reflection. Typically, the illumination is pulsed modulation or continuous-wave (CW) modulation from a solid-state laser or a LED. Distance measurement by light pulses can either be achieved by using a fast counter or extrapolating the roundtrip time from a time-gated measurement of the light intensity.
The CW modulation method is more complicated than pulsed modulation. The reflected signal is demodulated by measuring selectively chosen phases of the signal function. Four sampling points per modulation period are selected to calculate the phase shift for each pixel individually by in-pixel photo mixing devices (Hansard, 2013). With the phase shift translated into the distance and direction acquired from pixel positions and camera focal length, the 3D coordinates of the object point in the sensor space frame can be estimated, thus generating the target point cloud.
ToF cameras are more mechanically compact and independent of surface texture than range cameras based on stereo vision or structural light technology. Unlike laser scanning systems, ToF cameras can acquire 3D point clouds at video rates without any scanning mechanism suited for real-time applications. However, two significant factors degrading data quality are motion blur and surface reflectivity. Motion blur exists due to animal movement and the required integration time of the camera. Low surface reflectivity of velvet-covered antler causes low reflected signals back to the camera leading to noisy ranging measurements (Lange and Seitz, 2001).
The Pico Monstar camera by PMD Technologies (Figure 2) was selected for antler measurement thanks to its wide field of view, multiple framerate modes, and affordable price. Its prominent characteristics are shown in Table 1. Four cameras are needed to obtain complete coverage of the reindeer since antlers are self occluding. The light sources from multiple cameras could interfere with one another, which can cause severe biases in the depth measurements. Pico Monstar cameras use a Spread Spectrum Clock (SSC), which permanently shifts the modulation frequencies to minimize the chance that two cameras operate with the same modulation frequency. However, interference may occur with four cameras operating for data collection since the modulation frequencies are randomly chosen. It is possible that different cameras work with the same frequency. Thus, the interference problem needs to be considered in developing the imaging system.

Automated Imaging system development
As mentioned, the major factors degrading data quality include low reflectivity of velvet-covered antler surfaces, animal motion, and camera interference. Preliminary experiments indicated that antler point clouds from range cameras are usually sparsely scattered due to low surface reflectivity and animal motion. ToF cameras require a sufficiently-long integration time to accumulate enough electrical charge and produce depth measurements with higher accuracy. Animal movement during the integration time corrupts the calculated depths, resulting in motion blur. Therefore, it is favorable to collect data when animals are not moving appreciably.
An RGB camera (Figure 3) was hence added to the imaging system to detect animal motion by comparing two consecutive frames of depth images. The image differences of pixel grey values within the range of a chosen threshold denote the stillness of the scene. The range cameras will be triggered once no animal motion is detected, and data collection lasts until the animal moves again. The software accompanying the Pico Monstar camera, Royal Viewer, can trigger the connected cameras, display the data stream, and record frames of the point cloud of the observed scene. Since the triggering function developed for the imaging system is based on motion detection, an external trigger component was also designed. The external trigger kit includes a microprogrammed control unit (MCU; Figure 3) connected to the cameras and operating software. Developed based on the Software Development Kit provided by PMD Technologies, the software can manipulate cameras via signal pulses sent by the MCU.
With four cameras used in the project, the original functions of Royal Viewer to trigger each camera and record a single frame of data every time by clicking the corresponding buttons are tedious and unwieldy. Manual operation on Royale Viewer would also easily fail to capture sufficient and feasible data frames during the limited data capturing period. Besides, interference among multiple cameras may exist when cameras are running simultaneously. The external trigger was designed to overcome these problems so that the four cameras collect data sequentially rather than simultaneously. The interference can be significantly mitigated in this manner without further manual operations. The designed imaging system fulfills the following functions: (1) Detect the connected cameras and identify them; (2) Select different framerate modes; (3) Detect animal motion and trigger cameras in turn when animals are static; (4) Display the depth image and point cloud of the cameras in real-time.

Pixe
The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLIII-B2-2022 XXIV ISPRS Congress (2022 edition), 6-11 June 2022, Nice, France The purpose-built imaging system has substantially facilitated the point cloud capturing and realized automatic animal data collection without further manual control. The RGB camera ensures that data collection occurs only when animals are stationary, and the sequential triggering mechanism of the external trigger can alleviate camera interference and collect sufficient data.

Data collection setup and procedure
Reindeer were involved in this study under veterinary supervision with the Canadian Council on Animal Care authorization. With the approval of the University Animal Care Committee, spatial data collection of reindeer antlers was conducted in a dedicated wildlife holding pen (~3.5 m x 2.5 m) at the Faculty of Veterinary Medicine facilities at the University of Calgary. Four range cameras and the RGB camera were mounted atop the pen walls ( Figure 4). To collect data, the reindeer were led through a passage into the pen during the routine animal care procedure. Data collection lasted a few minutes after the reindeer entered the pen. Multiple frames of 3D data were collected at each instant the animal was judged to be stationary by the motion detection system. Since the imaging system captures data only when reindeer are static and the range cameras stop working whenever reindeer are moving, the duration when reindeer keep static is called a sampling period. The animal may temporarily stop moving and keep stationary for a while several times, and multiple data sampling periods exist in the whole data collection process.

METHODOLOGY
The workflow of the high-quality antler point cloud generation is shown in Figure 5. The segmented antler point clouds with high density and accuracy are desired from the raw data, and the detailed processing methodology is described in the following steps. The basic idea is to merge all the usable data to produce a densified antler point cloud for analysis. After the initial processing of raw data, which includes quality control and antler segmentation, a twostep registration is then performed. The first step aims to register antler data from a set of four ToF cameras collected during the same sampling period to complete the antler dataset. The second registration step aligns the antler data from different sampling periods having different poses.

Quality control of raw data
The imaging system scans the scene and captures data when a reindeer is determined to be stationary. A sampling period is defined as the duration of time when the animal is motionless. The frames of raw data from the scanned scene are theoretically identical for a single sampling period because both the background and the animal are unchanged spatially. However, errors exist due to random noise, multipath error, motion blur, and the mixed pixels in-depth image generation . To enhance data accuracy, all frames collected within the same sampling period are merged together. Each frame is weighted in proportion to data quality, namely, the confidence value provided in the raw depth image. The confidence value reflects the signal-to-noise ratio and is an indicator of the quality of depth calculation. One frame of the scanned scene is compounded for each sampling period with enhanced data quality.

Antler segmentation
Antler point could extraction is automated based on a k-d tree neighborhood search. The k-d tree is a space-splitting data structure for organizing points in k-dimensional space (Bentley, 1979). The animal data collection is followed by the capture of a set of environment data without the presence of any animal. The background data is viewed as the base point cloud (PC). The data including both background and animal points is called the data PC ( Figure 6). A k-d tree is built for the base PC for fast neighbor search. The neighborhood radius is selected to be smaller than the actual height of the reindeer so that the points of the antler won't find the ground points as their neighbors.
Points on the reindeer's lower body have neighbors on the ground of the base PC. The points of the data PC that have no neighbors in the base PC belong to the antler or the reindeer head, as shown in the red circle of the data PC in Figure 6. Other points will be filtered out. After the k-d tree neighbor search, the identified irrelevant data of background points and a large part of the animal body points are deleted. To prune away outliers, the geometric center (GC) of the antler PC is then picked out by calculating the average coordinates of all the antler points. To remove the sparse outliers around the antler PC, as shown in Figure 6, the antler PC is filtered again by deleting the points outsides the GC's neighborhood. The neighborhood's radius is set close to half of the antler size to maintain the complete antler data and remove irrelevant points. The extracted point cloud includes the antler and part of the head.

Two-step registration
Antler PCs are collected during multiple sampling periods. Within the same sampling period, four antler PCs are segmented from the range camera data. Registration is then performed to transform the antler data from the internal coordinate systems of the four range cameras into a common system for each sampling period. A targetbased registration method was applied to estimate the transformation parameters using Horn's method (Horn, 1987). A purpose-built wooden frame with 14 signalized targets (Figure 7) was imaged both with a laser scanner and the range cameras for the registration. The target centers are used as corresponding point pairs, and the laser scanner data provide the reference coordinates. The target-based registration transforms point clouds from different perspectives to reconstruct the antler geometry. Since animals are stationary during a sampling period, the target-based registration solely satisfies the transformation precision.
After the complete antler PC is obtained for each sampling period, the second registration aligns the multiple point clouds from different sampling periods, which have different poses, to generate a very dense and complete dataset for further analysis. The commonly used iterative closest point (ICP) method is not feasible without very close initial alignment. There are not a sufficient number of local features like the branch tips or edges to produce correct matches and facilitate the ICP registration. Figure 7. Wooden frame with targets.
The normal distribution transform (NDT) is employed instead since it does not require feature correspondences to align antler datasets with different poses (Biber and Strasser, 2003). The key element of the NDT is to represent the point cloud using a set of probability density functions (PDFs), assuming that the point cloud is generated from a normal random process. Thus the registration problem lies in mapping one PC onto a surface representation based on PDFs. For two antler point clouds to be aligned, a slave PC is to be aligned to the master PC. The master PC is subdivided into a grid of cells, which are cubes in 3D space. The size of the cubes is based on the shape and density of the point cloud. The chosen cell size should fully represent the local distribution and ensure enough points are inside the cell to construct the PDF. If the cells are too large, small local features may be blurred, reducing registration precision. If the cells are too small, the memory requirement is high, and cells with a low point density may be dominated by data noise. The covariance matrix of the cell will be singular if only three points are contained in the cell, or some points are colinear or coplanar. The following estimation requires the inverted covariance matrix, and such cells will not be used at all. (Magnusson, 2009). The probability density function (PDF) ( ⃗) for surface points ⃗ is computed for each cell based on the distribution of points: where ⃗ and Σ represent the mean vector and covariance matrix, respectively, for the cell in which ⃗ is located ⃗⃗⃗⃗⃗ refers to the positions of the points in the cell. The solution to the alignment problem is to find the transform function ( ⃗, ⃗⃗⃗⃗⃗) that maximizes the likelihood of moving points of slave PC onto the set of PDFs representing the master PC. The likelihood function is given by The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLIII-B2-2022 XXIV ISPRS Congress (2022 edition), 6-11 June 2022, Nice, France The solution can be estimated using Newton's method (Magnusson et al., 2007). The results are scored by the Euclidean fitness, computed as the square root of the sum of squared distances from the transformed slave PC to the closest point in the master PC.

RESULTS AND ANALYSIS
To test the imaging system and proposed methodology, a test of antler data collection was performed in a dedicated indoor laboratory at the University of Calgary. Four tripods upon which the cameras were fixed were placed at the corners of a rectangular area of 2.5m x 3.5m, which are similar dimensions to the animal pen. Fifteen signalized targets were positioned on the floor. An amputated antler was held manually and moved around to mimic a live reindeer within the cordoned-off rectangular area by the yellow tape in Figure 8. Examples of single frames of antler data from four ToF cameras are displayed in Figure 9. The antler point cloud from any camera is incomplete and sparsely scattered. The result of antler segmentation following quality control is shown in Figure 10, in which the raw data is red, and the yellow part is the extracted antler data. Unwanted data (irrelevant points and blunders) were removed after the weighted average and antler segmentation.  The target-based registration results for the same dataset are shown in Figure 11. With antler PCs combined from four range cameras, the antler data are complete and fully display the details than the single frames of data in Figure 10. The registration precision is quantified by the root mean square error (RMSE) from the target centers as corresponding points. For each camera, 7 to 9 pairs of target centers were used in the registration; The ToF camera data were registered to the laser scanner data with an overall RMSE of 4.8mm. All coordinate residuals were smaller than 2cm, and 96.25% did not exceed 1cm. The target-based registration precision was deemed successful because the Pico Monstar camera features a depth resolution at the centimeter level.  Table 2. Target-based registration precision. Figure 11. Target-based registration results from four range cameras from a single sampling period.
The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLIII-B2-2022 XXIV ISPRS Congress (2022 edition), 6-11 June 2022, Nice, France The second-step registration aligns two complete antler point clouds with different poses from two sampling periods for enriched details. Various sizes of the cells were tested for pose alignment, and the results were evaluated by the Euclidean fitness score, as shown in Table 3. The registration precision improves considerably when the cell side length is reduced from 1m to 0.05m. When the cell side length decreases to 0.01m, the registration doesn't converge since the cells do not have enough points to compute an invertible covariance matrix. The optimal result with the cell side length of 0.05m shows that the two point clouds fitted each other smoothly ( Figure 12). The aligned result demonstrates a highly densified antler PC with nearly doubled density compared to the antler distribution from raw. The densified antler PC is vital to 3D modeling and antler size measurements with important details preserved.
Cell side lengths (m) Euclidean fitness score ( Table 3. NDT precision with different cell sizes Figure 12. Aligned antler point cloud from two different sampling periods.

CONCLUSION AND FUTURE WORK
An automated workflow for generating antler point clouds with improved quality and high density has been presented. An imaging system of four ToF cameras and one RGB camera can detect animal motion and automatically capture data of stationary animals.
Antler point cloud extraction is also automated based on a fast k-d tree neighbor search, which is less time-consuming and more accurate. With antler point clouds from four range cameras collected in different sampling periods, a two-step registration is then performed to register the antler data from different perspectives and align antler data with various poses for higher density. The feasibility and efficiency of the imaging system were demonstrated for antler data collection. The success of the processing methodology recommended for antler PC generation was also demonstrated. Manual judgment and operations have been substantially reduced in the proposed workflow.
This paper reported on tests performed in an indoor imaging lab that achieved satisfying results. Future tests with live animals in the wildlife pen are planned, and the 3D modeling of antler PC will be performed to obtain antler growth rate for long-term monitoring. The conversion from the antler PC with irregular shape and diverse morphology to a mathematically presented 3D mesh would be the next challenge to overcome.