-
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
|
Hello, I think your issue might be related to the order of extrinsic calibration. The correct sequence should be as Joshua Bird described, divided into three steps:
From your description, I guess your sequence might be "plane, origin, and scale." The key issue is that to obtain the world coordinate system, the prerequisite is that the positioning with camera 0 (i.e., the camera coordinate system you mentioned) as the "world coordinate system" must be accurate. Only then can you obtain the correct world coordinate system under the camera coordinate system (i.e., plane and origin). Since the first step only determines the direction of the translation vector between cameras, the second step is needed to determine the magnitude of the translation vector between cameras. This way, you obtain a complete pose relationship between the cameras, ensuring accurate positioning under the camera coordinate system. Only after completing the first two steps can you proceed to the third step. Regarding the "Three.js coordinate," I am not sure what kind of coordinate system this is, as I did not use the original project's React frontend code. However, I think that if you can correctly obtain the world coordinate system, converting it to the Three.js coordinate system should not be too difficult. As for why the first step only gives the direction of the translation vector but not its magnitude, here’s my understanding: Taking two cameras as an example (in fact, the original code also determines camera poses pairwise). First, cameras 0 and 1 capture a moving single infrared light source within the common field of view—about a dozen valid images are sufficient. After this step, we obtain the "image points." Then, the two sets of image points are passed to cv.findFundamentalMat() to obtain the Fundamental Matrix (F matrix), which represents the relationship between image points. Next, the F matrix and the camera intrinsics are passed to cv.sfm.essentialFromFundamental() to obtain the Essential Matrix (E matrix), representing the relationship between points in the camera coordinate system. Finally, the E matrix is passed to cv.sfm.motionFromEssential() to get the possible rotation matrix (R) and the direction of the translation vector (t) between the cameras. These steps can only yield an initial estimation of the rotation matrix (R) and the direction of the translation vector (t); they do not give the length of t. The default output length of t is 1, which is a unit vector in the t direction. This makes sense because, after converting the image points to the camera coordinate system using the camera intrinsics, you essentially have many rays. The "world point" is the intersection of these rays. However, capturing many world points from the camera's perspective does not inform the camera about the distances between points, only their relative positions. Therefore, we need two fixed-distance points (e.g., 0.2 m apart) to calibrate the scale, essentially telling the camera how far 0.2 m is. Before watching the tutorial video recommended by Joshua Bird, I was not familiar with camera calibration. I found the video very informative, and perhaps after watching it, you will understand how to solve your problem as well. |
Beta Was this translation helpful? Give feedback.
-
|
Your answers are always so high-quality and detailed. It makes me feel once again how coherent and rigorous your thinking is.👍👍I'll take your advice and completely restructure the world coordinate system to get a clean one. Then I'll convert it to Three.js coordinates.💪💪I'm working on the changes right now. Just wait for my good news!✅✅Appreciate !👏👏 |
Beta Was this translation helpful? Give feedback.

Hello,
I did not use the original project's extrinsic calibration code; instead, I rewrote it myself based on the same calibration principles. Therefore, I am not very familiar with that part of the original project's code. Nevertheless, I hope my possibly inaccurate explanation can still be helpful to you:
I think your issue might be related to the order of extrinsic calibration. The correct sequence should be as Joshua Bird described, divided into three steps: