Ask Your Question
2

pose estimation using RANSAC

asked 2012-09-19 19:17:44 -0500

Nabeel gravatar image

updated 2012-09-20 01:54:48 -0500

jav_rock gravatar image

Hi Hi Everyone,

As I posted before i had a problem with solvePnPRansac pose estimation. I solved that issues as I was doing something in mapping of my data.

I generate vectors of 2D points and corresponding 3D points (Top 20 matches). Then I generate a Camera Matrix =[fx 1 cx; 1 fy cy;0 0 1] and I assume distortion coefficients are zero. Then I apply solvePnPRANSAC to estimate the pose. I get inliers. I am using 10 Error Threshold in RANSAC function and run it for 200 iterations.

From pose, I reproject my points back. Some reprojected points are coming very far from actual image points. Please see the attached figure.

So I am wondering if there is any step needed before calling RANSAC to ensure good results. !

waiting for replies . . image description

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2012-09-20 02:10:47 -0500

Jacek gravatar image

updated 2012-09-20 02:17:43 -0500

Camera matrix = [fx 1 cx; 1 fy cy;0 0 1] is wrong it should be [fx 0 cx; 0 fy cy;0 0 1] (or [fx s cx; 0 fy cy;0 0 1] if you have a camera with non-zero skew s but this is seldom the case).

Besides the procedure you described looks OK. Only reprojection error = 10 is huge, I'm not sure if this is for purpose but you usually should use reprojection error like 1 or 2 pixels.

edit flag offensive delete link more

Comments

hi one thing i am wondering . . can i use 0 for both cx and cy ? or should it be the centre of the image?

Nabeel gravatar imageNabeel ( 2012-10-01 00:43:24 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2012-09-19 19:17:44 -0500

Seen: 921 times

Last updated: Sep 20 '12