Theoretical Background

Geometric Transformation

A combination of image rotation and translation in 2 dimensions with coordinates x and y can be expressed with:

Equation 19.

Here x' and y' are the coordinates in the target image. The rotation angle is and are the translation parameters in x and y direction. The inverse translation and rotation is then:

Equation 20.

And therefore the coordinates in the source image are calculated as:

Equation 21.

For a VA design we need the inverse transformation for coordinate calculation due to target-to-source mapping. Scaling of the coordinates can be realized by multiplication with constants for x and y direction.

Distortion Correction

Optical distortion appears when the magnification of an object changes with distant to optical axis. The image has then barrel or pincushion shape. For the VA design we use a polynomial ansatz according to [Par09]. The distorted coordinates are calculated from undistorted coordinates as:

Equation 22.

The coordinates are relative to the optical center of distortion. The parameters are the distortion coefficients. Some open source programs e.g. OpenCV give the possibility to calculate those parameters with calibration images [Ope16a]. For all a lookup-table with the correction parameters can be calculated with a Matlab program. You can find it under \examples\Processing\Geometry\GeometricTransformation\LUTDistortionCorrection.m. With this table all distorted coordinates can be calculated by simple multiplication with the undistorted coordinates.

Keystone Correction

This trapezoidal distortion appears when the camera is not placed perpendicular to the object to be filmed. With a 3x3 transformation matrix M with elements this effect can be corrected as [Ope16b]:

Equation 23.

Please notice that we perform here inverse correction due to target-to-source mapping. The variables and are the Keystone distorted and Keystone corrected coordinates respectively. can be calculated with OpenCV functions [Ope16b].

Image Moments

Please see section for detailed theoretical description of image moments.