Posted by
matlabbe on
Oct 18, 2024; 3:32am
URL: http://official-rtab-map-forum.206.s1.nabble.com/stereo-example-tp10512p10573.html
You will need to calibrate the camera. I don't how you calibrated with MATLAB, but make sure your calibration procedure contains a stereo calibration part, to make sure the images don't have any vertical disparity like this:

I saw that there is some corruption in the images like this (don't know if it is a compression artifact in the video file, or it is coming from the cameras):

To calibrate with RTAB-Map, see this example:
https://github.com/introlab/rtabmap/wiki/Stereo-mapping#process-a-side-by-side-stereo-video-with-calibration-example (I re-tested it, it should not crash). If you do something similar with your camera, you could generate the calibration files. Example of output in console:
Board type = 0
Board width = 8
Board height = 6
Square size = 0.033
Subpixel refinement = 1
Subpixel max error = 1
K = [524.4743122672077, 0, 319.8458179612328;
0, 523.9685099960811, 248.5524958784191;
0, 0, 1]
D = [-3.292539335090485, 3.233160693829638, -0.0009083597906489053, -0.001275569653864167, 0.3589368431511655, -2.955252909593058, 2.094856501232258, 1.54980970107022, 0, 0, 0, 0, 0, 0]
width = 640
height = 480
K = [531.5305559073173, 0, 308.0349336478321;
0, 530.98936737911, 242.7530280385648;
0, 0, 1]
D = [-3.432109443024221, 2.815069635865363, -0.0009428612756816649, 0.0008209316263067508, 0.2537914346609014, -3.090865941981399, 1.616884771910198, 1.310598460814279, 0, 0, 0, 0, 0, 0]
width = 640
height = 480
R = [0.9999766897514611, -0.0009019097487199164, 0.00676805086528434;
0.0008885938228338542, 0.9999976643191663, 0.001970217559089419;
-0.006769812015701296, -0.001964157584636917, 0.9999751555565042]
T = [-0.1193495062763594;
0.0008231760311874346;
0.006808017585813428]
E = [-1.162230935946806e-05, -0.006809618531902385, 0.0008097423040468814;
0.00599988516757373, -0.0002405614554054844, 0.119392618113607;
-0.0009292100767849997, -0.1193484850835176, -0.0002407157901844955]
F = [-2.552855232761383e-08, -1.497185372013621e-05, 0.004662291757330073;
1.319225707513976e-05, -5.294454799505665e-07, 0.1335943283982249;
-0.004279462177136355, -0.1347351250528422, 1]
R1 = [0.9987094977984396, -0.007674383382520709, -0.05020401225884828;
0.007724979297152617, 0.9999698307195525, 0.0008138461574707218;
0.05019625187249603, -0.001200620842546364, 0.9987386519042634]
P1 = [501.0845060342093, 0, 354.0802536010742, 0;
0, 501.0845060342093, 248.1240158081055, 0;
0, 0, 1, 0]
R2 = [0.9983533559244065, -0.006885831193550011, -0.05694876682816895;
0.00682842483940325, 0.9999759629320594, -0.001202569047168104;
0.05695567863424895, 0.0008117184699882487, 0.9983763778177235]
P2 = [501.0845060342093, 0, 354.0802536010742, -59.90282703316176;
0, 501.0845060342093, 248.1240158081055, 0;
0, 0, 1, 0]
One last thing to check, are left and right cameras hardware synchronized? If you do aggressive motion and disparity changes for objects at same distance, it means the cameras are not time synchronized, which is bad for VSLAM.
cheers,
Mathieu