필터 지우기
필터 지우기

How to get 3D world coordinates from 2D image coordinates?

조회 수: 5 (최근 30일)
Maurice Kasprowsky
Maurice Kasprowsky 2020년 8월 25일
답변: Qu Cao 2022년 3월 1일
I calibrated my cameras, took stereo images, rectified them, created a disparity map and used "reconstructSecene" to create a point cloud. I then used "getpts" to get the image coordinates for my point of interest from the left image (should I use the rectified or non-rectified version of the image?). Now I want to use the image coordinates to query the 3D coordinates. What code would I use to achieve that?

답변 (1개)

Qu Cao
Qu Cao 2022년 3월 1일
You should use the rectified stereo images. The disparityMap computed from disparitySGM should have the same size as your stereo image (left or right), M-by-N. The output xyzPoints of reconstructScene is of size M-by-N-by-3. So, if you get the 2-D image coordinates [u, v], you can query the corresponding 3-D point using something like:
point3d = xyzPoints(round(v), round(u), :);

카테고리

Help CenterFile Exchange에서 Camera Calibration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by