This forum is disabled, please visit https://forum.opencv.org

2019-11-28 03:12:28 -0600 | received badge | ● Notable Question (source) |

2019-02-26 17:44:09 -0600 | received badge | ● Popular Question (source) |

2017-08-03 10:01:21 -0600 | received badge | ● Student (source) |

2017-08-03 09:55:38 -0600 | asked a question | Obtain Camera Pose and camera real world position using SolvePnP C++ I am trying to measure the pose of a camera and I have done the following. - Mark world 3-D(Assuming z=0, since it is flat) points on corners of a square on a flat surface and assume a world coordinate system.(in cms)
Have taken the top left corner of the square as my origin and given the world points in the following order(x,y)or(col,row): (0,0),(-12.8,0),(-12.8,12.8),(0,12.8) - in cms Detect those points in my image.(in pixels) The image points and world points are in the same order. I have calibrated my camera for **intrinsic matrix**and**distortion coefficients**.I use **SolvePnP**function to get rvec and tvec.I use **Rodrigues**function to get rotation matrix.To check if rvec and tvec is correct, I project back the 3-D points(z=0) using **ProjectPoints**into the image plane and I get the points correctly on my image with an error of 3 pixels on X- axis.Now I go ahead and calculate my camera position in the world frame using the formula:
- But my
**cam_worl_pos**x,y, and z in cms do not seem to be correct.
Also, I have a doubt on SolvPnP rvec and tvec solution, they might be one of the multiple solutions, but not the one which I want. How do I get the right rvec and tvec from SolvPnp or any other suggestions to get rvec and tvec would also be helpful.
The link has the picture of calibration pattern used.
The left square is my world coordinate system which is a square of sides 12.8cm, the top left corner is the world origin (0,0). The red points are the 3-D world points detected in the image. The image seen is after radial distortion correction of a fish eye lens camera.
(more) |

Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.