How to construct stereoParameters with intrinsic and extrinsic matrix?
조회 수: 3 (최근 30일)
이전 댓글 표시
I'm trying to reconstruct a 3D Scene from two images. Suppose camera has no distortions.
I have the images I1, I2 and the coressponding intrinsic_1, extrinsic_1, intrinsic_2, extrinsic_2 matrix. I also has the transaltion and rotation from camera1 to camera 2. How could I use them to construct a stereoParameters object? I found that cameraParameters has private attributes and extrinsic matrixs could not be set.
stereoParams = stereoParameters(cameraParameters1,cameraParameters2,poseCamera2)
[I1Rect, I2Rect, reprojectionMatrix] = rectifyStereoImages(I1,I2,stereoParams);
disparityMap = disparitySGM(I1Rect, I2Rect);
points3D = reconstructScene(disparityMap, reprojectionMatrix);
Or is it possible to figure out the reprojectionMatix directly using some functions with matched points inlierPts1 and inlierPts2?
[t1, t2] = estimateStereoRectification(fNorm8Point,inlierPts1.Location,inlierPts2.Location,size(I2));
reprojectionMatrix = some_function(t1, t2, intrinsic_1, extrinsic_1, intrinsic_2, extrinsic_2, rotations and translations between c1 to c2)
[I1Rect, I2Rect] = rectifyStereoImages(I1,I2,reprojectionMatrix);
댓글 수: 0
답변 (1개)
Qu Cao
2022년 11월 21일
poseCamera2 essentially transforms camera 2 to camer 1. If you have “the transaltion and rotation from camera1 to camera 2”, (let's call them t and R respectively), then you should be able to construct poseCamera2 as follows:
poseCamera2 = rigidtform3d(R', -R'*t)
I'm assuming that you're using R2022b.
댓글 수: 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!