Create a cameraParameters object with more than one Intristic Matrix?

1 visualización (últimos 30 días)
BLEARGH BUNY
BLEARGH BUNY el 25 de Nov. de 2017
Comentada: Qu Cao el 18 de Jun. de 2020
I want to do bundle adjustment.
In the SfM problem:
After Projective + Euc Recontruction, you get a bunch of Projection Matrices and 3D points and you pass than onto do bundle adjustment.
I have done Proj + Euc and have such a number of Projection Matrices and want to use Matlab's inbuilt bundleAdjuster to do so, problem is you can only pass a single intristic matrix to it, can someone tell me how to pass more than one intristic matrix to the cameraParameter initializer to give to the bundleAdjuster?
vSet = viewSet;
R = [];
T = [];
for i = 1:m
[r,t,~] = get_camera_para();
vSet = addView(vSet,i,'Orientation',r,'Location',t');
R(i,:) = rotationMatrixToVector(r);
T(i,:) = t';
end
cPose = poses(vSet);
W = get_camera_para_intristi(P(1:3,:)); %%only using first camera for now
cPara = cameraParameters('IntrinsicMatrix',W','RotationVectors',R,'TranslationVectors',T);
[X_final,P_final,reproj] = bundleAdjustment(X,tracks,cPose,cPara);
I want to do something like
for i = 1:m
W = get_W
camP = cameraParameter( add_new_W_to_camera_param_somehow );
end
bundleAdjust( bundle_adjust_using_all_camera_params / intristic_matrices );

Respuestas (1)

Qu Cao
Qu Cao el 7 de Nov. de 2019
Since R2019b, you can use an array of cameraIntrinsics objects to represent the intrinsic parameters of a bunch of different cameras:
  2 comentarios
yinghui zhu
yinghui zhu el 18 de Jun. de 2020
but how can we pass more than one camera intrinsic as a vector form for bundlesadjustment?
Qu Cao
Qu Cao el 18 de Jun. de 2020
You mean create an array of cameraIntrinsics object?
You can do the folowing:
intrinsics1 = cameraIntrinsics([800 800], [320, 240], [480 640]);
intrinsics2 = cameraIntrinsics([800 800], [325, 245], [480 640]);
intrinsics = [intrinsics1; intrinsics2]
intrinsics =
2×1 cameraIntrinsics array with properties:
FocalLength
PrincipalPoint
ImageSize
RadialDistortion
TangentialDistortion
Skew
IntrinsicMatrix

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB Support Package for USB Webcams en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by