Hi
Given a set of points in world coordinates lying around a field, how do i extract the **POSITION in XYZ of the camera** ?
Help thanks
EDIT: double cv::calibrateCamera gives me **90 error** and my camera positions are wrong.
Position of camera 1 is
[87.32213358065832;
31.93220642490884;
13.05887540297087]
**Camera 1 is not at 30 meters in the y axis !!!!!!!!!!!!!** It should be negative something y. **All my cameras y coordinate are 30 something**. I have checked the coordinates of the points and the image and confirm they are correct.
I input the into the function following the tutorial http://docs.opencv.org/2.4/doc/tutorials/calib3d/camera_calibration/camera_calibration.html
calibrateCamera(World_Coords, Image_Coords, Size(1920,1080), cameraMatrix, distCoeffs, rvecs, tvecs, CV_CALIB_FIX_K4 | CV_CALIB_FIX_K5);
The points in world_coords and Image_coords are arranged such that they correspond to each other.
Then i use rodrigues() to extract the 3x3 rot matrix then the camera position = - rot_matrix.transpose() * tvec.
But I am not getting the right camera position. Can i send the code and data to anyone ? **HELP ME FIND THE CAMERA POSITION PLEASE IT HAS BEEN 3 MONTHS AND I AM GOING TO FAIL OH GOD !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!**
Camera positions
87.3212582849046;
31.93218648966307;
13.06565020386278]
[88.33600161820506;
36.45175643361132;
13.09339437945696]
[52.67469116679835;
32.05365845570439;
12.67307503062286]
[53.09438819350136;
36.17409639334836;
12.70318338140262]
[9.268389455871184;
35.52733695765274;
14.36430399165124]
[9.21543336317054;
38.71223919680707;
14.1736490348868]
Why do all the Y positions look wrong !!?? Is it a fatal error with opencv 3.0 calibratecamera ???????????????????????
EDIT: i changed to CV_CALIB_FIX_ASPECT_RATIO and the error has dropped to 19. how do i make it drop to ~1. help



↧