Leaper Vision Toolkit
中文 / English 2.x
Public Member Functions | Properties
ILMatchResult Interface Reference

This interface holds a single pattern matching result and is used to access its properties. More...

Inheritance diagram for ILMatchResult:
ILObject LMatchResult

Public Member Functions

void Draw (HDC hdc, LPVPatDrawFlags drawFlags, double zoomX, double zoomY, double panX, double panY)
 
ILPointsGetFeature (int level)
 
ILRectGetRect ()
 
LArray< ILPolygon * > GetShape (int level)
 
void Set (ILMatch *matchObject, double patX, double patY, double patAngle, double patScale, double patScore)
 
- Public Member Functions inherited from ILObject
ILObjectCopy ()
 
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.
 

Detailed Description

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.

Example Code

Member Function Documentation

◆ Draw()

void Draw ( HDC  hdc,
LPVPatDrawFlags  drawFlags,
double  zoomX,
double  zoomY,
double  panX,
double  panY 
)

Draw the matching result onto provide device context.

Parameters
[in]drawFlagsControl the drawing behavior, see LPVPatDrawFlags
See also
Use Draw Functions
Remarks
This function is currently not available on Linux / MacOS platform.

◆ GetFeature()

ILPoints* GetFeature ( int  level)

Get the transformed feature points at the match result's position.

Parameters
levelSpecify the level of required features, possible values are -1 indicating all levels,
Return values
featurePointsReturn the feature points.
Since
2.5.0

◆ GetRect()

ILRect* GetRect ( )

Get the bounding rectangle of the matching result

◆ GetShape()

LArray< ILPolygon *> GetShape ( int  level)

Get the transformed shape as polylines at the match result's position.

Parameters
levelSpecify 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.
Return values
shapePolysReturn the shape polylines.
Remarks
In order to keep the indexes of shape polylines consistent, for the pruned shape polylines via Prune(), we'll return empty LPolygon objects in the shape polylines.
Since
2.5.0

◆ Set()

void Set ( ILMatch matchObject,
double  patX,
double  patY,
double  patAngle,
double  patScale,
double  patScore 
)

Set the match result

Parameters
[in]matchObjectThe corresponding LMatch object. It's used for generating the positions of the bounding rect and features.
[in]patXThe x-coordinate of the result's center point.
[in]patYThe y-coordinate of the result's center point.
[in]patAngleThe angle of the result.
[in]patScaleThe scale of the result.
[in]patScoreThe score of the result.