Coordinate Systems for using Camera Calibration

14 次查看(过去 30 天)
Hello,
I am currently trying to project image points of a calibrated camera into the world-space.
The setup is sketched in the attached picture; basically, the camera revolves around the centre (and is always pointed towards it) and for certain angles alpha some image points need to be projected into the world-coordinate-system (I am interested in the x-y plane, z does not matter).
As far as I know I should use the function image2world2d() to get Xw and Yw. As input the image points and camera intrinsics are straight forward, but the camera extrinsics still pose a problem. I tried to calculate this with rigidtform3d(), but it seems I cannot get the rotation matrix right.
I am thankful for any help, since I could not find clear definitions of the coordinate systems (world, camera, picture). https://de.mathworks.com/help/vision/gs/coordinate-systems.html] is not very clear to me in regard to from which point of view the rotation matrix (Euler angles) should be calculated.

采纳的回答

Bjorn Gustavsson
Bjorn Gustavsson 2022-10-18
Think of it this way: Each pixel (u,v) in the image are capturing light along some line in 3-D. You can write that line as:
Here is the line-of-sight unit-vector of the ray hitting pixel (u,v). The intrinsic parameters determine that function, in the camera coordinate system. What you need to do is to transform (rotate) from the camera-coordinate system to the world system. You should be able to figure out which conversion that should be. (I wrote my own tools for these operations and don't know how matlabs versions work.) Start with checking some simple cases where you can check the algebra by hand, some cardinal directions and rotations of +/- 45, 90 135 degrees in different directions - I find that to be useful to figure out what order things should go.
HTH

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Support Package for USB Webcams 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by