MATLAB: Y axis and Z axis are switched using showExtrin​sics(stere​oParams, ‘CameraCentric’)

Image Processing Toolboxshowextrinsicsstereo camera

showExtrinsics switch Z and Y axis. If I want to plot in the same figure a point A situated at (x,y,z), I have to :
plot3(A(1),A(3),A(2)) %insthead of plot3(A(1),A(2),A(3))
Is it a reason for this?

Best Answer

Yes, you'll need to switch Y and Z axis since the following function in showExtrinsic:
function [xIdx, yIdx, zIdx] = getAxesIdx()
% We are going to swap y and z coordinates because the 3-d plot
% rotates around the MATLAB's z-axis by default. Thus the
% camera can be displayed horizontally and the 3-d plot will
% rotate conveniently around the newly defined vertical y-axis.
xIdx = 1; yIdx = 3; zIdx = 2;
end