Abstract
The near-infrared (NIR) camera is extensively used in the optical tracking system for surgical navigation because it can effectively restrain the interference from environmental light in the imaging process. The accuracy of the optical tracking system is determined by camera calibration. However, the existing calibration methods are intended for visible-light cameras and are inapplicable to NIR cameras because the latter has no capacity to capture the calibration pattern. In the study a calibration pattern composed of near-infrared surface-mounted diodes is designed, and the corresponding intelligent algorithm based on geometric information that can be used to calibrate the NIR camera is proposed. Using this method requires the implementation of automatic decision of angular points via triangular gridding. The experimental results show that our proposed method is accurate and effective in meeting the application requirements of surgical navigation.
Keywords
Introduction
Near-infrared (NIR) camera calibration is critical in optical surgical navigation systems, which mainly consist of NIR cameras. Based on a spatial reference, traditional calibration is preferred for practical applications. The spatial reference is called a calibration template or a calibration reference object because its shape, structure, and size are known. Currently, calibration reference objects include a black-and-white checkerboard [1–3], circular points [4, 5], ring patterns [6], and miniature bulbs [7]. Among them, the checkerboard is considered the most accepted calibration reference object owing to its simplicity and precision. For high-precision optical surgical navigation systems, the best option to calibrate NIR cameras is the use of an easy-to-make calibration reference object that facilitates a simple feature extraction [8, 9]. Furthermore, using a plane template to calibrate cameras has been a popular method [10–15]. In this method, the orthogonality of a rotation matrix expresses the relation between mic camera and real-world coordinates. Zhang [16] utilized a special plane calibration template for the image formation at two or more positions within the field of view (FOV) and built a lens distortion model to calibrate the camera. Tsai [17] used a two-step method based on a radial constraint to calibrate the camera. Bacakoglu et al. [18] proposed a three-step method to acquire the intrinsic parameters of the camera. Grammatikopoulos et al. [19] introduced a method based on the mutual orthogonality of three vanishing points; through this method, the intrinsic parameters of the camera can be estimated at a time according to the relation between the points in the calibration images captured at different positions. Cao et al. [20] proposed a method based on the projection of 3D points and visible light; through this method, the intrinsic parameters can be calculated using the geometric information of two stationary 3D points from the images and their shadows on the ground. Most of the methods that may be used for camera calibration are based on the techniques proposed by Zhang [16] and Tsai [17]. In the present study, however, the optical surgical navigation system proposed to measure the accuracy of the calibration result is equipped with a NIR band-pass filter [21–23]. Thus, the calibration template for a black-and-white camera is not suitable for the NIR camera of the system. The limitation can be addressed by designing a template that can calibrate the NIR system. Furthermore, the process of calibrating the camera is generally manual and non-intelligent. For the traditional method, the relative information of the calibration template can be obtained using the mouse to click the four angular points in a particular order. The process is tedious and time consuming. Thus, this paper proposes an intelligent NIR camera calibration method based on geometric information.
Materials and method
Design of the NIR calibration template
NIR cameras can sense an optical band between 780 nm–1100 nm. In other words, NIR cameras can sense a calibration template with a light of this band. Therefore, NIR surface mount diodes (NIR-SMDs) are used as the light source of the calibration template. The specifications of the diodes are as follows: type: IR19-21C-TR8; size of diodes: 1.6 mm×0.8 mm×0.3 mm (length×width ×height); length of the light: 940 nm; and size of the lighting point: 0.3 mm×0.3 mm. With the NIR-SMDs arranged in an N × N array, an NIR calibration template can be created. After the NIR-SMDs have been electrified, NIR camera can sense the N × N calibrating points. Figure 1 shows the design of the NIR calibration template. Given N = 8 for the experiment, the template has 64 calibrating points. The brightness of these points can be adjusted by controlling the external power supply, consequently ensuring a desired lighting state within different distances. With the lighting points achieving appropriate brightness and size, the NIR can acquire a precise calibration result.
Creating the proposed NIR calibration template is simple and economical. As shown in Fig. 1(b), the NIR-SMDs are welded on a printed circuit board (PCB). Their spatial positions cannot be obtained directly; thus, a specific measurement to obtain the 3D coordinates of the NIR calibration template is required. An ordinary stereo tracking system is applied to determine the geometric information or the positions of the calibrating points, namely, the 3D coordinates of the template.
Obtaining the NIR calibration template’s 3D coordinates
A liquid crystal display (LCD) must be initially used to calibrate an accurate common optical tacking system [24] and precisely measure the 3D coordinates of each point in the NIR calibration template to obtain an accurate calibration template for calibrating the NIR camera. The calibration process for normal stereo tracking systems is shown in Fig. 2. A color LCD with a pixel size of 0.264 mm (Dell-E177FPc) is used; the length of the side of each square checkerboard with 50 pixels×50 pixels is 13.200 mm. The calibration template generated by this LCD is more regular and consistent in the 2D coordinates of the corner points compared with the printed calibration template. Before capturing the images of the calibration template and applying it to calibrate the normal stereo tracking system, the shape and size of the checkerboard template generated by the LCD must be set first. Then, the checkerboard template is placed within the effective field. Finally, the focal length and the diaphragm of the imaging device, as well as the brightness and the contrast ratio of the LCD are adjusted. Such adjustment enables intelligent capturing of the clear imaging on the LCD by the stereo tracking system.
After obtaining clear imaging for the imaging device, the imaging system is used to automatically capture and intelligently store the left and right images of the checkerboard template displayed by the LCD. When images are captured, the specifications of the checkerboard template must be within the shooting scope of the stereo tracking system. Specifically, the template should be within the FOV of the left and right cameras, and the captured images of the checkerboard template should be distributed across the entire image region as much as possible and should be located at the center of the image to facilitate the accurate calibration of the stereo tracking system. Furthermore, the images on the checkerboard template must have clear corner points. After capturing some image pairs, the system can be intelligently calibrated. Furthermore, the 3D coordinates of some feature points can be measured with the FOV of the stereo tracking system.
The left and right images of the NIR luminous points in the NIR calibration template are initially captured using the abovementioned calibrated stereo tracking system. The subpixel coordinates of the luminous points are then intelligently extracted using the gray level weighting method. Subsequently, the 3D coordinates of the luminous points are rebuilt by the stereo tracking system. Finally, the images of several groups of luminous points are rotated and translated to the position of a randomly selected group. Furthermore, the average coordinate value of each luminous point in the position of the randomly selected group is calculated to obtain an average template denoted as the NIR calibration template. The process of automatically capturing the calibration template is shown in Fig. 3.
In the process of automatically capturing images, clear imaging within the shooting scope of the stereo tracking system can be achieved, the spot size of each point in the image becomes even, and the gray level can obtain a Gaussian distribution by adjusting the diaphragm of the camera and the adjustable resistance of the NIR light-emitting circuits. After meeting the requirements, the images are automatically captured and intelligently stored in the computer to obtain N (N > 5) sets of image pairs of the NIR calibration template, as shown in Fig. 3. The subpixel coordinate of each luminous point in the image is obtained using the threshold value method. Subsequently, the coordinates of the subpixels on several image sets are inputted into the stereo tracking system to reconstruct the 3D coordinates. As shown in Fig. 3, the 3D coordinates of the luminous points are obtained. The 3D coordinates of a group of 8×8 luminous points in the calibration template are randomly selected as the template, and the other groups of luminous points are created in the same position of the template via translation and rotation. To obtain the N × 64 3D coordinates, the calculation process for capturing the rotation and translation matrix is implemented by supposing that N image sets are captured from different positions with different angles. In this procedure, Q i stands for the collection of 64 3D coordinates under the ith position and Q t is the final calibration template. The solving process of Q t is as follows:
The collection of the 3D coordinates of the NIR marked points at a certain position among N positions is selected randomly and recorded as Q
j
. The collection of the 3D coordinates of the NIR marked points at other positions; Q
i
(i ≠ j), and Q
j
has the following relation:
Formula (1) is then converted into the following matrix representation:
In (2), n = 1, 2, …, 64; R ij is an orthogonal rotation matrix with a size of 3×3; and T ij is a translation vector with a size of 3×1.
Subtracting the mean value of each line of Q i from Q i generates a new collection of 3D coordinates represented by . Similarly, the new corresponding collection of 3D coordinates under the jth angle is . The covariance matrix between and is:
If H = [h11 h12 h13, h21 h22 h23, h31 h32 h33] T, then
The singular value decomposition is applied to the covariance matrix H. Consequently:
The orthogonal rotation matrix and the translation vector between the NIR marked points at any two positions can be obtained using formulas (1–6).
The randomly selected Q j is adopted as the initial template, and through rotation and translation transformation, its N − 1 collections of 3D coordinates are transformed to the position of Q j . A new collection of 3D coordinates, Q m , is obtained by averaging the 3D coordinates of the corresponding points in Q j . Then, the collections of 3D coordinates are transformed to the position of Q m , through which a new template can be obtained. Whether the error between the new template and the initial template meets the set Q Threshold is determined via calculation. If the error fails to meet Q Threshold , the above process should be repeated until the error meets Q Threshold . When the error between the new template and the initial template meets Q Threshold , the new template becomes the NIR calibration template rudiment, which is represented by .
To date, is still under the global coordinate system and relies on the stereo tracking system. In practical calibration, a calibration template irrelevant to the stereo tracking system is required. Therefore, this paper adopts the central point of as the origin O, and two orthogonal straight lines OX and OY across the origin are created to establish the grid coordinate system XOY (i.e., the coordinate system of the calibration template itself). The straight lines OX and OY are individually placed across two points in . Through rotation and translation transformation, is converted to the grid coordinate system to obtain a new calibration template, Q t , which is the NIR calibration template employed to intelligently calibrate the NIR camera.
In using the NIR calibration template to calibrate the NIR cameras, the initial procedure is obtaining the images of the NIR calibration template in different positions. Extracting the sub-pixel coordinates of the feature point is then performed in the images. After obtaining the sub-pixel coordinates of the feature point, the two-dimensional information of the calibration template is required to realize the matching of left and right images, which enables calibration of the cameras. In previous experiments, the two-dimensional information of the calibration template is generally obtained by utilizing the mouse to click on the four angular points in a particular order, a method that requires obtaining the angular points of each image four times. Furthermore, the entire calibration procedure requires the tedious manual clicking for 80 times. In this paper, an intelligent method that extracts angular points based on geometric information is proposed. Using this method requires the implementation of automatic decision of angular points via triangular gridding.
Triangular gridding is performed on the image after obtaining the sub-pixel coordinates of the feature point (see the result in Fig. 4). When designing the calibration template of the near-infrared camera, a start marker is set at the starting point of the 8×8 array of the near-infrared diode. After the triangular gridding of the image, the sum of the angle values of the vertex angles in the triangles with the feature point as its apex is calculated, assuming this sum value is M. As seen in Fig. 4(a), when M < 90°, this point can be judged as the starting marker. After intelligently recognizing the starting marker, this point will be removed and triangular gridding is performed (see the result in Fig. 4(b)). The value of M is calculated again. when M ≈ 90°, this point can be judged as the four angular points; when M ≈ 180°, this point can be judged as located on the edge line; when M ≈ 360°, this point can be judged as located within the 8×8 array. Thus, the starting marker and the four angular points can be extracted.
The four values related to the distances between the starting marker and the four angular points are calculated. According to geometrical information, a one-to-one relationship exists between the point with the maximum distance and the one with the minimum distance for each image. In clockwise order, the point with minimum distance is set as the first angular point, and the point with maximum distance is set as the third angular point. After intelligently confirming the first angular point, calculations are made on the vector angles between the first angular point and the other two angular points. The one with a smaller vector angle is the second angular point, whereas the one with a larger vector angle is the fourth angular point. Performing these calculations for each image can obtain the corresponding two-dimensional information.
Measurement accuracy of the stereo tracking system
An object with a previously known actual distance is used to analyze the measurement accuracy of the stereo tracking system in this paper. The object for measurement comprises two corner points of the LCD checkerboard in the experiment, as shown in Fig. 5. The measuring object between the two corner points has 200 pixels and an actual size of 52.8000 mm.
The measuring object is placed within the field of view of the stereo tracking system. It is captured from different positions and viewing angles to capture the right and left images corresponding to the corner points. The two corner points in the image are determined by clicking on them with a mouse, and the subpixel coordinate of each corner point is then intelligently detected within a 20 pixel × 20 pixel region, with the center as the clicked position. The algorithm in the calibration toolbox of MATLAB for extracting the coordinates of the checkerboard corners can be referred to as the detection algorithm. The corner points in both the right and left images should be clicked in the same sequence because the matching of the corner points in both the right and left images depends on the clicking sequence. This procedure is important to avoid the mismatching of the feature points in the process of reconstructing the 3D coordinates. Furthermore, this procedure ensures a corrective calculation of the 3D coordinates of each corner point. Within the field of view of the stereo tracking system in the experiment, 300 groups of images are captured from different positions with different viewing angles, and 300 values of the distance between two LCD corner points are captured. The database is too large; thus, 14 measured results are randomly selected. These results are shown in Table 1.
The measured values of the two LCD points are listed in the left column and the errors obtained by subtracting the actual value from the measured values are listed in the right column. As shown in Table 1, the measured values are approximately 52.8000 mm, which indicates that the distance measured by the stereo tracking system is close to the actual value. Figure 6 shows the absolute errors between the measured and the actual values of the distance between the two LCD points. In the error distribution, most errors are less than 0.25 mm. The average value of all errors is 0.0796 mm, which is represented by the straight red line in Fig. 6; the relative error is 0.15%. These data indicate that the calibration result of the stereo tracking system is accurate, and the precision of the stereo tracking system is less than 0.1 mm.
Precision of the NIR calibration template
In the experiments, the number of captured images (N) of the NIR calibration template is 18, and all the images are automatically captured in a darkroom to facilitate the extraction of the feature points in the captured images. For the 18 positions with different viewing angles, 64 imaging spots can be found on the left and right images of the NIR calibration template in each position. The intelligent method is performed to automatically obtain the four corners. With a group of images, with I as an example, the following subpixel coordinate matrix (P
l
) of the four corners of the left image I
l
is first generated as follows:
The homography matrix (H
l
) corresponding to P
l
is:
Similarly, the subpixel coordinate matrix (P
r
) of the four corners of the right image I
r
is:
The homography matrix (H
r
) corresponding to P
r
is:
Consequently, the subpixel coordinate of each lighting point in the right image can be calculated. The intelligent method that automatically obtains the four corners should ensure that the four corners of the left image correspond to those of the right image; otherwise, the stereo matching of the lighting points becomes more difficult and results in an incorrect calculation of the subsequent coordinates.
The NIR calibration template with an 8 × 8 array has 64 subpixel coordinates for each image. Table 2 lists 24 subpixel coordinates of the lighting points on the right and left images. In Table 2, m and n represent the row and column, respectively. The coordinates listed in the second column correspond to those listed in the third column.
In the experiment on the automatic capturing of the NIR calibration template, Threshold = 10–6 is assumed. Considering the principle used in solving the template, the collection of 3D coordinates in 18 positions is transformed to grid coordinates via rotation and translation to obtain the new calibration template Q t , which has 64 marked points. As a result, the coordinate value of each mark point is determined. Table 3 lists the coordinates of 24 calibrating points. In Table 3, m and n represent the row and column, respectively. As shown in Table 3, the Z-values of the NIR calibrating points are close to zero in the grid coordinate system. Thus, the captured NIR calibration template can be seen as a plane in particular cases.
A total of 64 coordinate data are obtained in the experiment. The data are displayed in 3D form to show the NIR calibration template (Fig. 7). The black points in Fig. 7 are the virtual representations of the NIR marked points. The Z values of the marked points are relatively small.
The NIR calibration template obtained through the proposed intelligent method is independent of the stereo tracking system and the positions with different viewing angles. Therefore, the coordinate values of its NIR marked points do not change with the changes in the different positions. In any camera system, the subpoints of NIR calibration templates in the imaging system can be regarded as the image points of the virtual marked points in Q t on the camera imaging plane. Therefore, the NIR calibration template can be used for the calibration of the NIR camera. The NIR camera parameters are obtained by establishing the numerical relations between the 2D data of the marked points in Q t and the spots on the image.
During the experiment, the initial template coordinate set can be obtained via the reverse transformation of the final NIR calibration template, Q t . Then, the difference between this initial template set and the source data set can be regarded as the error value during the transformation and can thus represent the transformation error of the NIR calibration template. After several times of transformation, large amounts of error data are generated, which are within the range of –0.1 mm to 0.1 mm and gather around (0,0,0). Consequently, the distribution of the errors is called the cloud of errors. During transformation via rotation and translation, the more the clouds of errors gather around (0,0,0), the smaller the error in obtaining the NIR calibration template. The mean value of these error data is the mean error generated during rotation and translation and is equal to 0.0524 mm. Compared with the calibration modules for industrial use, the NIR calibration template developed in this paper has lower precision. However, concomitant to the high precision of calibration modules for industrial use is the high manufacturing cost. The calibration template presented in this paper has the advantages of simple design and low cost. Compared with a checkerboard on the calibration board, the NIR calibration template has small imaging points for its marked points, and its high gray values concentrate at the center of the lighting points. Unlike the black-and-white checkerboard calibration template, which provides useful information only from black-and-white cross points, the proposed NIR calibration template has higher information content. Li [25] designed a linear-gradient circle template as the reference object for camera calibration. Despite the inherent advantage of the template’s simple design, this linear-gradient circle template is subject to interference from the surrounding light. However, the light-spot features of the marked points in the NIR calibration template presented in this paper can be controlled using an external power supply to reduce the influences from the surrounding light. Given that only a few calibration boards are available for the direct calibration of NIR cameras, the proposed template can be used as the calibration reference for optical surgical navigation system within the permissible errorrange.
Conclusions
The texture of a commonly used calibration template, such as the checkerboard, cannot be captured using NIR cameras. Therefore, the NIR calibration template composed of 64 NIR-SMDs is created in this paper, and an ordinary stereo tracking system is used to measure the spatial positions of the calibrating points. During the intelligent calibration process, a threshold method is employed to extract the 2D information of the NIR calibrating points. The 3D coordinates under different positions are transferred to a uniform position via a series of rotations and translations. Then, these coordinates are transformed into a grid coordinate system to capture the final calibration template to ensure that the special positions of the calibrating points are independent of the stereo tracking system and to improve the precision of the NIR calibration template. The following conclusions are made: The NIR camera calibration template exhibits such advantages as ease of construction and low cost. The NIR camera calibration template has small imaging points for its marked points, and its high gray values concentrate at the center of the lighting points. The template possesses high information content. Automatic decision of angular points can be implemented using the proposed intelligent method. The method simplifies the process of NIR camera calibration.
This research was funded by the State Scholarship Fund under Grant CSC No. 201408440326, the Pearl River S&T Nova Program of Guangzhou under Grant No. 2014J2200049 and No. 201506010035, the Features Innovative Program in Colleges and Universities of Guangdong under Grant No. 2015KTSCX069, the Project of Outstanding Young Teachers’ Training in Colleges and Universities of Guangdong under Grant No. YQ2015091, the Guangdong Provincial Science and Technology Program under Grant No. 2013B090600057 and No. 2014A020215006, the Fundamental Research Funds for the Central Universities under Grant No. 2014ZG003D.
