Image Manager (CVCImg.dll) 15.0
TArea Struct Reference

Describes an area of interest that is using three points (P0, P1 and P2). More...

Data Fields

double X0
 X coordinate of point P0.
 
double X1
 X coordinate of point P1.
 
double X2
 X coordinate of point P2.
 
double Y0
 Y coordinate of point P0.
 
double Y1
 Y coordinate of point P1.
 
double Y2
 Y coordinate of point P2.
 

Related Functions

(Note that these are not member functions.)

void BoundingRectangle (TArea Area, TCoordinateMap CS, TDRect &BoundingBox)
 Calculates the smallest bounding rectangle for the given Area. More...
 
cvbbool_t CoordinateMapInverseTransformArea (TArea AreaIn, TCoordinateMap CS, TArea &AreaOut)
 Transforms the AreaIn using the inverse of the coordinate system CS. More...
 
void CoordinateMapTransformArea (TArea AreaIn, TCoordinateMap CS, TArea &AreaOut)
 Transforms the AreaIn using the given coordinate system CS. More...
 
void MatrixTransformArea (TArea AreaIn, TMatrix A, TArea &AreaOut)
 Performs a matrix transformation on a given area. More...
 
void SetArea (double X0, double Y0, double X1, double Y1, double X2, double Y2, TArea &Area)
 Sets the coordinates to the given Area. More...
 
void SetRectArea (double Left, double Top, double Right, double Bottom, TArea &Area)
 Sets the Area points P0, P1, and P2 based on the given rectangle borders. More...
 

Detailed Description

Describes an area of interest that is using three points (P0, P1 and P2).

These three points define a parallelogram:

Normally the three points are given in image coordinates which are defined by the TCoordinateMap of the image (GetImageCoordinates). By default this is identical to the pixel coordinate system. Thus most of the functions using a TArea also take the image's coordinate system into account which means that the area is transformed accordingly prior the calculation of the actual pixel coordinates (see CoordinateMapInverseTransformArea).

As shown in the parallelogram image, the TArea defines a scanline which is a directed line segment:

This means functions using a TArea potentially treat pixels on this vector being in one line. Rows in the processing are defined by this directed line segment:

Note
The line segments [P0 P1] and [P0 P2] are inclusive. This means that the points P0 and P1 are considered to be inside the area. Thus
Attention
Some tools swap the line segments for the scanline and rows and the scan line becomes:
Some functions like CreateSubImage adjust the origin (TCoordinateMap::OrgX, TCoordinateMap::OrgY) and also possibly the matrix (TCoordinateMap::Matrix, e.g. CreateImageMap).
See also
TCoordinateMap for information on the coordinate systems; TDRect