Image Manager (CVCImg.dll) 15.0
TCoordinateMap Struct Reference

Defines a coordinate system that describes an affine linear transformation. More...

Data Fields

TMatrix Matrix
 Transformation matrix. More...
 
double OrgX
 X coordinate of the origin. More...
 
double OrgY
 Y coordinate of the origin. More...
 

Related Functions

(Note that these are not member functions.)

void ComposeCoordinateMaps (TCoordinateMap CS1, TCoordinateMap CS2, TCoordinateMap &CSOut)
 Concatenates mathematically two coordinate systems. More...
 
cvbbool_t CoordinateMapInverseTransform (double Xin, double Yin, TCoordinateMap CS, double &Xout, double &Yout)
 Transform a coordinate point Xin, Yin using the inverse of the given coordinate system CS. More...
 
cvbbool_t CoordinateMapIsTranslation (TCoordinateMap CS)
 Checks whether the coordinate system only describes a translation. More...
 
void CoordinateMapTransform (double Xin, double Yin, TCoordinateMap CS, double &Xout, double &Yout)
 Transforms a coordinate point using the given coordinate system CS. More...
 
cvbbool_t GetImageCoordinates (IMG Image, TCoordinateMap &CS)
 Gets the coordinate system of an Image. More...
 
void InitCoordinateMap (TCoordinateMap &CS)
 Initializes the given TCoordinateMap CS with the default coordinate system. More...
 
cvbbool_t InverseCoordinateMap (TCoordinateMap CSin, TCoordinateMap &CSout)
 Inverts a given coordinate system, if possible. More...
 
cvbbool_t SetImageCoordinates (IMG Image, TCoordinateMap CS)
 Sets the given coordinate system CS to the given Image. More...
 

Detailed Description

Defines a coordinate system that describes an affine linear transformation.

Coordinate systems like this are supported by every IImageVPA. If the coordinate system is taken into account by a function the term image coordinates is used. This is to distinguish between pixel buffer access which is denoted as pixel coordinates.

Above you see an IImageVPA with its immutable pixel coordinate system in red and the image coordinate system CS. The CS is transformed via a TCoordinateMap set via SetImageCoordinates. Also you see a TArea and its vectors for the three points P0, P1, and P2. Most functions using a TArea take the coordinate system into account and base their coordinates on the coordinate system CS.

This is the TCoordinateMap written as a 2D homogeneous coordinates matrix:

where the bottom row is not stored in this struct (virtual constants).

Note
The immutable pixel coordinate system is the default coordinate system as created by the InitCoordinateMap function:

Field Documentation

◆ Matrix

TCoordinateMap::Matrix

Transformation matrix.

With this matrix e.g. rotation and scaling can be performed.

◆ OrgX

TCoordinateMap::OrgX

X coordinate of the origin.

This can also be interpreted as the translation in X direction.

◆ OrgY

TCoordinateMap::OrgY

Y coordinate of the origin.

This can also be interpreted as the translation in Y direction.