I am in the process of performing a stereo calibration for two cameras. I know that Stereo calibration will essentially find out the rotation R and translation t between both the cameras. For the two cameras I have given the intrinsic parameters. In the first step, I take about 50 images simultaneously with both cameras. I then finally use these for the stereo calibration. My results also make rough sense. Because I know the distance of the cameras and compared them with the output t and that fits.
However, I sometimes get an error message when I, for example, vary the distance between the cameras and take new pictures, namely:
(expected: ‘nimages == (int)imagePoints2.total()’), where
‘nimages’ is 27
must be equal to
‘(int)imagePoints2.total()’ is 50
isn’t that a limitation of the (terrible) code you copypasted from SO only ?
you indeed have to make sure, it sees a complete chessboard for each image pair.
(if it’s not so, you have to skip both images)
it’s just a matter of re-organization
again, you need a loop over image pairs, not 2 (shittily copypasted) ones per camera
But I wonder why you have such a nasty expression? Not everyone here is a professional and can immediately write the perfect code. So please pay attention to how you write. You may be a professional and can distinguish good and bad code but others cannot.
I see you are a moderator. You should be a role model and not bash other people here.
No problem…and yes I understand the problem. We need always a pair of images. But my problem is how to implement a code which can detected a fault pair to ignore them. I did not find examples in the internet.