A camera object is used in association with a photo object, and it provides  necessary data for interior orientation of a photo. 

In classical aerial analogue camera, the format of a camera is indirectly expressed by a set of coordinates of fiducial marks. 

In modern digital cameras, where the size of the pixel is known, and there is no fiducial mark in an old aerial camera sense, the 4 corners of the photo can be regarded as fiducial marks.  In other words, we can compute coordinates of corner points based upon the pixel size.  Then in IO, we simply give the row and column, or image rectangular coordinate, of those corner points, as observation.  There is no need to do a measurement like a traditional aerial photo.

All fiducial marks must have an ID, an integer number, and x y coordinates and standard deviation, if known, otherwise just omit it.   When measuring, the sequence of measurement does not have to follow that appear in the fiducial mark vector.  However, the user must make sure that he or she measures the same point and calls it the same way as that in the fiducial mark vector.

The X Y axis in the camera calibration report defines the fiducial mark coordinate system.  This system is a reference system, in which the coordinates of fiducial marks and the calibrated principal point coordinates are referred to. This system can refer to any point as its origin, it does not matter, as long as it is a right hand coordinate system.   Some calibration reports make the so-called PPA (Principal Point of Auto-collimation) as the origin.  Don't be confused by the name PPA, it is just a physical fixed point of a camera.

The most important point that we really want for the photo coordinate system origin is the so-called calibrated principal point (Principal Point of Symmetry, PPS).  Its coordinate referred to the fiducial coordinate system must be given, otherwise the default is x = 0, and y = 0.

Radial distortion is given as a list of X Y coordinates, where X represent radial distance and Y is for radial distortion.  It is very important that the unit of lens distortion values provided by user be the same as unit of photo coordinate system, inherited from the unit of fiducial mark coordinates, and focal length.  For example if focal length has a unit of millimeter, the unit of lens distortion must be millimeter too, not micrometer.

If radial distance is not available, but rather the field angles are given, then they must be converted to radial distances, using the following formula:

        r     = c tan(theta)

where   c     = focal length

        theta = the field angle, which is an angle at the projection center  between the camera axis, line perpendicular to the photo, and the image rays.

Member data

Name Data type Meaning
id int ID of camera
name String name of camera
focal double focal length of camera (more correct, calibrated principal distance)
pp double coordinate of principal point (in the fiducial mark coordinate system)
vecfiducial VecIdPt2D a vector contains a list of fiducial mark numbers and their coordinates
vecrdd VecPt2D a vector contains a list of radial lens distortion
GPSoffset Pt3D coordinate of GCP receiver center point



no operator provided


Construction function

{Camera} ret  =  CAMERA([{double} argm1, {VecIdPt2D} argm2])

argm1 = focal length (default = 150)

argm2 = a vector of fiducial marks' ID and coordinates (default = a list of vector of

        IdPt2D points,  as follows

99991 x= -115 y =  115

99992 x=  115 y =  115

99993 x= -115 y = -115

99994 x=  115 y = -115)


->cam1 = Camera() a default camera.

->cam2 = Camera(150.027)

a camera with focal length



object.ID()          =  {int} left-value

object.NAME()        =  {String} left-value

object.FOCAL()       =  {double} left-value

object.PP()          =  {Pt2D} left-value

object.VECFIDUCIAL() =  {VecIdPt2D} left-value

object.VECRDD()      =  {VEcPt2D} left-value

object.GPSOFFSET()   =  {Pt3D} left-value


->cam2.pp() = Pt2D(0.002,0.015) set coordinate of principal point


Class function