I've been using Hartley Calibration Algorithm, since stereoCalibrate/stereoRectify delivers no output due to high baseline stereo with camera rotation.
The left image though is heavily sheared and mirrored.
Stereo images left right. And remapped Images left right
I've used the anti-shearing algorithm by Zhang, but it doesn't revert the mirroring.
Here is the homography matrix I obtain from stereoRectifyUncalibrated:
H1(left):
[-0.09377726121369795, 0.04328690336693735, 86.72993843873914;
-0.004977161606602101, 0.155454257309974, 3.550060089738537;
-1.736436872968937e-05, -4.655031712266116e-07, 0.1663350901457538]
Here is the shearing transform matrix I obtain from my anti-shearing implementation:
shear matrix (left):
[1.683146574043227, -0.5007180072161737, 0;
0, 1, 0;
0, 0, 1]
I have to add a translation matrix, because the shearing moves the image to the right, so I calculate:
T:
[1, 0, -144.2016197365122;
0, 1, 0;
0, 0, 1]
(with T.at(0,2) from:
vec = shear * H1 * (0,0) //top left point of image
T.at(0,2) = 0 - vec.at(0,0)
)
Here is the picture when I calculate the new homography:
newH1 = T * shear * H1
Image rectified with anti-sheared homography matrix
Even though the image is now pretty straight and moved into the picture now it is still mirrored....
I have set the first value of H1 to it's positive value, but this is no general solution. Not all sets(other camera sets) do get mirrored, but as far as I could see, findChessboard finds the boards correctly (also correct in order).
OpenCV findFundamentalMat very unstable and sensitive I've read that findFundamental is 'unstable' sometimes do I have to calculate the fundamental matrix myself?
Thanks in advance!