eVision Python API
Loading...
Searching...
No Matches
eVision.EFoundPattern Class Reference

Represents a single instance of the pattern in the search field, as returned by the EasyFind or EasyMatch finding process. More...

Public Member Functions

None __init__ (self)
 Constructs a eVision.EFoundPattern object.
None __init__ (self, eVision.EFoundPattern other)
 Constructs a eVision.EFoundPattern object.
eVision.ERegion ToRegion (self)
 Creates an eVision.ERegion from the eVision.EFoundPattern.
eVision.EFrame ToFrame (self, bool useAngle, eVision.EFrameScaling frameScaling)
 Creates an eVision.EFrame from the eVision.EFoundPattern.
eVision.EFrame ToFrame (self, bool useAngle, eVision.EFrameScaling frameScaling, eVision.EFrame frame)
 Creates an eVision.EFrame from the eVision.EFoundPattern.
None Draw (self, eVision.EDrawAdapter|None graphicContext, float zoomX, float zoomY, float panX, float panY)
 Draws the found pattern.
None Draw (self, eVision.EDrawAdapter|None graphicContext, float zoomX, float zoomY, float panX)
 Draws the found pattern.
None Draw (self, eVision.EDrawAdapter|None graphicContext, float zoomX, float zoomY)
 Draws the found pattern.
None Draw (self, eVision.EDrawAdapter|None graphicContext, float zoomX)
 Draws the found pattern.
None Draw (self, eVision.EDrawAdapter|None graphicContext)
 Draws the found pattern.
None Draw (self, eVision.EDrawAdapter|None graphicContext, eVision.EFrame frame, float zoomX, float zoomY, float panX, float panY)
 Draws the found pattern.
None Draw (self, eVision.EDrawAdapter|None graphicContext, eVision.EFrame frame, float zoomX, float zoomY, float panX)
 Draws the found pattern.
None Draw (self, eVision.EDrawAdapter|None graphicContext, eVision.EFrame frame, float zoomX, float zoomY)
 Draws the found pattern.
None Draw (self, eVision.EDrawAdapter|None graphicContext, eVision.EFrame frame, float zoomX)
 Draws the found pattern.
None Draw (self, eVision.EDrawAdapter|None graphicContext, eVision.EFrame frame)
 Draws the found pattern.
eVision.EPoint Center (self)
 Reference point of the instance.
float Angle (self)
 Angle of the found instance, in clockwise direction and in the current angle unit.
float Scale (self)
 Scaling factor of the found pattern, in units (not percent).
float ScaleX (self)
 Horizontal Scaling factor of the found pattern, in units (not percent).
float ScaleY (self)
 Vertical Scaling factor of the found pattern, in units (not percent).
float Score (self)
 Matching score of the found pattern, in units (not percent).
float AreaRatio (self)
 When the eVision.EFoundPattern was computed from an eVision.EMatcher: Ratio between the found pattern area inside the search ROI/Region and its complete area.
int LearntPatternIndex (self)
 Returns the index of the pattern learnt by eVision.EPatternFinder.LearnPatterns or eVision.EMatcher.LearnPatterns corresponding to this eVision.EFoundPattern.__init__ or 0 if a single pattern was learnt.
bool DrawBoundingBox (self)
 Flag indicating if the eVision.EFoundPattern.Draw method must draw the bounding box of the FoundPattern.
 DrawBoundingBox (self, bool value)
 Flag indicating if the eVision.EFoundPattern.Draw method must draw the bounding box of the FoundPattern.
bool DrawCenter (self)
 Flag indicating if the eVision.EFoundPattern.Draw method must draw the center of the FoundPattern.
 DrawCenter (self, bool value)
 Flag indicating if the eVision.EFoundPattern.Draw method must draw the center of the FoundPattern.
bool DrawFeaturePoints (self)
 Flag indicating if the eVision.EFoundPattern.Draw method must draw the feature points of the eVision.EFoundPattern.__init__ object.
 DrawFeaturePoints (self, bool value)
 Flag indicating if the eVision.EFoundPattern.Draw method must draw the feature points of the eVision.EFoundPattern.__init__ object.
eVision.EDrawRegion DrawRegion (self)
 Flag indicating if the eVision.EFoundPattern.Draw method must draw the region of the eVision.EFoundPattern object (region that was used during Learn), its contour or neither.
 DrawRegion (self, eVision.EDrawRegion value)
 Flag indicating if the eVision.EFoundPattern.Draw method must draw the region of the eVision.EFoundPattern object (region that was used during Learn), its contour or neither.
bool HasRegion (self)
 Indicates whether there is an eVision.ERegion associated with this eVision.EFoundPattern, i.e.
bool HasFeaturePoints (self)
 Indicates whether there are feature points within this eVision.EFoundPattern.
eVision.EQuadrangle Quadrangle (self)
 Returns the corners of the bounding box of the found pattern.

Detailed Description

Represents a single instance of the pattern in the search field, as returned by the EasyFind or EasyMatch finding process.

Remarks:

eVision.EPatternFinder.Find and eVision.EMatcher.Match return a collection of instances of this class. An eVision.EFoundPattern object represents one found instance, with all the needed information about it.

License(s): EasyFind or EasyMatch

Constructor & Destructor Documentation

◆ __init__() [1/2]

None eVision.EFoundPattern.__init__ ( self)

Constructs a eVision.EFoundPattern object.

◆ __init__() [2/2]

None eVision.EFoundPattern.__init__ ( self,
eVision.EFoundPattern other )

Constructs a eVision.EFoundPattern object.

Parameters
othereVision.EFoundPattern object to be copied

Member Function Documentation

◆ Angle()

float eVision.EFoundPattern.Angle ( self)

Angle of the found instance, in clockwise direction and in the current angle unit.

Remarks:

This returned value is always comprised in the range [- a half turn, + a half turn].

◆ AreaRatio()

float eVision.EFoundPattern.AreaRatio ( self)

When the eVision.EFoundPattern was computed from an eVision.EMatcher: Ratio between the found pattern area inside the search ROI/Region and its complete area.

When the eVision.EFoundPattern was computed from an eVision.EPatternFinder: returns 1.0.

◆ Center()

eVision.EPoint eVision.EFoundPattern.Center ( self)

Reference point of the instance.

Remarks:

By default, this is its center. If the property eVision.EPatternFinder.Pivot has been changed in the eVision.EPatternFinder, the point returns the pivot_ in the instance.

◆ Draw() [1/10]

None eVision.EFoundPattern.Draw ( self,
eVision.EDrawAdapter | None graphicContext )

Draws the found pattern.

Remarks:

This method draws different features of the eVision.EFoundPattern, according to the value of properties eVision.EFoundPattern.DrawFeaturePoints, eVision.EFoundPattern.DrawCenter, eVision.EFoundPattern.DrawBoundingBox and eVision.EFoundPattern.DrawRegion. The zoomX, zoomY, panX and panY parameters can be used to scale and/or translate the drawing operations.

Parameters
graphicContextHandle to the device context of the destination window.

◆ Draw() [2/10]

None eVision.EFoundPattern.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.EFrame frame )

Draws the found pattern.

Remarks:

This method draws different features of the eVision.EFoundPattern, according to the value of properties eVision.EFoundPattern.DrawFeaturePoints, eVision.EFoundPattern.DrawCenter, eVision.EFoundPattern.DrawBoundingBox and eVision.EFoundPattern.DrawRegion. The zoomX, zoomY, panX and panY parameters can be used to scale and/or translate the drawing operations.

Parameters
graphicContextHandle to the device context of the destination window.
frameFrame associated with the pattern.

◆ Draw() [3/10]

None eVision.EFoundPattern.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.EFrame frame,
float zoomX )

Draws the found pattern.

Remarks:

This method draws different features of the eVision.EFoundPattern, according to the value of properties eVision.EFoundPattern.DrawFeaturePoints, eVision.EFoundPattern.DrawCenter, eVision.EFoundPattern.DrawBoundingBox and eVision.EFoundPattern.DrawRegion. The zoomX, zoomY, panX and panY parameters can be used to scale and/or translate the drawing operations.

Parameters
graphicContextHandle to the device context of the destination window.
frameFrame associated with the pattern.
zoomXHorizontal zooming factor.

◆ Draw() [4/10]

None eVision.EFoundPattern.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.EFrame frame,
float zoomX,
float zoomY )

Draws the found pattern.

Remarks:

This method draws different features of the eVision.EFoundPattern, according to the value of properties eVision.EFoundPattern.DrawFeaturePoints, eVision.EFoundPattern.DrawCenter, eVision.EFoundPattern.DrawBoundingBox and eVision.EFoundPattern.DrawRegion. The zoomX, zoomY, panX and panY parameters can be used to scale and/or translate the drawing operations.

Parameters
graphicContextHandle to the device context of the destination window.
frameFrame associated with the pattern.
zoomXHorizontal zooming factor.
zoomYVertical zooming factor. If set to 0, the horizontal zooming factor will be used for isotropic zooming.

◆ Draw() [5/10]

None eVision.EFoundPattern.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.EFrame frame,
float zoomX,
float zoomY,
float panX )

Draws the found pattern.

Remarks:

This method draws different features of the eVision.EFoundPattern, according to the value of properties eVision.EFoundPattern.DrawFeaturePoints, eVision.EFoundPattern.DrawCenter, eVision.EFoundPattern.DrawBoundingBox and eVision.EFoundPattern.DrawRegion. The zoomX, zoomY, panX and panY parameters can be used to scale and/or translate the drawing operations.

Parameters
graphicContextHandle to the device context of the destination window.
frameFrame associated with the pattern.
zoomXHorizontal zooming factor.
zoomYVertical zooming factor. If set to 0, the horizontal zooming factor will be used for isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [6/10]

None eVision.EFoundPattern.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.EFrame frame,
float zoomX,
float zoomY,
float panX,
float panY )

Draws the found pattern.

Remarks:

This method draws different features of the eVision.EFoundPattern, according to the value of properties eVision.EFoundPattern.DrawFeaturePoints, eVision.EFoundPattern.DrawCenter, eVision.EFoundPattern.DrawBoundingBox and eVision.EFoundPattern.DrawRegion. The zoomX, zoomY, panX and panY parameters can be used to scale and/or translate the drawing operations.

Parameters
graphicContextHandle to the device context of the destination window.
frameFrame associated with the pattern.
zoomXHorizontal zooming factor.
zoomYVertical zooming factor. If set to 0, the horizontal zooming factor will be used for isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [7/10]

None eVision.EFoundPattern.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
float zoomX )

Draws the found pattern.

Remarks:

This method draws different features of the eVision.EFoundPattern, according to the value of properties eVision.EFoundPattern.DrawFeaturePoints, eVision.EFoundPattern.DrawCenter, eVision.EFoundPattern.DrawBoundingBox and eVision.EFoundPattern.DrawRegion. The zoomX, zoomY, panX and panY parameters can be used to scale and/or translate the drawing operations.

Parameters
graphicContextHandle to the device context of the destination window.
zoomXHorizontal zooming factor.

◆ Draw() [8/10]

None eVision.EFoundPattern.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
float zoomX,
float zoomY )

Draws the found pattern.

Remarks:

This method draws different features of the eVision.EFoundPattern, according to the value of properties eVision.EFoundPattern.DrawFeaturePoints, eVision.EFoundPattern.DrawCenter, eVision.EFoundPattern.DrawBoundingBox and eVision.EFoundPattern.DrawRegion. The zoomX, zoomY, panX and panY parameters can be used to scale and/or translate the drawing operations.

Parameters
graphicContextHandle to the device context of the destination window.
zoomXHorizontal zooming factor.
zoomYVertical zooming factor. If set to 0, the horizontal zooming factor will be used for isotropic zooming.

◆ Draw() [9/10]

None eVision.EFoundPattern.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
float zoomX,
float zoomY,
float panX )

Draws the found pattern.

Remarks:

This method draws different features of the eVision.EFoundPattern, according to the value of properties eVision.EFoundPattern.DrawFeaturePoints, eVision.EFoundPattern.DrawCenter, eVision.EFoundPattern.DrawBoundingBox and eVision.EFoundPattern.DrawRegion. The zoomX, zoomY, panX and panY parameters can be used to scale and/or translate the drawing operations.

Parameters
graphicContextHandle to the device context of the destination window.
zoomXHorizontal zooming factor.
zoomYVertical zooming factor. If set to 0, the horizontal zooming factor will be used for isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [10/10]

None eVision.EFoundPattern.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
float zoomX,
float zoomY,
float panX,
float panY )

Draws the found pattern.

Remarks:

This method draws different features of the eVision.EFoundPattern, according to the value of properties eVision.EFoundPattern.DrawFeaturePoints, eVision.EFoundPattern.DrawCenter, eVision.EFoundPattern.DrawBoundingBox and eVision.EFoundPattern.DrawRegion. The zoomX, zoomY, panX and panY parameters can be used to scale and/or translate the drawing operations.

Parameters
graphicContextHandle to the device context of the destination window.
zoomXHorizontal zooming factor.
zoomYVertical zooming factor. If set to 0, the horizontal zooming factor will be used for isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ DrawBoundingBox() [1/2]

bool eVision.EFoundPattern.DrawBoundingBox ( self)

Flag indicating if the eVision.EFoundPattern.Draw method must draw the bounding box of the FoundPattern.

Remarks:

The default value is true.

◆ DrawBoundingBox() [2/2]

eVision.EFoundPattern.DrawBoundingBox ( self,
bool value )

Flag indicating if the eVision.EFoundPattern.Draw method must draw the bounding box of the FoundPattern.

Remarks:

The default value is true.

◆ DrawCenter() [1/2]

bool eVision.EFoundPattern.DrawCenter ( self)

Flag indicating if the eVision.EFoundPattern.Draw method must draw the center of the FoundPattern.

Remarks:

The default value is true.

◆ DrawCenter() [2/2]

eVision.EFoundPattern.DrawCenter ( self,
bool value )

Flag indicating if the eVision.EFoundPattern.Draw method must draw the center of the FoundPattern.

Remarks:

The default value is true.

◆ DrawFeaturePoints() [1/2]

bool eVision.EFoundPattern.DrawFeaturePoints ( self)

Flag indicating if the eVision.EFoundPattern.Draw method must draw the feature points of the eVision.EFoundPattern.__init__ object.

Remarks:

When the eVision.EFoundPattern was computed from an eVision.EMatcher, there are no feature points to draw and setting this to true will throw an Exception.

When the eVision.EFoundPattern was computed from an eVision.EPatternFinder in which:

The default value is false.

◆ DrawFeaturePoints() [2/2]

eVision.EFoundPattern.DrawFeaturePoints ( self,
bool value )

Flag indicating if the eVision.EFoundPattern.Draw method must draw the feature points of the eVision.EFoundPattern.__init__ object.

Remarks:

When the eVision.EFoundPattern was computed from an eVision.EMatcher, there are no feature points to draw and setting this to true will throw an Exception.

When the eVision.EFoundPattern was computed from an eVision.EPatternFinder in which:

The default value is false.

◆ DrawRegion() [1/2]

eVision.EDrawRegion eVision.EFoundPattern.DrawRegion ( self)

Flag indicating if the eVision.EFoundPattern.Draw method must draw the region of the eVision.EFoundPattern object (region that was used during Learn), its contour or neither.

If no region was used during learning, setting this to eVision.EDrawRegion.DrawContour or eVision.EDrawRegion.Draw will throw an exception. See eVision.EFoundPattern.HasRegion to check if a region was used during learning.

Remarks:

The default value is eVision.EDrawRegion.NoDraw.

◆ DrawRegion() [2/2]

eVision.EFoundPattern.DrawRegion ( self,
eVision.EDrawRegion value )

Flag indicating if the eVision.EFoundPattern.Draw method must draw the region of the eVision.EFoundPattern object (region that was used during Learn), its contour or neither.

If no region was used during learning, setting this to eVision.EDrawRegion.DrawContour or eVision.EDrawRegion.Draw will throw an exception. See eVision.EFoundPattern.HasRegion to check if a region was used during learning.

Remarks:

The default value is eVision.EDrawRegion.NoDraw.

◆ HasFeaturePoints()

bool eVision.EFoundPattern.HasFeaturePoints ( self)

Indicates whether there are feature points within this eVision.EFoundPattern.

See eVision.EFoundPattern.DrawFeaturePoints to draw the feature points.

◆ HasRegion()

bool eVision.EFoundPattern.HasRegion ( self)

Indicates whether there is an eVision.ERegion associated with this eVision.EFoundPattern, i.e.

whether an eVision.ERegion was used during the learning of the pattern. See eVision.EFoundPattern.DrawRegion to draw the region.

◆ LearntPatternIndex()

int eVision.EFoundPattern.LearntPatternIndex ( self)

Returns the index of the pattern learnt by eVision.EPatternFinder.LearnPatterns or eVision.EMatcher.LearnPatterns corresponding to this eVision.EFoundPattern.__init__ or 0 if a single pattern was learnt.

◆ Quadrangle()

eVision.EQuadrangle eVision.EFoundPattern.Quadrangle ( self)

Returns the corners of the bounding box of the found pattern.

◆ Scale()

float eVision.EFoundPattern.Scale ( self)

Scaling factor of the found pattern, in units (not percent).

Remarks:

Querying this will throw an Exception if eVision.EFoundPattern.ScaleX != eVision.EFoundPattern.ScaleY.

◆ ScaleX()

float eVision.EFoundPattern.ScaleX ( self)

Horizontal Scaling factor of the found pattern, in units (not percent).

Remarks:

eVision.EPatternFinder does not support anisotropic scaling. In that case, this will return the same result as eVision.EFoundPattern.Scale.

◆ ScaleY()

float eVision.EFoundPattern.ScaleY ( self)

Vertical Scaling factor of the found pattern, in units (not percent).

Remarks:

eVision.EPatternFinder does not support anisotropic scaling. In that case, this will return the same result as eVision.EFoundPattern.Scale.

◆ Score()

float eVision.EFoundPattern.Score ( self)

Matching score of the found pattern, in units (not percent).

Remarks:

The matching score range is [-1.0..1.0].

◆ ToFrame() [1/2]

eVision.EFrame eVision.EFoundPattern.ToFrame ( self,
bool useAngle,
eVision.EFrameScaling frameScaling )

Creates an eVision.EFrame from the eVision.EFoundPattern.

Parameters
useAngleWhether to use the angle of the EFoundPattern in the frame.
frameScalingHow to handle the scale of the frame.

◆ ToFrame() [2/2]

eVision.EFrame eVision.EFoundPattern.ToFrame ( self,
bool useAngle,
eVision.EFrameScaling frameScaling,
eVision.EFrame frame )

Creates an eVision.EFrame from the eVision.EFoundPattern.

Parameters
useAngleWhether to use the angle of the EFoundPattern in the frame.
frameScalingHow to handle the scale of the frame.
frameParent frame. Used when the eVision.EFoundPattern was read using a frame.

◆ ToRegion()

eVision.ERegion eVision.EFoundPattern.ToRegion ( self)

Creates an eVision.ERegion from the eVision.EFoundPattern.

If an eVision.ERegion was used to learn the pattern (see eVision.EFoundPattern.HasRegion), returns the learned region transformed to the position of the found pattern. Otherwise, return an eVision.ERegion representing all the pixels which are within the bounding box of the found pattern.