Density and transformation matrix

<< Click to Display Table of Contents >>

Navigation:  Image Manager > CVB Technology >

Density and transformation matrix

 

This section outlines some additional information for using Common Vision Blox according to

 

Density

2D Transformation Matrices

 

Density

 

Density specifies the sample rate of the image.

A density of 1000 means that all pixels in the specified area are used in the algorithm.

Where as a density of 500 means that only every second pixel is used.

Note that the used pixel is NOT interpolated.

 

This is used by some Image Manager functions (like ImageHistogram), methods as well as by some Common Vision Blox Tools.

 

2D Transformation Matrices

 

Transformation matrices are used by some Image Manager functions (like CreateMatrixTransformedImage) as well as by some Common Vision Blox Tools, e.g. Minos.

See also the type definition of TMatrix and the chapter Areas and Matrices.

 

The Image-dll provides an affine transformation from xy to x‘y‘ coordinate system :

 

affine  

where   TMatrix is the affine transformation matrix (e.g. TMatrix).

 

The following equations show all affine transformation:

 

Reflection/Mirror

Mirror

 

Scaling

Scaling

where axare the scaling factors in x and y.

 

Rotation

rotation

 

where α is the rotation angle about the origin.

 

Shear

Shear

 

If no shear is present, and the image is not reflected, the transformation matrix is:

 

transfMatrix

then the scaling and the rotation angle are given by:

 

angle

 

To transform from x‘y‘ to xy, the matrix  TMatrix has to be inverted with (e.g.) the CVB function InverseMatrix(TMatrix A, TMatrix &AInv):

 

inverse

 

To the affine transformation a translation can be added (as for TCoordinateMap).

This can be described by the 2D homogeneous coordinate matrix CS

 

CoordMatrix

where   xy    is the translation in x and y.