2017-02-23 05:38:30 -0600 | commented question | triangulatepoints returns very bad results Hello, i have solved it. The points had wrong values, should have checked them before asking. Here is how it works for me now: |
2017-02-23 02:22:38 -0600 | commented question | triangulatepoints returns very bad results Ty very much. I have edited my Question. Here are m P1 and P2 matrices. The other matrices are included in the link. |
2017-02-23 02:17:41 -0600 | received badge | ● Editor (source) |
2017-02-22 11:36:20 -0600 | asked a question | triangulatepoints returns very bad results Hello, I'm new in CV and trying to calculate 3D-Coordinates of a point with a stereo-setup. I don't get useful results from my code and the posts/questions of other users also didn't helped me. I did the following things: Step 1: Calibrate both cameras individually with a chessboard to get the intrinsic (camera matrix and distortion coefficients) parameters. I used the cv::calibrateCamera() function which returned an reprojection error smaller than 0.2 for both cameras. Step2: Stereo Calibrate of the Setup with a chessboard to get the rotation and translation matrix. I checked the result. The Error was very small and the T-Vector values are correlated to the physical setup (about 12.5 cm Basline). Step 3: Getting the projection matrices for both cameras P1 and P2 using the cv::stereoRectify() function. Now i want to triangulate.
In the left picture it was on pixel: x=343/y=272 and on the right picture it was on x=296/y=272.With these inputs i was trying the get 3D-coordinates of the point with the following code: for this input i got the following output from triangulatepoints: [5.21432042e-001, 4.01907146e-001, -7.52714634e-001, -1.1737522e-018] The result also doesn't change if I change the pixel-coordinates manually. Can you tell me what i am doing wrong? Do i have a logical error about how triangulatePoints works?The actual position of the point is about [0;0;125]cm if you take the left camera as origin. Ty for your help |