Abstract:
In many cases, the task of positioning a moving object using camera images can be reduced to well-known PnP (perspective-n-point) problem. For solving it, optimization algorithm is considered. The reprojection error using the parameterization of the rotation matrix by the Rodrigues vector is considered. Analytical partial derivatives were obtained for it. A feature of the task of positioning a moving object is that the new solution in most cases is in the neighborhood of the previous one. The main disadvantage of the optimization approach is the need to calculate the initial solution. It can be eliminated using the solution from the previous iteration. This also helps to eliminate the problem with the Rodrigues vector, which increases indefinitely as the rotation angle reaches 180 degrees. The BFGS numerical algorithm was used to solve the optimization problem. A heuristic for selecting the initial approximation of the inverse Hessian and the first step of the linear search is proposed. This made it possible to speed up the algorithm. The proposed approach is compared with known implementations from the OpnCV library on synthetic data. The experiment showed that the proposed approach has good performance in terms of accuracy and execution speed.