Added cast and removed formatting error

pull/2948/head
PhilLab 11 years ago
parent aafda43df1
commit 2c29ee9e00
  1. 3
      modules/calib3d/src/solvepnp.cpp

@ -187,7 +187,8 @@ namespace cv
for (int i = 0; i < objectPoints.cols; i++)
{
//Although p is a 2D point it needs the same type as the object points to enable the norm calculation
Point_<OpointType> p(imagePoints.at<Vec<IpointType,2>>(0, i)[0], imagePoints.at<Vec<IpointType,2>>(0, i)[1]);
Point_<OpointType> p((OpointType)imagePoints.at<Vec<IpointType,2>>(0, i)[0],
(OpointType)imagePoints.at<Vec<IpointType,2>>(0, i)[1]);
if ((norm(p - projected_points[i]) < params.reprojectionError)
&& (rotatedPoints.at<Vec<OpointType,3>>(0, i)[2] > 0)) //hack
{

Loading…
Cancel
Save