This interface holds a single pattern matching result and is used to access its properties. More...
Public Member Functions | |
void | Draw (HDC hdc, LPVPatDrawFlags drawFlags, double zoomX, double zoomY, double panX, double panY) |
ILPoints * | GetFeature (int level) |
ILRect * | GetRect () |
LArray< ILPolygon * > | GetShape (int level) |
void | Set (ILMatch *matchObject, double patX, double patY, double patAngle, double patScale, double patScore) |
![]() | |
ILObject * | Copy () |
LPVErrorCode | Load (LString filename) |
void | Reset () |
LPVErrorCode | Save (LString filename) |
BOOL | Valid () |
Properties | |
double | Angle [get] |
The angle of the result, in range of (-180, 180) | |
ILPoint | Center [get] |
The center point of the result. | |
double | GrayScore [get] |
The gray score of the result. Note: The gray score is always 0 when GrayValueWeight is set to 0. | |
double | Scale [get] |
The scale of the result, in range of (0.5, 1.5) means 50% ~ 150% scaled based on the template. | |
double | ScaleX [get] |
The x-coordinate scale of the result, in range of (0.5, 1.5) means 50% ~ 150% scaled based on the template. For isotropic scaling, ScaleX and ScaleY are the same. For anisotropic scaling, Scale is the averaging of ScaleX and ScaleY. | |
double | ScaleY [get] |
The y-coordinate scale of the result, in range of (0.5, 1.5) means 50% ~ 150% scaled based on the template. For isotropic scaling, ScaleX and ScaleY are the same. For anisotropic scaling, Scale is the averaging of ScaleX and ScaleY. | |
double | Score [get] |
The score of the result. | |
double | ShapeScore [get] |
The shape score of the result. | |
![]() | |
LString | Name [get, set] |
Name of the object. By default, the object has no name. In most cases, LPV classes don't make use of the names. The name is drawn on canvas around the object if ILDrawable::SetDrawName() is enabled. More... | |
This interface holds a single pattern matching result and is used to access its properties.
Usually you get the LMatchResult object from the ILMatchResults::Item() function. You can then use this interface to access to the result informations and draw the result on graphics windows.
void Draw | ( | HDC | hdc, |
LPVPatDrawFlags | drawFlags, | ||
double | zoomX, | ||
double | zoomY, | ||
double | panX, | ||
double | panY | ||
) |
Draw the matching result onto provide device context.
[in] | drawFlags | Control the drawing behavior, see LPVPatDrawFlags |
ILPoints* GetFeature | ( | int | level | ) |
Get the transformed feature points at the match result's position.
level | Specify the level of required features, possible values are -1 indicating all levels, |
featurePoints | Return the feature points. |
ILRect* GetRect | ( | ) |
Get the bounding rectangle of the matching result
Get the transformed shape as polylines at the match result's position.
level | Specify the level of required features, possible values are -1 indicating all levels, 0 (default) for level 0 of original size, 1 for level 1 in scaled size. |
shapePolys | Return the shape polylines. |
void Set | ( | ILMatch * | matchObject, |
double | patX, | ||
double | patY, | ||
double | patAngle, | ||
double | patScale, | ||
double | patScore | ||
) |
Set the match result
[in] | matchObject | The corresponding LMatch object. It's used for generating the positions of the bounding rect and features. |
[in] | patX | The x-coordinate of the result's center point. |
[in] | patY | The y-coordinate of the result's center point. |
[in] | patAngle | The angle of the result. |
[in] | patScale | The scale of the result. |
[in] | patScore | The score of the result. |