how to find 3d position of a point with intrinsic and extrinsic parameters with opencv
Asked Answered
J

1

6

i want to find a position of a point with opencv. i calibrated two cameras using cvCalibrateCamera2. so i know both intrinsic and extrinsic parameters. I read that with a known intrinsic and extrinsic parameters, i can reconstruct 3d by triangulation easily. Is there a function in opencv to achive this.I think cvProjectPoint2 may be useful but i don t understand what exactly. So how i can find 3d position of a point.

Thanks.

Jacobina answered 25/11, 2010 at 20:36 Comment(1)
This explanation may help you to understand. dsp.stackexchange.com/q/2736/1473Tungusic
K
6

You first have to find disparities. There are two algorithms implemented in OpenCV - block matching (cvFindStereoCorrespondenceBM) and graph cuts (cvFindStereoCorrespondenceGC). The latter one gives better results but is slower. After disparity detection you can reproject the disparities to 3D using cvReprojectImageTo3D. This gives you distances for each point of the input images that is in both camera views.

Also note that the stereo correspondence algorithms require a rectified image pair (use cvStereoRectify, cvInitUndistortRectifyMap and cvRemap).

Knight answered 25/11, 2010 at 21:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.