Reputation: 1
Im trying to do a stereo calibration using open cv. I already succesfully did an intrinsic calibration for each camera. After that i tried the open cv "stereoCalibrate" function to find the extrinsic parameters. I want to use them for stereo rectification later.
The extrinsic parameters i got from the stereo calibration were really bad and i discovered, that the order of the acquired imagepoints change during the process. In the first image, the imagepoints start in the left top corner und end in the lower right corner. In the second image they start in the lower right.
As an result, the imagepoints dont fit with the object points and the parameters are not good.
The problem only occurs with one of the two cameras.
Any ideas how i can "force" the orientation of the calibration plate, so that the imagepoints get assigned correctly?
Thanks in advance!
Upvotes: 0
Views: 193
Reputation: 23
I compare y-coordinate of the two diagonal corners:
if ((pointBuf1[num - 1].y < pointBuf1[0].y))
std::reverse(std::begin(pointBuf1), std::end(pointBuf1));
if ((pointBuf2[num - 1].y < pointBuf2[0].y))
std::reverse(std::begin(pointBuf2), std::end(pointBuf2));
pointBuf1 and pointBuf2 are imagepoints from the left and right cameras. This code on C++, but, I think, the idea is clear
Upvotes: 1