In stereocalibration, is the relationship between the 'R and T output as PoseCamera2' and the actual camera position the same, or does the sign of x in T reverse?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am currently calibrating four cameras (Camera1, Camera2, Camera3, Camera4). To do this, I have created pairs (Camera1 & Camera2, Camera2 & Camera3, Camera1 & Camera4) and performed calibration to determine the relative positions of all cameras in the coordinate system of Camera1. For Camera1 and Camera2, I added about 80 images of a checkerboard taken using the stereocalibration feature of the calibration app for calibration.
As a result, I obtained the following:
R = [0.794, -0.0318, 0.605; 0.0226, 0.999, 0.0228; -0.606, -0.00446, 0.795]
T = [-2793, 44.86, 483.2] (units in [mm]).
The visual output, which I have attached as an image, shows that rotating Camera2 by R and translating it by T to align with the coordinate system of Camera1 makes it coincide with Camera1. Therefore, it can be seen that R and T correspond with the visual output.
However, the actual relative position of Camera2 to Camera1 in the coordinate system of Camera1 should be [2793, 44.86, 482.3]. Thus, I am considering that the sign of the x component of T obtained through stereocalibration might be reversed compared to the actual T. Is my understanding incorrect?
0 Kommentare
Akzeptierte Antwort
Qu Cao
am 12 Jun. 2024
Sorry for the confusion. We will update our documenation to be more specific about the meaning of PoseCamera2.
PoseCamera2 is the relative pose that transforms camera 2 pose into camera 1 pose. If you represent the pose of camera 1 as [R1, t1; 0 1], pose of camera 2 as [R2, t2; 0 1], and PoseCamera2 as [R, t; 0 1]. Then you will get the following relationship:
[R1, t1; 0 1] = [R, t; 0 1] * [R2, t2; 0 1]
which gives you
R1 = R*R2
and
t1 = R*t2+t
In the plot, the x component of t2 is positive, if you add R*t2 with t, which is negative, you get t1, which is equal to zero.
3 Kommentare
Qu Cao
am 17 Jun. 2024
- R and t doens't depend on the coordinate system in which camera 1 pose and camera 2 pose are represented. The coordiante system used in stereo camera calibration is described here. Essentially, In a stereo system, the origin is located at the optical center of camera 1.
- If you want to do 3-D reconstruction from disparity, I would recommend using the reprojection matrix returned by rectifyStereoImages. Once you rectify the stereo image, the cameras will be "rotated" so that their Z-axis are in parallal. Please also check the second syntax of rectifyStereoImages which might be helpful for you to do cooridnate transformation between unrectified and rectified camera coordinate systems.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu MATLAB Support Package for USB Webcams finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!