# Revision history [back]

Generally, you can rotate a portrait image into landscape or vice versa (remap pixels) prior to feeding it to the calibration algorithm and this will work fine, you'll only need the one K matrix, but the focal lengths need to be exchanged and the center point has to be remapped to the same point in the rotated view.

The same is not true of the distortion matrix (D) parameters which are not axially symmetric, which is a very important component of calibration for high accurate mapping of image pixels to rays in the camera's coordinate space.

The same is also not true of any camera pointing values (extrinsic calibration Rotation and Translation to a global coordinate system used in multicamera setups). Repointing a camera relative to the coordinate system always requires a recalibration.

Generally, you can rotate a portrait image into landscape or vice versa (remap pixels) prior to feeding it to the calibration algorithm and this will work fine, you'll only need the one K matrix, but the focal lengths need to be exchanged and the center point has to be remapped to the same point in the rotated view.

The same is not true of the distortion matrix (D) parameters which are not axially symmetric, which is a very important component of calibration for high accurate mapping of image pixels to rays in the camera's coordinate space.

The same is also not true of any camera pointing values (extrinsic calibration Rotation and Translation to a global coordinate system used in multicamera setups). Repointing a camera relative to the coordinate system always requires a recalibration.

Edit:

• K0: For rotation 0, fx and fy are as is, cx and cy are as is.
• KPI2: For rotation pi/2, fx and fy are switched, use xmax-cy and cx for cx and cy
• KPI: For rotation pi, fx and fy are as is, use xmax - cx, ymax - cy for cx and cy
• K3PI2: For rotation 3pi/2, fx and fy are switched, use cy, xmax - cx for cx and cy

Like this (generally, I made a drawing error in the fourth array)

Note: I may have the rotation backwards, in which case the second and fourth cases need switched (it's a sign reversal on the rotation amount).