Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 2088

How to give input parameters to triangulatePoints in python?

$
0
0
I want to find out 3D coordinates using stereo cameras. For that, I reached up to rectification of images but get stuck at [cv2.triangulatePoints](http://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#triangulatepoints). I find out P1 and P2 using [cv2.stereoRectify](http://docs.opencv.org/3.0-beta/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#stereorectify). Now I have to put four parameters in `triangulatePoints` functions which are projMatr1 (P1), projMatr2 (P2), projPoints1 and projPoints2. Now my first doubt is if P1 and P2 remain same for every pair of images as we are giving input Camera matrices, rotation and translation matrices in `stereoRectify`? According to me, P1 and P2 should be same as none of input matrices are changing. Now I want to know how to get *projPoints1* and *projPoints2* to get 3D coordinates. For example, if I know the pixel values of any point A in rectified left image as (Xl,Yl) and same Point A in right image as (Xr,Yr) can I put projPoints1 = (Xl,Yl) and projPoints2 = (Xr,Yr) in triangulatePoints? If not then how to get these `projPoints`?

Viewing all articles
Browse latest Browse all 2088

Trending Articles