## 3 Materials and Methods
### 6 DOF Pose Tracking Module
Then, taking into account the work of [17] and assuming that the pixels are independent of each other, the resolution of the 6 DOF pose tracking problem is based on the minimization of the following energy function with respect to the pose parameters \(\xi\):  
\[E(\xi)=-\sum_{\mathbf{x}\in\Omega}\log(H_{e}(\phi(\mathbf{x}))P_{f}(\mathbf{x })+(1-H_{e}(\phi(\mathbf{x}))P_{b}(\mathbf{x})), \tag{8}\]  
where \(H_{e}\) is the smoothed Heaviside function, and \(P_{f}\) and \(P_{g}\) are the posterior probabilities of each pixel belonging to the foreground or background, respectively, such that:  
\[P_{m}(\mathbf{x})=\frac{P(\mathbf{y}|M_{m})}{\tau_{f}P(\mathbf{y}|M_{f})+\tau _{b}P(\mathbf{y}|M_{b})}\quad m\in\{b,f\}, \tag{9}\]  
\(\tau_{f}\) and \(\tau_{g}\) being the respective areas of \(\Omega_{f}\) and \(\Omega_{g}\). To make the object pose method more robust against cluttered backgrounds and dynamic changes in the appearance of the scene, the appearance is analyzed only locally in \(N_{p}\) regions, \(\{\Omega_{h}\}_{n=1}^{N_{p}}\), selected randomly around the object's contour. Specifically, the color histogram is analyzed in each region of the image \(\Omega_{n}:=\{\mathbf{x}\text{ with }|\mathbf{x}-\mathbf{x}_{n}|<r\}\), where \(\mathbf{x}_{n}\) is a pixel that belongs to the contour. In this way, each \(\Omega_{n}\) is divided  
where  
\[\overline{P}_{m}(\mathbf{x})=\frac{1}{\sum_{i=1}^{N_{p}}B_{i}(\mathbf{x})}\sum_{i= 1}^{N_{p}}P_{m_{i}}(\mathbf{x})B_{i}(\mathbf{x})\quad m\in\{b,f\} \tag{11}\]  
and  
\[B_{i}(\mathbf{x})=\left\{ \begin{array}{cc}1&\forall\mathbf{x}\in\Omega_{i}\\ 0&\forall\mathbf{x}\
ot\in\Omega_{i}\end{array} \right. \tag{12}\]  
To solve this non-linear optimization problem, there are several alternatives. The proposal made by [PERSON] et al. [17], which is followed in this work, consists of using a second-order Gauss-Newton method. This approach requires reformulation of the optimization problem as a non-linear least squares weights estimation problem. Finally, in each iteration of the Gauss-Newton method, the object pose is updated from the solutions obtained in the least squares problem:  
\[\Delta\xi=-\left(\sum_{\mathbf{x}\in\Omega}H(\mathbf{x})\right)^{-1}\sum_{ \mathbf{x}\in\Omega}J(\mathbf{x})^{T}, \tag{13}\]  
using Cholesky decomposition, where \(J\) is the Jacobian and \(H\) is the Hessian at pixel \(\mathbf{x}\). Consequently, if \(G^{t}\in\mathbb{SE}(3)\) is the pose of the 3D object at time \(t\), then the pose of the 3D object at time \(t+1\), \(G^{t+1}\in\mathbb{SE}(3)\) is defined by  
\[G^{t+1}=\exp(\widehat{\Delta\xi})G^{t}, \tag{14}\]  
where \(G^{0}\in\mathbb{SE}(3)\) is the initial pose of the 3D object obtained by the LINEMOD method at time \(t=0\). On the other hand, to improve the motion blur, as well as to reduce the computational cost, the update procedure of the 3D object's pose is performed using an image multi-scale decomposition. Finally, once the pose optimization process is finished, the tracking method detects that it has lost the object if \(\frac{E}{|\Omega|}>\lambda\) with \(\lambda\in[0.5,0.6]\). In this case, the AR system recolates the 3D object in the image by calling the method based on LINEMOD for detecting and estimating the pose of 3D objects again.