1. Camera external parameters
2. From 3D to 2D: Camera internal parameters
2.1 Perspective lens
2.1.1 Camera without distortion model
2.1.2 Camera with distortion model
2.2 Fisheye lens
3. Camera Rig External Parameters
1. Camera external parameters 
The external camera parameters are different for each image. They are given by:

T = (T_{x}, T_{y}, T_{z}) the position of the camera projection center in world coordinate system.

R the rotation matrix that defines the camera orientation with angles ω, φ, κ (PATB convention.)
If X = (X, Y, Z) is a 3D point in world coordinate system, its position X' = (X', Y', Z') in camera coordinate system is given by:

Figure 1. 3D geometry of camera externals. Looking from T towards the 3D point X shows the image as seen on the screen. 

2. From 3D to 2D: Camera internal parameters 
2.1 Perspective lens 
2.1.1 Camera without distortion model

The pixel coordinate (x_{u}, y_{u}) of the 3D point projection without distortion model is given by:
Where f is the focal length in pixel, and (c_{x}, c_{y}) the principal point in pixel coordinates.

Figure 2. Geometry of a perspective camera without distortion. Looking from T' towards the 3D point X' shows the image as seen on the screen, the origin of the image coordinate system is at the lower left corner of the image. 

2.1.2 Camera with distortion model

Let:
be the homogeneous point,
the squared 2D radius from the optical center, R_{1}, R_{2}, R_{3} the radial and T_{1}, T_{2} the tangential distortion coefficients. The distorted homogeneous point in camera coordinate system (x_{hd}, y_{hd}) is given by:
The pixel coordinate (x_{d}, y_{d}) of the 3D point projection with distortion model is given by:
Where f is the focal length in pixel, and (c_{x}, c_{y}) the principal point in pixel coordinates.

2.2 Fisheye lens 
The distortion for a fisheye lens is defined by:
 The parameters C, D, E, F that describe an affine deformation of the circular image in
pixel coordinates. The diagonal elements of the affine matrix can be related to the focal length f:
The offdiagonal elements are connected to the distortion of the projected image circle, which, in the most general case, can be a rotated ellipse.
 The coefficients p_{2}, p_{3}, p_{4} of a polynomial:
Where:
The pixel coordinate (x_{d}, y_{d}) of the 3D point projection with a fisheye distortion model is given by
Where:
And (c_{x}, c_{y}) is the principal point in pixel coordinates.
Example:
When using an 8mm Sigma lens on a Canon 6D camera with an image size of 5472 x 3648 pixel(figure. 3), the internal parameters can be initialized as follows:
 (c_{x}, c_{y}) = ( 5472/2, 3648/2 ) pixel is the center of the projected image circle
 p_{2} = p_{3} = p_{4} = 0
 p_{1} = 1
 C = F = 1780 pixel is the radius of the image circle
 E = D = 0


Figure 3. The distortion of an 8mm Sigma lens on a Canon 6D. 

3. Camera Rig External Parameters 
A camera rig consists of multiple cameras that are connected together with geometric constraints. A camera rig has the following characteristics:
 One camera is taken as reference (master) camera with a given position T_{m}, and orientation R_{m} in world coordinates.
 All the other cameras are secondary cameras with position T_{s} and orientation R_{s} in world coordinates.
 For each secondary camera, the relative translation T_{rel} and rotation R_{rel} with respect to the reference camera is known.
The position and orientation for secondary rig cameras are defined w.r.t. the reference (master) camera such that:
The position X' of a 3D point in the reference (master) camera coordinate system is given by:
The position X' of a 3D point in the coordinate system of a secondary camera is given by:
Once the 3D point in camera coordinates is calculated, the projection works in the same way as for any other camera as described in section 2.

Hi,
I have a question of R rotation matrix when I using Pix4D Mapper Education.
I was using omega phi and kappa to do other calculations but all results was wrong, and now I come back to double check the equation of R.
I run the whole model by using "3D MODEL", then I got "calibrated_camera_parameters.txt" (CCP)and "calibrated_external_camera_parameters.txt" (CECP) files in 1_initial folder. In CCP, I see the camera rotation R of each image, and in CECP, there is calibrated omega phi and kappa of each image.
I was trying to use MATLAB to calculate rotation matrix R by using the omega phi kappa(from CECP) through the equation mentioned in this website "1. Camera external parameters", but the result I got through the equation here was not the same with the one given by CCP.txt file.
What caused this problem? The value should be the same...
Thank you very much!
Steven (Chen Xing)
Hi,
As mentioned in the What does the Output Params Folder contain? article, the project_name_calibrated_camera_parameters positions and rotations of the cameras are defined in a local coordinate system. In order to get the values in the definition mentioned in How are the Internal and External Camera Parameters defined? article, the rotation around the Xaxis and the offset needs to be applied.
Best,
Hi,
I reviewed those websites and the document mentioned "offset", I found the document "project_name_offset.xyz", but there was only one coordinate in that file, like xxx845.000 xxxx588.000 xx1.000.
Could you please explain how to applied the rotation around the Xaxis and the offset?
Thanks!
Steven
Hello,
From the article what does the output paramteres folder contain :
As it is mentioned, that folder contains "computer vision information" where the convention is to have the zaxis pointing towards the scene, while in photogrammetry we have the convention to have the zaxis pointing towards the camera. That is why it is necesary to rotate the X axis.
I hope this answer helps.
Regards.