## Materials and Methods
### Our Approach
#### 2.2.2 The Pose Estimation Algorithm
In this work, we use the well-known RANSAC feature corresponding algorithm [50] to align the set of discriminative visual features of \(\Phi_{l}\), i.e., the features of the super-pixels, with those of \(l_{j}\). Let the output of the RANSAC algorithm be the corresponding collection of \(r\) tuples:  
\[\Omega_{O_{j}}^{\Phi_{i}}=\left(\mathrm{x}_{a}^{O_{j}},\mathrm{x}_{a}^{\Phi_{i }}\right)_{a=1}^{r} \tag{15}\]  
where \(\mathrm{x}_{a}^{O_{j}}\) (\(\mathrm{x}_{a}^{\Phi_{i}}\)) is a pixel in \(O_{j}\) (\(\Phi_{i}\)). Note that the intrinsic camera parameters of the moving camera should be calibrated in advance in both the modeling and inspection phases. To initially estimate the external camera parameters of \(O_{j}\) with those of the template \(\Phi_{i}\), for each pixel in \(O_{j}\) (\(\Phi_{i}\)), the point set \(\mathrm{P}_{O_{j}}=\left(\mathrm{P}_{a}\right)_{a=1}^{r}\) (\(\mathrm{P}^{\prime}\mathrm{\Phi}_{i}=\left(\mathrm{P}^{\prime}_{a}\right)_{a=1} ^{r}\)) in the world coordinate system is computed using (2) and (4). Next, to register points in \(\mathrm{P}_{O_{j}}\) with those in \(\mathrm{p}^{\prime}\mathrm{\Phi}_{i}\), the ICP algorithm produces the transformation matrix \(\mathrm{M}_{j}^{i}=\left[\mathrm{R}_{j}^{i}\right]\mathrm{t}_{j}^{i}\) in the world coordinate system, where \(\mathrm{R}_{j}^{i}\) and \(\mathrm{t}_{j}^{i}\) are the rotation matrix and the translation vector, respectively. \(\mathrm{M}_{j}^{i}=\left[\mathrm{R}_{j}^{i}\right]\mathrm{t}_{j}^{i}\) is actually the external camera parameters that transform the point cloud \(\mathrm{P}_{O_{j}}\) to point cloud \(\mathrm{p}^{\prime}\mathrm{\Phi}_{i}\) in the world coordinate system. Thus, the fine-tuned external camera parameters of \(O_{j}\) for building up the real 3D point cloud using the depth map of \(O_{j}\) are:  
\[\mathrm{M}_{4\times 4}^{O_{j}}=\mathrm{M}_{j}^{i}\mathrm{M}_{4\times 4}^{\Phi_{i }}=\left[ \begin{array}{cc}\mathrm{R}_{j,3\times 3}^{i}&\mathrm{t}_{j,3}^{i}\\ 0&1\end{array} \right]\left[ \begin{array}{cc}\mathrm{R}_{3\times 3}^{\Phi_{i }}&\mathrm{t}_{3}^{\Phi_{i}}\\ 0&1\end{array} \right] \tag{16}\]  
where \(\mathrm{M}_{4\times 4}^{\Phi_{i}}\) are the external camera parameters of the template \(\Phi_{i}\). The underlying concept of the proposed pose estimation algorithm is based on the assumption that a pair of correspondence pixels of the same visual features in two images would be unprojected to the same point in 3D space. Moreover, errors exist in the coarse estimated depth image and external camera parameters which are eliminated by the transformation matrix \(\mathrm{M}_{j}^{i}\) using the ICP algorithm. The modified point cloud of the input image is then analyzed to generate the super-pixels of the RGB and depth images. Inputting these new versions of super-pixel features into the pose estimation algorithm, the registration error between the current point cloud and the model point cloud  
Figure 6: Model-based estimation of the external camera parameters of an object in a single RGB image. is minimized. To complete the discussion of the pose estimation, we design a method to compute the error by registering the point cloud P of the target model with the current point cloud P\({}_{j}\) of the input image \(I_{j}\). Once again, the RANSAC algorithm is used to establish the 3D super-point correspondence set in terms of the feature vectors of super-points, which are defined in (6). Next, based on the super-point correspondence set, the transformation \(\mathrm{M}_{j}=[\mathrm{R}_{j,3\times 3}]\big{|}\mathrm{f}_{j,3}\big{|}\) between P and P\({}_{j}\) is computed.