How to provide cameraIntrinsics to triangulateMultiview

조회 수: 7 (최근 30일)
I am trying to triangulate matched points recorded by 5 different cameras using triangulateMultiview.
The third input required by triangulateMultiview is the cameraIntrinsic objects.
The help for this function describes the cameraIntrinsic objects as:
"Camera intrinsics, specified as a cameraIntrinsics object or an M-element vector of cameraIntrinsics objects. M is the number of camera poses."
However, I can't work out how to provide the cameraIntrinsic objects as a vector. My first thought would be to put them in a cell array, but then triangulateMultiview crashes because:
"Expected input to be one of these types: cameraIntrinsics, cameraParameters. Instead its type was cell."
The help text for this function includes an example, but for this the same camera seems to have been used and only one cameraIntrinsic object is needed, so it doesn't give any clues as to how to 'vectorise' them.
Thanks for any help,
M.

채택된 답변

Harikrishnan Balachandran Nair
Harikrishnan Balachandran Nair 2021년 10월 18일
Hi,
I understand that you are trying to use the function 'triangulateMultiview' for triangulating matched points recorded by 5 different cameras.
Since the images are captured by 5 different cameras, you can have a 5 element array of 'cameraIntrinsics' objects , by concatenating the corresponding objects. You can refer to the following code for having a 2 element array of 'cameraIntrinsics' objects.
focalLength = [800, 800];
principalPoint = [320, 240];
imageSize = [480, 640];
focalLength2 = [600,600];
principalPoint2 = [300,200];
imageSize2 = [480,640];
intrinsics1 = cameraIntrinsics(focalLength,principalPoint,imageSize);
intrinsics2 = cameraIntrinsics(focalLength2,principalPoint2,imageSize2);
intrinsics = [intrinsics1,intrinsics2];

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Support Package for IP Cameras에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by