I'm setting up a stereo camera system (with two cameras). I'm trying to get rotation matrix and translation vector with OpenCV in c++.
I have computed matrix camera and distortion vector for each camera using cameraCalibrate
opencv function. Now I'm trying to calculate rotation matrix and translation vector using stereoCalibrate
. I did not understand the stereoCalibrate parametes: imagePoints1
and imagePoints2
. Have these two parameters contain the same point in the same scene viewed by the two cameras or can I detect different points from the same scene taken by the cameras?
Asked
Active
Viewed 2,094 times
0

Andrey Korneyev
- 26,353
- 15
- 70
- 71

Bino
- 1
- 4
1 Answers
0
The goal if stereo calibration is to gather information about the position of the same object on two images. Taking into consideration points belonging to different objects does not make any sense in stereoCalibrate. That's also what documentation clearly says. In other words, you should pass there "the same points viewed by two cameras".

marol
- 4,034
- 3
- 22
- 31
-
Thanks for the answer! I'm trying to make all automatically but detect the same chessboard on two images (from the two cameras), smaller than the chessboard on the paper it is not a joke. I will try to detect the whole chessboard printed. – Bino Sep 17 '14 at 07:59
-
Would you say findChessboardCorners()? Yes, I do. To make all automatic I need to detect the whole big chessboard, not the subchessboards. I will try in this direction. If you have other ideas I'm all ears. – Bino Sep 17 '14 at 12:29
-
I don't know what you mean by subchessboards but usually the flow with stereo calibrate is as follow: print chessboard, fix its position, take picture by each camera, change and fix another position varied by angle, continue 10-20 times. There are quite a bunch of resources, on SO even. Googling for one hour will be sufficient to find it. Also opencv docs puts more light and "Learning Opencv" book by Bradski explains process in details (even though it uses arcane C Api) – marol Sep 17 '14 at 19:21