How to provide cameraIntrinsics to triangulateMultiview

4 views (last 30 days)
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,

Accepted Answer

Harikrishnan Balachandran Nair
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];

More Answers (0)




Community Treasure Hunt

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

Start Hunting!