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.

Properties

 Center = property(_Center__getter, None)
 Reference point of the instance.
 Angle = property(_Angle__getter, None)
 Angle of the found instance, in clockwise direction and in the current angle unit.
 Scale = property(_Scale__getter, None)
 Scaling factor of the found pattern, in units (not percent).
 ScaleX = property(_ScaleX__getter, None)
 Horizontal Scaling factor of the found pattern, in units (not percent).
 ScaleY = property(_ScaleY__getter, None)
 Vertical Scaling factor of the found pattern, in units (not percent).
 Score = property(_Score__getter, None)
 Matching score of the found pattern, in units (not percent).
 AreaRatio = property(_AreaRatio__getter, None)
 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.
 LearntPatternIndex = property(_LearntPatternIndex__getter, None)
 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.
 DrawBoundingBox = property(_DrawBoundingBox__getter, _DrawBoundingBox__setter)
 Flag indicating if the eVision.EFoundPattern.Draw method must draw the bounding box of the FoundPattern.
 DrawCenter = property(_DrawCenter__getter, _DrawCenter__setter)
 Flag indicating if the eVision.EFoundPattern.Draw method must draw the center of the FoundPattern.
 DrawFeaturePoints = property(_DrawFeaturePoints__getter, _DrawFeaturePoints__setter)
 Flag indicating if the eVision.EFoundPattern.Draw method must draw the feature points of the eVision.EFoundPattern.__init__ object.
 DrawRegion = property(_DrawRegion__getter, _DrawRegion__setter)
 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.
 HasRegion = property(_HasRegion__getter, None)
 Indicates whether there is an eVision.ERegion associated with this eVision.EFoundPattern, i.e.
 HasFeaturePoints = property(_HasFeaturePoints__getter, None)
 Indicates whether there are feature points within this eVision.EFoundPattern.
 Quadrangle = property(_Quadrangle__getter, None)
 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

◆ 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.

◆ 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.

Property Documentation

◆ Angle

eVision.EFoundPattern.Angle = property(_Angle__getter, None)
static

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

eVision.EFoundPattern.AreaRatio = property(_AreaRatio__getter, None)
static

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.EFoundPattern.Center = property(_Center__getter, None)
static

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.

◆ DrawBoundingBox

eVision.EFoundPattern.DrawBoundingBox = property(_DrawBoundingBox__getter, _DrawBoundingBox__setter)
static

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

Remarks:

The default value is true.

◆ DrawCenter

eVision.EFoundPattern.DrawCenter = property(_DrawCenter__getter, _DrawCenter__setter)
static

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

Remarks:

The default value is true.

◆ DrawFeaturePoints

eVision.EFoundPattern.DrawFeaturePoints = property(_DrawFeaturePoints__getter, _DrawFeaturePoints__setter)
static

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

eVision.EFoundPattern.DrawRegion = property(_DrawRegion__getter, _DrawRegion__setter)
static

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

eVision.EFoundPattern.HasFeaturePoints = property(_HasFeaturePoints__getter, None)
static

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

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

◆ HasRegion

eVision.EFoundPattern.HasRegion = property(_HasRegion__getter, None)
static

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

eVision.EFoundPattern.LearntPatternIndex = property(_LearntPatternIndex__getter, None)
static

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.EFoundPattern.Quadrangle = property(_Quadrangle__getter, None)
static

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

◆ Scale

eVision.EFoundPattern.Scale = property(_Scale__getter, None)
static

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

eVision.EFoundPattern.ScaleX = property(_ScaleX__getter, None)
static

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

eVision.EFoundPattern.ScaleY = property(_ScaleY__getter, None)
static

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

eVision.EFoundPattern.Score = property(_Score__getter, None)
static

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

Remarks:

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