Posted by
noone on
Oct 17, 2024; 1:29pm
URL: http://official-rtab-map-forum.206.s1.nabble.com/stereo-example-tp10512p10560.html
the images are not rectified but they pass then get rectified check my code please
https://pastebin.com/emTefuu0white ceiling why ?
because my room is messy and full of prototypes and stuff

so its embarrassing so i showed you the ceiling as a prove it works lol
why rectification matrixs are Identity ?
i did run the binary i wrote the fx fy cx cy and baseline then it generated the yamls , why i did that ?
to know what format of rtab map without keep digging in the lib because its massive
so from that moment i thought my rectifications matrixs is like that so i did not think much about it

and maybe thats the thing that cause the problem but there is no o additional rotation or transformation left and right thats why its almost zero
1- i will record a video for you
2- i will try change the rectification matrixs
3- i have a question now , check my code i shared with you the link now early i did not pass the yamls but after reading your NOTE : i thought maybe the rectificated images does not pass to RTAB map or the yamls ? so i did this change , so my question is now it asks for 6 yamls ,
00000001_left.yaml
00000001_right.yaml
00000001_pose.yaml
and the
left_m.yaml
right_m.yaml
pose_m.yaml
so the question is , is it wrong to pass it like this ?
if (camera->init("C:/rtabmap/build/bin", "m"))
{
printf("Camera initialized successfully\n");
// Cast to CameraStereoVideo to access stereo-specific methods
CameraStereoVideo* stereoCamera = dynamic_cast<CameraStereoVideo*>(camera);
if (stereoCamera)
{
const StereoCameraModel& model = stereoCamera->getStereoModel();
printf("Stereo model:\n");
printf(" Baseline: %f\n", model.baseline());
printf(" Left fx: %f, fy: %f, cx: %f, cy: %f\n",
model.left().fx(), model.left().fy(), model.left().cx(), model.left().cy());
printf(" Right fx: %f, fy: %f, cx: %f, cy: %f\n",
model.right().fx(), model.right().fy(), model.right().cx(), model.right().cy());
printf(" Image size: %dx%d\n", model.left().imageWidth(), model.left().imageHeight());
}
else
{
printf("Error: Camera is not a stereo camera\n");
}
}
else
{
printf("Camera init failed!\n");
delete camera;
return -1;
}
%YAML:1.0
---
camera_name: m_right
image_width: 1920
image_height: 1080
camera_matrix:
rows: 3
cols: 3
data: [ 1.0453382000000000e+03, 0., 9.6497390000000005e+02,
0., 1.0471505000000000e+03, 5.3710910000000004e+02,
0., 0., 1. ]
distortion_coefficients:
rows: 1
cols: 4
data: [ 2.41e-02, -3.05e-02, 0., 0. ]
distortion_model: plumb_bob
rectification_matrix:
rows: 3
cols: 3
data: [ 1., 0., 0.,
0., 1., 0.,
0., 0., 1. ]
projection_matrix:
rows: 3
cols: 4
data: [ 1.0453382000000000e+03, 0., 9.6497390000000005e+02, 0.,
0., 1.0471505000000000e+03, 5.3710910000000004e+02, 0.,
0., 0., 1., 0. ]
local_transform:
rows: 3
cols: 4
data: [ 0., 0., 1., 0., -1., 0., 0., 0., 0., -1., 0., 0. ]
essential_matrix:
rows: 3
cols: 3
data: [ 0.00095, 0.00002, -0.00003,
-0.00002, 0.00097, 0.00001,
0.00003, -0.00001, 0.00098 ]
fundamental_matrix:
rows: 3
cols: 3
data: [ 0.0002, -0.0004, 0.005,
0.0004, 0.0001, -0.006,
-0.005, 0.006, 1.0 ]
///////////////////////////////////////////////////
%YAML:1.0
---
camera_name: m_left
image_width: 1920
image_height: 1080
camera_matrix:
rows: 3
cols: 3
data: [ 1.0507460000000001e+03, 0., 9.6688520000000005e+02,
0., 1.0525362000000000e+03, 5.3855269999999996e+02,
0., 0., 1. ]
distortion_coefficients:
rows: 1
cols: 4
data: [ 2.55e-02, -3.16e-02, 0., 0. ]
distortion_model: plumb_bob
rectification_matrix:
rows: 3
cols: 3
data: [ 1., 0., 0.,
0., 1., 0.,
0., 0., 1. ]
projection_matrix:
rows: 3
cols: 4
data: [ 1.0507460000000001e+03, 0., 9.6688520000000005e+02, 0.,
0., 1.0525362000000000e+03, 5.3855269999999996e+02, 0.,
0., 0., 1., 0. ]
local_transform:
rows: 3
cols: 4
data: [ 0., 0., 1., 0., -1., 0., 0., 0., 0., -1., 0., 0. ]
essential_matrix:
rows: 3
cols: 3
data: [ -0.0000016, -0.0000350, 0.0001399,
-0.0006489, 0.0000006, 0.0598137,
-0.0002168, -0.0598170, -0.0000018 ]
fundamental_matrix:
rows: 3
cols: 3
data: [ -0.0000, -0.0000, 0.0002,
-0.0000, 0.0000, 0.0577,
0.0001, -0.0568, -0.3288 ]