필터 지우기
필터 지우기

MATLAB Simulate 3D Camera: why is there no focal length (world units) attribute in the sensor model?

조회 수: 3 (최근 30일)
In the 3D camera simulation (https://www.mathworks.com/help/driving/ref/simulation3dcamera.html) - there is no specific focal length (mm) for the camera intrinsics. I'm working on feature tracking using the camera feed and I cannot estimate the 3D location of a point without knowing the focal length or the scaling factor (w) in (https://www.mathworks.com/help/vision/ug/camera-calibration.html).
It would also be great if MATLAB provides a DEM of the UAV scenarios - ground truth for many applications.
Please advise.

답변 (1개)

Qu Cao
Qu Cao 2022년 6월 1일
Please take a look at this page:
If you know the size of the pixel in world units, you can convert focal length in world units (usually mm) to focal length in pixels.
  댓글 수: 6
Qu Cao
Qu Cao 2022년 6월 1일
Given the following equations:
X = (u - cx) * Z / fx;
Y = (v - cy) * Z / fy;
where [X, Y, Z] is the 3-D point location, [u, v] is the corresponding image point location, and [fx, fy] is the focal lengths. You should be able to compute the factor you were talking about. Note that the Depth port outputs the Z values.
Ram Bhaskara
Ram Bhaskara 2022년 6월 2일
편집: Ram Bhaskara 2022년 6월 2일
Thanks for the reply, Qu!
For my analysis, I don't have depth info directly - but I'm computing the depth (approximately) from knowing my UAV altitude (say from GPS). If I have my feature's pixel coordinates [u, v] - I am aiming to compute the same feature coordinates in scene units. That's all I need - a vector from the optical center (not frame center) to the feature coordinates. The z-component of this vector is the focal length in mm.
P{camera frame} = [ (cx - u) * f / fx (cy - v) * f / fy f ]
From the intrinsics I devise in MATLAB simulate 3D camera, how do I get to this P (in the camera's reference frame)?

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

카테고리

Help CenterFile Exchange에서 Scenario Simulation에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by