removed test whether z is negative in gpu::solvePnpRansac (there is no need in this for tests passing)

This commit is contained in:
Alexey Spizhevoy
2011-03-02 09:40:14 +00:00
parent 74c398e6b7
commit 4e6572acd9
3 changed files with 13 additions and 16 deletions

View File

@@ -143,14 +143,11 @@ namespace cv { namespace gpu
rot_mat[0].x * p.x + rot_mat[0].y * p.y + rot_mat[0].z * p.z + transl_vec.x,
rot_mat[1].x * p.x + rot_mat[1].y * p.y + rot_mat[1].z * p.z + transl_vec.y,
rot_mat[2].x * p.x + rot_mat[2].y * p.y + rot_mat[2].z * p.z + transl_vec.z);
if (p.z > 0)
{
p.x /= p.z;
p.y /= p.z;
float2 image_p = image[i];
if (sqr(p.x - image_p.x) + sqr(p.y - image_p.y) < dist_threshold)
++num_inliers;
}
p.x /= p.z;
p.y /= p.z;
float2 image_p = image[i];
if (sqr(p.x - image_p.x) + sqr(p.y - image_p.y) < dist_threshold)
++num_inliers;
}
extern __shared__ float s_num_inliers[];