필터 지우기
필터 지우기

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?

조회 수: 7 (최근 30일)
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?

채택된 답변

Qu Cao
Qu Cao 2024년 6월 12일
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
Qu Cao
Qu Cao 2024년 6월 17일
  • 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.
Taisei
Taisei 2024년 6월 18일
편집: Taisei 2024년 6월 18일
I understood that the origin is located at the optical center of camera 1 in stereo system. But, I think that this means R and t depend on the corrdinate system in which camera 1 pose. Is it wrong? If it is wrong, which corrdinate system do R and t depend on? Do they depend on world corrdinate system?
Here is a different issue:
Currently, I am facing an issue, referred to as 'After performing stereo calibration using a checkerboard, the same checkerboard is reconstructed in 3D. I have several questions regarding the results.' related to the 3D reconstruction of a checkerboard from two cameras. If possible, I would appreciate it if you could also respond to my already posted question about this issue.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for USB Webcams에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by