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.
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File 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!