Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If I understand you well, you have 4 points in the image and you know their world coordinates (you have 4 2D-3D correspondences) to find the rotation matrix and translation vector (known as the <a href="http://en.wikipedia.org/wiki/Pose_%28computer_vision%29" rel="nofollow" title="camera pose">camera pose</a>), you can use the <a href="http://docs.opencv.org/java/org/opencv/calib3d/Calib3d.html#solvePnP%28org.opencv.core.MatOfPoint3f,%20org.opencv.core.MatOfPoint2f,%20org.opencv.core.Mat,%20org.opencv.core.MatOfDouble,%20org.opencv.core.Mat,%20org.opencv.core.Mat%29" rel="nofollow" title="solvePnP">solvePnP</a> function.</p> <p>This function takes as inputs the 3D coordinates, 2D coordinates, the camera matrix (focal distance and center of projection) and the distortion coefficients, which you should have obtained by an intrinsic calibration process. The output is the rotation and translation vectors. The obtained rotation vector can be transformed in to a rotation matrix with the function <a href="http://docs.opencv.org/java/org/opencv/calib3d/Calib3d.html#Rodrigues%28org.opencv.core.Mat,%20org.opencv.core.Mat%29" rel="nofollow" title="Rodrigues">Rodrigues</a>.</p> <p>There is also <a href="http://docs.opencv.org/java/org/opencv/calib3d/Calib3d.html#solvePnPRansac%28org.opencv.core.MatOfPoint3f,%20org.opencv.core.MatOfPoint2f,%20org.opencv.core.Mat,%20org.opencv.core.MatOfDouble,%20org.opencv.core.Mat,%20org.opencv.core.Mat%29" rel="nofollow">a version of solvePnP</a> that uses a RANSAC algorithm to discard outliers.</p> <p>You can find <a href="http://projekter.aau.dk/projekter/files/14427578/A_Comparison_of_2D-3D_Pose_Estimation_Methods.pdf" rel="nofollow" title="here">here</a> a document with some theory on pose estimation.</p> <p><strong>Edit</strong></p> <p>Obtaining camera intrinsic parameters is known as <em>camera calibration</em>, you can find instructions on how to do so in this <a href="http://docs.opencv.org/doc/tutorials/calib3d/camera_calibration/camera_calibration.html" rel="nofollow">OpenCV document</a>. There is also an older tutorial with source code <a href="http://dasl.mem.drexel.edu/~noahKuntz/openCVTut10.html" rel="nofollow">here</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload