How to find frame-to-frame pose?

asked 2017-07-28 01:10:24 -0600

snehal gravatar image

updated 2017-07-28 01:17:51 -0600

Hello,

I want to find a frame to frame pose. For that suppose,

  1. I have frame1 and frame2.
  2. I have 2D image points of frame1 and frame2.
  3. Also i have 3D object points (xc, yc, zc) of frame1 and frame2 with respect to camera from (http://fsr.utias.utoronto.ca/submissi...) link.

Now My question is,

  1. What will be the input of solvePnPRansac() ? it should be the same frame or different frame ?
  2. What will be my output if i am passing input 3D point of frame1 and 2D point of frame2 to solvePnPRansac() . (If i am doing for different frame it's give me error : OpenCV Error: Assertion failed (npoints >= 0 && npoints == std::max(ipoints.checkVector(2, CV_32F), ipoints.checkVector(2, CV_64F))) in solvePnPRansac, file /tmp/binarydeb/ros-kinetic-opencv3-3.2.0/modules/calib3d/src/solvepnp.cpp, line 233 terminate called after throwing an instance of 'cv::Exception' what(): /tmp/binarydeb/ros-kinetic-opencv3-3.2.0/modules/calib3d/src/solvepnp.cpp:233: error: (-215) npoints >= 0 && npoints == std::max(ipoints.checkVector(2, CV_32F), ipoints.checkVector(2, CV_64F)) in function solvePnPRansac ) How can i resolve this?

  3. What will be my output if i am passing input 3D point and 2D point of same frame(frame1, frame2, ..) .

  4. How can i get resultant transformation? what is the correct way?

edit retag flag offensive close merge delete

Comments

1
  • it's a bit unclear, what you have, and what you want. are frame1 and frame2 from same camera at different times ? or from 2 cameras at different angles ?
  • solvePnP gives you a pose from 1 set of 2d points and 1 set of 3d points. there's no such thing as "2 frames" here, so explain, how that is related, please.
  • we need your code to resolve the error msg.
berak gravatar imageberak ( 2017-07-28 02:02:52 -0600 )edit

1.yes i am using monocular camera and i have image1 and image2 at time t and t+1 ,also i have 2d points and 3d points of image1 and image2.

2.i want pose between image1 and image2.

3.I find 3d points of image1 and image2 from above link.

4.I understood solvePnP gives pose from 1 set of 2d points and 1 set of 3d points but these set should be from same image(3d points of image1 and 2d points of image1) or it should be from different image taken at t and t+1 time ( 3d points of image1 and 2d points of image2).?

snehal gravatar imagesnehal ( 2017-07-31 01:37:42 -0600 )edit

In solvePnP is there any condition which checks the size of object points and image points?

snehal gravatar imagesnehal ( 2017-08-02 02:16:51 -0600 )edit