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

Manages a complete matching context in EasyMatch. More...

Public Member Functions

None __init__ (self)
 Constructs a matching context.
None __init__ (self, int maxNumDOF)
 Constructs a matching context.
None __init__ (self, eVision.EMatcher other)
 Constructs a matching context.
None CopyTo (self, eVision.EMatcher other)
 Copies all the data of the current eVision.EMatcher object into another eVision.EMatcher object and returns it.
None Save (self, str path)
 Saves the eVision.EMatcher.
None Save (self, eVision.ESerializer|None serializer)
 Saves the eVision.EMatcher.
None Load (self, str path)
 Loads the eVision.EMatcher.
None Load (self, eVision.ESerializer|None serializer)
 Loads the eVision.EMatcher.
None LearnPattern (self, eVision.EROIBW8|None pattern)
 Learns a pattern to subsequently match in an image.
None LearnPattern (self, eVision.EROIC24|None pattern)
 Learns a pattern to subsequently match in an image.
None LearnPattern (self, eVision.EROIBW8|None pattern, eVision.ERegion region)
 Learns a pattern to subsequently match in an image.
None LearnPattern (self, eVision.EROIC24|None pattern, eVision.ERegion region)
 Learns a pattern to subsequently match in an image.
None LearnPattern (self, eVision.EROIBW8|None pattern, eVision.EFrame frame)
 Learns a pattern to subsequently match in an image.
None LearnPattern (self, eVision.EROIC24|None pattern, eVision.EFrame frame)
 Learns a pattern to subsequently match in an image.
None LearnPattern (self, eVision.EROIBW8|None pattern, eVision.ERegion region, eVision.EFrame frame)
 Learns a pattern to subsequently match in an image.
None LearnPattern (self, eVision.EROIC24|None pattern, eVision.ERegion region, eVision.EFrame frame)
 Learns a pattern to subsequently match in an image.
None LearnPatterns (self, list[eVision._eVision.EBaseROI|None] patterns)
 Learns multiple (at least 2) patterns.
None LearnPatterns (self, list[eVision._eVision.EBaseROI|None] patterns, list[eVision._eVision.ERegion|None] regions)
 Learns multiple (at least 2) patterns.
None LearnPatterns (self, list[eVision._eVision.EBaseROI|None] patterns, list[eVision._eVision.ERegion|None] regions, eVision.EFrame frame)
 Learns multiple (at least 2) patterns.
None LearnPatterns (self, list[eVision._eVision.EBaseROI|None] patterns, eVision.EFrame frame)
 Learns multiple (at least 2) patterns.
None ClearImage (self)
 Releases the pointer to the image object that has been passed to the eVision.EMatcher object.
None CopyLearntPattern (self, eVision.EImageBW8 image, int learntPatternIndex)
 Copies the learned pattern in the supplied image.
None CopyLearntPattern (self, eVision.EImageBW8 image)
 Copies the learned pattern in the supplied image.
None CopyLearntPattern (self, eVision.EImageC24 image, int learntPatternIndex)
 Copies the learned pattern in the supplied image.
None CopyLearntPattern (self, eVision.EImageC24 image)
 Copies the learned pattern in the supplied image.
list[eVision._eVision.EFoundPattern] Match (self, eVision.EROIBW8|None image)
 Matches the pattern against an image.
list[eVision._eVision.EFoundPattern] Match (self, eVision.EROIBW8|None image, eVision.ERegion region)
 Matches the pattern against an image.
list[eVision._eVision.EFoundPattern] Match (self, eVision.EROIC24|None image)
 Matches the pattern against an image.
list[eVision._eVision.EFoundPattern] Match (self, eVision.EROIC24|None image, eVision.ERegion region)
 Matches the pattern against an image.
list[eVision._eVision.EFoundPattern] Match (self, eVision.EROIBW8|None image, eVision.EFrame frame)
 Matches the pattern against an image.
list[eVision._eVision.EFoundPattern] Match (self, eVision.EROIBW8|None image, eVision.ERegion region, eVision.EFrame frame)
 Matches the pattern against an image.
list[eVision._eVision.EFoundPattern] Match (self, eVision.EROIC24|None image, eVision.EFrame frame)
 Matches the pattern against an image.
list[eVision._eVision.EFoundPattern] Match (self, eVision.EROIC24|None image, eVision.ERegion region, eVision.EFrame frame)
 Matches the pattern against an image.
float GetAngleStep (self, int reduction, int learntPatternIndex)
 Gets the angle step used at the given reduction.
float GetAngleStep (self, int reduction)
 Gets the angle step used at the given reduction.
float GetScaleStep (self, int reduction, int learntPatternIndex)
 Gets the scale step used at the given reduction.
float GetScaleStep (self, int reduction)
 Gets the scale step used at the given reduction.
float GetScaleXStep (self, int reduction, int learntPatternIndex)
 Gets the scale step used on the X axis at the given reduction.
float GetScaleXStep (self, int reduction)
 Gets the scale step used on the X axis at the given reduction.
float GetScaleYStep (self, int reduction, int learntPatternIndex)
 Gets the scale step used on the Y axis at the given reduction.
float GetScaleYStep (self, int reduction)
 Gets the scale step used on the Y axis at the given reduction.
eVision.EMatchPosition GetPosition (self, int index)
 Returns an eVision.EMatchPosition object containing the position coordinates.
None DrawPosition (self, eVision.EDrawAdapter|None graphicContext, int index, bool bCorner, float zoomX, float zoomY, float panX, float panY)
 Draws a graphical representation of a given occurrence of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.
None DrawPosition (self, eVision.EDrawAdapter|None graphicContext, int index, bool bCorner, float zoomX, float zoomY, float panX)
 Draws a graphical representation of a given occurrence of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.
None DrawPosition (self, eVision.EDrawAdapter|None graphicContext, int index, bool bCorner, float zoomX, float zoomY)
 Draws a graphical representation of a given occurrence of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.
None DrawPosition (self, eVision.EDrawAdapter|None graphicContext, int index, bool bCorner, float zoomX)
 Draws a graphical representation of a given occurrence of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.
None DrawPosition (self, eVision.EDrawAdapter|None graphicContext, int index, bool bCorner)
 Draws a graphical representation of a given occurrence of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.
None DrawPosition (self, eVision.EDrawAdapter|None graphicContext, int index)
 Draws a graphical representation of a given occurrence of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.
None DrawPositions (self, eVision.EDrawAdapter|None graphicContext, bool bCorner, float zoomX, float zoomY, float panX, float panY)
 Draws a graphical representation of all occurrences of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.
None DrawPositions (self, eVision.EDrawAdapter|None graphicContext, bool bCorner, float zoomX, float zoomY, float panX)
 Draws a graphical representation of all occurrences of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.
None DrawPositions (self, eVision.EDrawAdapter|None graphicContext, bool bCorner, float zoomX, float zoomY)
 Draws a graphical representation of all occurrences of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.
None DrawPositions (self, eVision.EDrawAdapter|None graphicContext, bool bCorner, float zoomX)
 Draws a graphical representation of all occurrences of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.
None DrawPositions (self, eVision.EDrawAdapter|None graphicContext, bool bCorner)
 Draws a graphical representation of all occurrences of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.
None DrawPositions (self, eVision.EDrawAdapter|None graphicContext)
 Draws a graphical representation of all occurrences of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.
int GetPatternWidth (self, int learntPatternIndex)
 Learned pattern width.
int GetPatternHeight (self, int learntPatternIndex)
 Learned pattern height.
int LearnTimeOut (self)
 Time-out for the eVision.EMatcher.LearnPattern and eVision.EMatcher.LearnPatterns methods.
 LearnTimeOut (self, int value)
 Time-out for the eVision.EMatcher.LearnPattern and eVision.EMatcher.LearnPatterns methods.
int MatchTimeOut (self)
 Time-out for the eVision.EMatcher.Match method.
 MatchTimeOut (self, int value)
 Time-out for the eVision.EMatcher.Match method.
int NumLearnedPatterns (self)
 Indicates the number of patterns learnt.
bool PatternLearnt (self)
 Returns true after a learning operation has been successfully performed, indicating that the eVision.EMatcher object is ready for matching, and false otherwise.
bool LearningHasRegion (self)
 Indicates whether a eVision.ERegion was used alongside the last learned pattern.
eVision.EIntSize Extension (self)
 Sets/Gets the extension of the matching ROI, i.e.
 Extension (self, eVision.EIntSize value)
 Sets/Gets the extension of the matching ROI, i.e.
int MinReducedArea (self)
 Minimum reduced area parameter.
 MinReducedArea (self, int value)
 Minimum reduced area parameter.
bool AdvancedLearning (self)
 Toggle advanced learning.
 AdvancedLearning (self, bool value)
 Toggle advanced learning.
int DontCareThreshold (self)
 "Don't care" threshold.
 DontCareThreshold (self, int value)
 "Don't care" threshold.
eVision.ECorrelationMode CorrelationMode (self)
 Correlation mode.
 CorrelationMode (self, eVision.ECorrelationMode value)
 Correlation mode.
eVision.EMatchContrastMode ContrastMode (self)
 Contrast mode.
 ContrastMode (self, eVision.EMatchContrastMode value)
 Contrast mode.
int MaxPositions (self)
 Maximum number of positions.
 MaxPositions (self, int value)
 Maximum number of positions.
int MaxInitialPositions (self)
 Maximum number of positions at the first stage of the matching process.
 MaxInitialPositions (self, int value)
 Maximum number of positions at the first stage of the matching process.
float InitialMinScore (self)
 Minimum score applied as a selection criterion in the early stages of the matching process.
 InitialMinScore (self, float value)
 Minimum score applied as a selection criterion in the early stages of the matching process.
float MinScore (self)
 Minimum score.
 MinScore (self, float value)
 Minimum score.
float MinAngle (self)
 Minimum angle, in the current angle unit.
 MinAngle (self, float value)
 Minimum angle, in the current angle unit.
float MaxAngle (self)
 Maximum angle, in the current angle unit.
 MaxAngle (self, float value)
 Maximum angle, in the current angle unit.
float MinScale (self)
 Minimum scale factor for isotropic scaling.
 MinScale (self, float value)
 Minimum scale factor for isotropic scaling.
float MaxScale (self)
 Maximum scale factor for isotropic scaling.
 MaxScale (self, float value)
 Maximum scale factor for isotropic scaling.
float MinScaleX (self)
 Minimum horizontal scale factor for anisotropic scaling.
 MinScaleX (self, float value)
 Minimum horizontal scale factor for anisotropic scaling.
float MaxScaleX (self)
 Maximum horizontal scale factor for anisotropic scaling.
 MaxScaleX (self, float value)
 Maximum horizontal scale factor for anisotropic scaling.
float MinScaleY (self)
 Minimum vertical scale factor for anisotropic scaling.
 MinScaleY (self, float value)
 Minimum vertical scale factor for anisotropic scaling.
float MaxScaleY (self)
 Maximum vertical scale factor for anisotropic scaling.
 MaxScaleY (self, float value)
 Maximum vertical scale factor for anisotropic scaling.
bool IsotropicScale (self)
 Flag indicating whether isotropic (as opposed to anisotropic) scaling is used.
eVision.ESize PixelDimensions (self)
 Gets/Sets the physical pixel dimensions.
 PixelDimensions (self, eVision.ESize value)
 Gets/Sets the physical pixel dimensions.
bool Interpolate (self)
 Interpolation mode.
 Interpolate (self, bool value)
 Interpolation mode.
bool EnableEarlyCandidateRejection (self)
 Whether to remove bad candidates in the early phases of the processing or not.
 EnableEarlyCandidateRejection (self, bool value)
 Whether to remove bad candidates in the early phases of the processing or not.
eVision.EFilteringMode FilteringMode (self)
 Filtering mode.
 FilteringMode (self, eVision.EFilteringMode value)
 Filtering mode.
float MaxOverlap (self)
 Overlapping tolerance.
 MaxOverlap (self, float value)
 Overlapping tolerance.
int NumPositions (self)
 Number of good matches found, as defined by eVision.EMatcher.MinScore and eVision.EMatcher.MaxPositions properties.
list[eVision._eVision.EMatchPosition] Positions (self)
 Returns a vector of eVision.EMatchPosition objects, each containing the position coordinates and other matching results.
int NumReductions (self)
 Number of reduction steps used in the matching process.
eVision.EImageType PatternType (self)
 Pixel type of the learned pattern.
int FinalReduction (self)
 Index of the last reduction.
 FinalReduction (self, int value)
 Index of the last reduction.
int PatternWidth (self)
 Learned pattern width.
int PatternHeight (self)
 Learned pattern height.

Static Public Member Functions

int GetVersion ()
 Version number of the eVision.EMatcher object.

Detailed Description

Manages a complete matching context in EasyMatch.

Remarks:

A matching context consists of a learned pattern and of the parameters required to locate one or more instances of the pattern in a search field.

License(s): EasyMatch

Constructor & Destructor Documentation

◆ __init__() [1/3]

None eVision.EMatcher.__init__ ( self)

Constructs a matching context.

Remarks:

With the default constructor (no argument), all parameters are initialized to their respective default values. The copy constructor constructs a matching context based on a pre-existing eVision.EMatcher object. The last constructor constructs a matching context with a specified number of degrees of freedom. maximumNumberOfDegreesOfFreedom is the maximum number of degrees of freedom that the eVision.EMatcher object being constructed will be allowed to use during its life. All other parameters are initialized to their respective default values. The degrees of freedom for a matching operation are the translation (2 modes), the rotation (1 mode), the isotropic scaling (1 mode) and the anisotropic scaling (1 more mode). There is no way to modify this parameter for an existing eVision.EMatcher object. The default value for maximumNumberOfDegreesOfFreedom is 5, that is the maximum value. The minimum value for the number of degrees of freedom is 2, in order to allow, at least, the pattern translation.

◆ __init__() [2/3]

None eVision.EMatcher.__init__ ( self,
int maxNumDOF )

Constructs a matching context.

Remarks:

With the default constructor (no argument), all parameters are initialized to their respective default values. The copy constructor constructs a matching context based on a pre-existing eVision.EMatcher object. The last constructor constructs a matching context with a specified number of degrees of freedom. maximumNumberOfDegreesOfFreedom is the maximum number of degrees of freedom that the eVision.EMatcher object being constructed will be allowed to use during its life. All other parameters are initialized to their respective default values. The degrees of freedom for a matching operation are the translation (2 modes), the rotation (1 mode), the isotropic scaling (1 mode) and the anisotropic scaling (1 more mode). There is no way to modify this parameter for an existing eVision.EMatcher object. The default value for maximumNumberOfDegreesOfFreedom is 5, that is the maximum value. The minimum value for the number of degrees of freedom is 2, in order to allow, at least, the pattern translation.

Parameters
maxNumDOFMaximum number of degrees of freedom (this number must be comprised between 2 and 5).

◆ __init__() [3/3]

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

Constructs a matching context.

Remarks:

With the default constructor (no argument), all parameters are initialized to their respective default values. The copy constructor constructs a matching context based on a pre-existing eVision.EMatcher object. The last constructor constructs a matching context with a specified number of degrees of freedom. maximumNumberOfDegreesOfFreedom is the maximum number of degrees of freedom that the eVision.EMatcher object being constructed will be allowed to use during its life. All other parameters are initialized to their respective default values. The degrees of freedom for a matching operation are the translation (2 modes), the rotation (1 mode), the isotropic scaling (1 mode) and the anisotropic scaling (1 more mode). There is no way to modify this parameter for an existing eVision.EMatcher object. The default value for maximumNumberOfDegreesOfFreedom is 5, that is the maximum value. The minimum value for the number of degrees of freedom is 2, in order to allow, at least, the pattern translation.

Parameters
otherAnother eVision.EMatcher object to be copied in the new eVision.EMatcher object.

Member Function Documentation

◆ AdvancedLearning() [1/2]

bool eVision.EMatcher.AdvancedLearning ( self)

Toggle advanced learning.

Remarks:

When enabled, the advanced learning process will try to optimize learning parameters like the Minimum Reduced Area. Advanced learning uses the whole image context (parent EImage for an EROI) to optimize the parameters. The learning will take more time (from 1x to 5x longer) but the matching probability could be improved. The improvement strongly depends on the pattern source image.

The advanced learning is automatically disabled when the method eVision.EMatcher.MinReducedArea is called. In addition, advanced learning does not work when using eVision.EMatcher.DontCareThreshold and a masked image. However, it is compatible with the overload of eVision.EMatcher.LearnPattern taking an eVision.ERegion, which allows to do the same as eVision.EMatcher.DontCareThreshold.

◆ AdvancedLearning() [2/2]

eVision.EMatcher.AdvancedLearning ( self,
bool value )

Toggle advanced learning.

Remarks:

When enabled, the advanced learning process will try to optimize learning parameters like the Minimum Reduced Area. Advanced learning uses the whole image context (parent EImage for an EROI) to optimize the parameters. The learning will take more time (from 1x to 5x longer) but the matching probability could be improved. The improvement strongly depends on the pattern source image.

The advanced learning is automatically disabled when the method eVision.EMatcher.MinReducedArea is called. In addition, advanced learning does not work when using eVision.EMatcher.DontCareThreshold and a masked image. However, it is compatible with the overload of eVision.EMatcher.LearnPattern taking an eVision.ERegion, which allows to do the same as eVision.EMatcher.DontCareThreshold.

◆ ClearImage()

None eVision.EMatcher.ClearImage ( self)

Releases the pointer to the image object that has been passed to the eVision.EMatcher object.

Remarks:

It is the way to tell to the eVision.EMatcher object that its pointer is not valid anymore. The eVision.EMatcher.Match method keeps a copy of the image pointer given as parameter. So, if the user deletes this pointer, the eVision.EMatcher object should be informed.

◆ ContrastMode() [1/2]

eVision.EMatchContrastMode eVision.EMatcher.ContrastMode ( self)

Contrast mode.

Remarks:

By default, the contrast mode is set to eVision.EMatchContrastMode.Normal.

◆ ContrastMode() [2/2]

eVision.EMatcher.ContrastMode ( self,
eVision.EMatchContrastMode value )

Contrast mode.

Remarks:

By default, the contrast mode is set to eVision.EMatchContrastMode.Normal.

◆ CopyLearntPattern() [1/4]

None eVision.EMatcher.CopyLearntPattern ( self,
eVision.EImageBW8 image )

Copies the learned pattern in the supplied image.

If no pattern has been learned, an exception with code eVision.EError.NoPatternLearnt will be thrown.

Parameters
imagePointer to the image in which the learned pattern will be returned.

◆ CopyLearntPattern() [2/4]

None eVision.EMatcher.CopyLearntPattern ( self,
eVision.EImageBW8 image,
int learntPatternIndex )

Copies the learned pattern in the supplied image.

If no pattern has been learned, an exception with code eVision.EError.NoPatternLearnt will be thrown.

Parameters
imagePointer to the image in which the learned pattern will be returned.
learntPatternIndexIndex of the learnt pattern. Default: 0.

◆ CopyLearntPattern() [3/4]

None eVision.EMatcher.CopyLearntPattern ( self,
eVision.EImageC24 image )

Copies the learned pattern in the supplied image.

If no pattern has been learned, an exception with code eVision.EError.NoPatternLearnt will be thrown.

Parameters
imagePointer to the image in which the learned pattern will be returned.

◆ CopyLearntPattern() [4/4]

None eVision.EMatcher.CopyLearntPattern ( self,
eVision.EImageC24 image,
int learntPatternIndex )

Copies the learned pattern in the supplied image.

If no pattern has been learned, an exception with code eVision.EError.NoPatternLearnt will be thrown.

Parameters
imagePointer to the image in which the learned pattern will be returned.
learntPatternIndexIndex of the learnt pattern. Default: 0.

◆ CopyTo()

None eVision.EMatcher.CopyTo ( self,
eVision.EMatcher other )

Copies all the data of the current eVision.EMatcher object into another eVision.EMatcher object and returns it.

Parameters
otherReference to the eVision.EMatcher object in which the current eVision.EMatcher object parameters are to be copied.

◆ CorrelationMode() [1/2]

eVision.ECorrelationMode eVision.EMatcher.CorrelationMode ( self)

Correlation mode.

Remarks:

This property tells what normalization rule is used to correlate the pattern to the image. By default, the correlation mode is set to eVision.ECorrelationMode.Normalized.

◆ CorrelationMode() [2/2]

eVision.EMatcher.CorrelationMode ( self,
eVision.ECorrelationMode value )

Correlation mode.

Remarks:

This property tells what normalization rule is used to correlate the pattern to the image. By default, the correlation mode is set to eVision.ECorrelationMode.Normalized.

◆ DontCareThreshold() [1/2]

int eVision.EMatcher.DontCareThreshold ( self)

"Don't care" threshold.

Remarks:

If the pattern cannot be inscribed in a rectangle because there are foreign objects in a close neighborhood, mismatches can be avoided by using "don't care" pixels: all the pattern pixels whose value is strictly below DontCareThreshold will be ignored. By default, this property is set to 0: no "don't care" pixel exists.

Note
When you use the "don't care" feature, either the pattern is well contrasted from its background -then set DontCareThreshold to an appropriate thresholding value- or it is not -then set the background pixels of the pattern to some low value (by a masking operation) and set DontCareThreshold to this low value plus one.

In addition, eVision.EMatcher.AdvancedLearning does not work when using a don't care threshold and a masked image. However, it is compatible with the overload of eVision.EMatcher.LearnPattern taking an eVision.ERegion, which allows to do the same as eVision.EMatcher.DontCareThreshold.

◆ DontCareThreshold() [2/2]

eVision.EMatcher.DontCareThreshold ( self,
int value )

"Don't care" threshold.

Remarks:

If the pattern cannot be inscribed in a rectangle because there are foreign objects in a close neighborhood, mismatches can be avoided by using "don't care" pixels: all the pattern pixels whose value is strictly below DontCareThreshold will be ignored. By default, this property is set to 0: no "don't care" pixel exists.

Note
When you use the "don't care" feature, either the pattern is well contrasted from its background -then set DontCareThreshold to an appropriate thresholding value- or it is not -then set the background pixels of the pattern to some low value (by a masking operation) and set DontCareThreshold to this low value plus one.

In addition, eVision.EMatcher.AdvancedLearning does not work when using a don't care threshold and a masked image. However, it is compatible with the overload of eVision.EMatcher.LearnPattern taking an eVision.ERegion, which allows to do the same as eVision.EMatcher.DontCareThreshold.

◆ DrawPosition() [1/6]

None eVision.EMatcher.DrawPosition ( self,
eVision.EDrawAdapter | None graphicContext,
int index )

Draws a graphical representation of a given occurrence of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.

When multiple patterns are learned, only the positions corresponding to the first pattern are drawn.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used.

Deprecated

Use the eVision.EFoundPattern.Draw method of the eVision.EFoundPattern objects returned by eVision.EMatcher.Match instead.

Deprecated in version 25.2. Scheduled to be removed in version 27.6.

Parameters
graphicContextHandle of the device context on which to draw.
indexOccurrence index, in range 0..NumPositions-1.

◆ DrawPosition() [2/6]

None eVision.EMatcher.DrawPosition ( self,
eVision.EDrawAdapter | None graphicContext,
int index,
bool bCorner )

Draws a graphical representation of a given occurrence of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.

When multiple patterns are learned, only the positions corresponding to the first pattern are drawn.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used.

Deprecated

Use the eVision.EFoundPattern.Draw method of the eVision.EFoundPattern objects returned by eVision.EMatcher.Match instead.

Deprecated in version 25.2. Scheduled to be removed in version 27.6.

Parameters
graphicContextHandle of the device context on which to draw.
indexOccurrence index, in range 0..NumPositions-1.
bCornertrue if the corner mark is to be drawn. false by default. (This mark is useful when large rotations are allowed.)

◆ DrawPosition() [3/6]

None eVision.EMatcher.DrawPosition ( self,
eVision.EDrawAdapter | None graphicContext,
int index,
bool bCorner,
float zoomX )

Draws a graphical representation of a given occurrence of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.

When multiple patterns are learned, only the positions corresponding to the first pattern are drawn.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used.

Deprecated

Use the eVision.EFoundPattern.Draw method of the eVision.EFoundPattern objects returned by eVision.EMatcher.Match instead.

Deprecated in version 25.2. Scheduled to be removed in version 27.6.

Parameters
graphicContextHandle of the device context on which to draw.
indexOccurrence index, in range 0..NumPositions-1.
bCornertrue if the corner mark is to be drawn. false by default. (This mark is useful when large rotations are allowed.)
zoomXHorizontal zooming factor. By default, true scale is used.

◆ DrawPosition() [4/6]

None eVision.EMatcher.DrawPosition ( self,
eVision.EDrawAdapter | None graphicContext,
int index,
bool bCorner,
float zoomX,
float zoomY )

Draws a graphical representation of a given occurrence of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.

When multiple patterns are learned, only the positions corresponding to the first pattern are drawn.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used.

Deprecated

Use the eVision.EFoundPattern.Draw method of the eVision.EFoundPattern objects returned by eVision.EMatcher.Match instead.

Deprecated in version 25.2. Scheduled to be removed in version 27.6.

Parameters
graphicContextHandle of the device context on which to draw.
indexOccurrence index, in range 0..NumPositions-1.
bCornertrue if the corner mark is to be drawn. false by default. (This mark is useful when large rotations are allowed.)
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.

◆ DrawPosition() [5/6]

None eVision.EMatcher.DrawPosition ( self,
eVision.EDrawAdapter | None graphicContext,
int index,
bool bCorner,
float zoomX,
float zoomY,
float panX )

Draws a graphical representation of a given occurrence of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.

When multiple patterns are learned, only the positions corresponding to the first pattern are drawn.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used.

Deprecated

Use the eVision.EFoundPattern.Draw method of the eVision.EFoundPattern objects returned by eVision.EMatcher.Match instead.

Deprecated in version 25.2. Scheduled to be removed in version 27.6.

Parameters
graphicContextHandle of the device context on which to draw.
indexOccurrence index, in range 0..NumPositions-1.
bCornertrue if the corner mark is to be drawn. false by default. (This mark is useful when large rotations are allowed.)
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ DrawPosition() [6/6]

None eVision.EMatcher.DrawPosition ( self,
eVision.EDrawAdapter | None graphicContext,
int index,
bool bCorner,
float zoomX,
float zoomY,
float panX,
float panY )

Draws a graphical representation of a given occurrence of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.

When multiple patterns are learned, only the positions corresponding to the first pattern are drawn.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used.

Deprecated

Use the eVision.EFoundPattern.Draw method of the eVision.EFoundPattern objects returned by eVision.EMatcher.Match instead.

Deprecated in version 25.2. Scheduled to be removed in version 27.6.

Parameters
graphicContextHandle of the device context on which to draw.
indexOccurrence index, in range 0..NumPositions-1.
bCornertrue if the corner mark is to be drawn. false by default. (This mark is useful when large rotations are allowed.)
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ DrawPositions() [1/6]

None eVision.EMatcher.DrawPositions ( self,
eVision.EDrawAdapter | None graphicContext )

Draws a graphical representation of all occurrences of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.

When multiple patterns are learned, only the positions corresponding to the first pattern are drawn.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used for all occurrences (to vary the colors, draw the objects separately using the eVision.EMatcher.DrawPosition method instead).

Deprecated

Use the eVision.EFoundPattern.Draw method of the eVision.EFoundPattern objects returned by eVision.EMatcher.Match instead.

Deprecated in version 25.2. Scheduled to be removed in version 27.6.

Parameters
graphicContextHandle of the device context on which to draw.

◆ DrawPositions() [2/6]

None eVision.EMatcher.DrawPositions ( self,
eVision.EDrawAdapter | None graphicContext,
bool bCorner )

Draws a graphical representation of all occurrences of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.

When multiple patterns are learned, only the positions corresponding to the first pattern are drawn.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used for all occurrences (to vary the colors, draw the objects separately using the eVision.EMatcher.DrawPosition method instead).

Deprecated

Use the eVision.EFoundPattern.Draw method of the eVision.EFoundPattern objects returned by eVision.EMatcher.Match instead.

Deprecated in version 25.2. Scheduled to be removed in version 27.6.

Parameters
graphicContextHandle of the device context on which to draw.
bCornertrue if the corner mark is to be drawn. false by default. (This mark is useful when large rotations are allowed.)

◆ DrawPositions() [3/6]

None eVision.EMatcher.DrawPositions ( self,
eVision.EDrawAdapter | None graphicContext,
bool bCorner,
float zoomX )

Draws a graphical representation of all occurrences of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.

When multiple patterns are learned, only the positions corresponding to the first pattern are drawn.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used for all occurrences (to vary the colors, draw the objects separately using the eVision.EMatcher.DrawPosition method instead).

Deprecated

Use the eVision.EFoundPattern.Draw method of the eVision.EFoundPattern objects returned by eVision.EMatcher.Match instead.

Deprecated in version 25.2. Scheduled to be removed in version 27.6.

Parameters
graphicContextHandle of the device context on which to draw.
bCornertrue if the corner mark is to be drawn. false by default. (This mark is useful when large rotations are allowed.)
zoomXHorizontal zooming factor. By default, true scale is used.

◆ DrawPositions() [4/6]

None eVision.EMatcher.DrawPositions ( self,
eVision.EDrawAdapter | None graphicContext,
bool bCorner,
float zoomX,
float zoomY )

Draws a graphical representation of all occurrences of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.

When multiple patterns are learned, only the positions corresponding to the first pattern are drawn.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used for all occurrences (to vary the colors, draw the objects separately using the eVision.EMatcher.DrawPosition method instead).

Deprecated

Use the eVision.EFoundPattern.Draw method of the eVision.EFoundPattern objects returned by eVision.EMatcher.Match instead.

Deprecated in version 25.2. Scheduled to be removed in version 27.6.

Parameters
graphicContextHandle of the device context on which to draw.
bCornertrue if the corner mark is to be drawn. false by default. (This mark is useful when large rotations are allowed.)
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.

◆ DrawPositions() [5/6]

None eVision.EMatcher.DrawPositions ( self,
eVision.EDrawAdapter | None graphicContext,
bool bCorner,
float zoomX,
float zoomY,
float panX )

Draws a graphical representation of all occurrences of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.

When multiple patterns are learned, only the positions corresponding to the first pattern are drawn.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used for all occurrences (to vary the colors, draw the objects separately using the eVision.EMatcher.DrawPosition method instead).

Deprecated

Use the eVision.EFoundPattern.Draw method of the eVision.EFoundPattern objects returned by eVision.EMatcher.Match instead.

Deprecated in version 25.2. Scheduled to be removed in version 27.6.

Parameters
graphicContextHandle of the device context on which to draw.
bCornertrue if the corner mark is to be drawn. false by default. (This mark is useful when large rotations are allowed.)
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ DrawPositions() [6/6]

None eVision.EMatcher.DrawPositions ( self,
eVision.EDrawAdapter | None graphicContext,
bool bCorner,
float zoomX,
float zoomY,
float panX,
float panY )

Draws a graphical representation of all occurrences of the pattern in the image, using a rectangle and possibly a small line segment in the upper-left corner.

When multiple patterns are learned, only the positions corresponding to the first pattern are drawn.

Remarks:

Drawing is done in the device context associated to the desired window. The current pen is used for all occurrences (to vary the colors, draw the objects separately using the eVision.EMatcher.DrawPosition method instead).

Deprecated

Use the eVision.EFoundPattern.Draw method of the eVision.EFoundPattern objects returned by eVision.EMatcher.Match instead.

Deprecated in version 25.2. Scheduled to be removed in version 27.6.

Parameters
graphicContextHandle of the device context on which to draw.
bCornertrue if the corner mark is to be drawn. false by default. (This mark is useful when large rotations are allowed.)
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ EnableEarlyCandidateRejection() [1/2]

bool eVision.EMatcher.EnableEarlyCandidateRejection ( self)

Whether to remove bad candidates in the early phases of the processing or not.

Enabled by default.

Remarks:

To reduce the number of candidates, those failing to fill some criterion are removed. This makes processing faster, a downside is that some good candidates can be erroneously removed. We recommend setting this parameter to false if you observe that a slight change in the input conditions make processing fail. For example: changing the search ROI in the image slightly.

After disabling the early candidate rejection, you will probably have to increase eVision.EMatcher.MaxInitialPositions as more candidates will now be kept.

◆ EnableEarlyCandidateRejection() [2/2]

eVision.EMatcher.EnableEarlyCandidateRejection ( self,
bool value )

Whether to remove bad candidates in the early phases of the processing or not.

Enabled by default.

Remarks:

To reduce the number of candidates, those failing to fill some criterion are removed. This makes processing faster, a downside is that some good candidates can be erroneously removed. We recommend setting this parameter to false if you observe that a slight change in the input conditions make processing fail. For example: changing the search ROI in the image slightly.

After disabling the early candidate rejection, you will probably have to increase eVision.EMatcher.MaxInitialPositions as more candidates will now be kept.

◆ Extension() [1/2]

eVision.EIntSize eVision.EMatcher.Extension ( self)

Sets/Gets the extension of the matching ROI, i.e.

puts the horizontal and vertical distances, in pixels, that the found pattern occurrences may fall outside the matching ROI. Such occurrences partially outside the ROI have their score corrected by the ratio between the pattern area outside the ROI and the pattern area inside.

◆ Extension() [2/2]

eVision.EMatcher.Extension ( self,
eVision.EIntSize value )

Sets/Gets the extension of the matching ROI, i.e.

puts the horizontal and vertical distances, in pixels, that the found pattern occurrences may fall outside the matching ROI. Such occurrences partially outside the ROI have their score corrected by the ratio between the pattern area outside the ROI and the pattern area inside.

◆ FilteringMode() [1/2]

eVision.EFilteringMode eVision.EMatcher.FilteringMode ( self)

Filtering mode.

Remarks:

To achieve acceptable time performance, EasyMatch works by sub-sampling the pattern in the early phases of the processing. The filtering mode parameter allows to select the pre-processing type applied to the image before the decimation: averaging or low-pass filtering. By default, this property is set to eVision.EFilteringMode.Uniform, whereas the eVision.EFilteringMode.LowPass mode is indicated if the image presents sharp gray-level transitions.

◆ FilteringMode() [2/2]

eVision.EMatcher.FilteringMode ( self,
eVision.EFilteringMode value )

Filtering mode.

Remarks:

To achieve acceptable time performance, EasyMatch works by sub-sampling the pattern in the early phases of the processing. The filtering mode parameter allows to select the pre-processing type applied to the image before the decimation: averaging or low-pass filtering. By default, this property is set to eVision.EFilteringMode.Uniform, whereas the eVision.EFilteringMode.LowPass mode is indicated if the image presents sharp gray-level transitions.

◆ FinalReduction() [1/2]

int eVision.EMatcher.FinalReduction ( self)

Index of the last reduction.

Remarks:

The pattern matching process is comprised of a few passes (typically 4) during which the position accuracy is improved by a factor of 2 (for all degrees of freedom). This is called a reduction. By default, the computation continues until an accuracy of one pixel is obtained. To speed up the process, the last reduction passes can be dropped, so lowering the accuracy. Anyway, the interpolation mode can then still be used. By default, this property is set to 0 (pixel accuracy). Value 1 corresponds to 2-pixels accuracy, 2 to 4, and so on. The range of values that can be used for this property is 0 to NumReductions-1.

◆ FinalReduction() [2/2]

eVision.EMatcher.FinalReduction ( self,
int value )

Index of the last reduction.

Remarks:

The pattern matching process is comprised of a few passes (typically 4) during which the position accuracy is improved by a factor of 2 (for all degrees of freedom). This is called a reduction. By default, the computation continues until an accuracy of one pixel is obtained. To speed up the process, the last reduction passes can be dropped, so lowering the accuracy. Anyway, the interpolation mode can then still be used. By default, this property is set to 0 (pixel accuracy). Value 1 corresponds to 2-pixels accuracy, 2 to 4, and so on. The range of values that can be used for this property is 0 to NumReductions-1.

◆ GetAngleStep() [1/2]

float eVision.EMatcher.GetAngleStep ( self,
int reduction )

Gets the angle step used at the given reduction.

Parameters
reductionOffset of the reduction in the pyramid, must be between eVision.EMatcher.FinalReduction and eVision.EMatcher.NumReductions - 1.

◆ GetAngleStep() [2/2]

float eVision.EMatcher.GetAngleStep ( self,
int reduction,
int learntPatternIndex )

Gets the angle step used at the given reduction.

Parameters
reductionOffset of the reduction in the pyramid, must be between eVision.EMatcher.FinalReduction and eVision.EMatcher.NumReductions - 1.
learntPatternIndexIndex of the learnt pattern. Defaults to 0.

◆ GetPatternHeight()

int eVision.EMatcher.GetPatternHeight ( self,
int learntPatternIndex )

Learned pattern height.

Parameters
learntPatternIndexIndex of the learnt pattern.

◆ GetPatternWidth()

int eVision.EMatcher.GetPatternWidth ( self,
int learntPatternIndex )

Learned pattern width.

Parameters
learntPatternIndexIndex of the learnt pattern.

◆ GetPosition()

eVision.EMatchPosition eVision.EMatcher.GetPosition ( self,
int index )

Returns an eVision.EMatchPosition object containing the position coordinates.

When multiple patterns are learned, the position corresponding to the first pattern at the given index is returned.

Deprecated

Use the eVision.EFoundPattern objects returned by eVision.EMatcher.Match instead.

Deprecated in version 25.2. Scheduled to be removed in version 27.6.

Parameters
index0-based index to the desired position. The positions are ordered by decreasing score.

◆ GetScaleStep() [1/2]

float eVision.EMatcher.GetScaleStep ( self,
int reduction )

Gets the scale step used at the given reduction.

When multiple patterns are learned, the scale step corresponding to the first pattern at the given reduction is returned.

Parameters
reductionOffset of the reduction in the pyramid, must be between eVision.EMatcher.FinalReduction and eVision.EMatcher.NumReductions - 1.

◆ GetScaleStep() [2/2]

float eVision.EMatcher.GetScaleStep ( self,
int reduction,
int learntPatternIndex )

Gets the scale step used at the given reduction.

When multiple patterns are learned, the scale step corresponding to the first pattern at the given reduction is returned.

Parameters
reductionOffset of the reduction in the pyramid, must be between eVision.EMatcher.FinalReduction and eVision.EMatcher.NumReductions - 1.
learntPatternIndexIndex of the learnt pattern. Defaults to 0.

◆ GetScaleXStep() [1/2]

float eVision.EMatcher.GetScaleXStep ( self,
int reduction )

Gets the scale step used on the X axis at the given reduction.

When multiple patterns are learned, the scale X step corresponding to the first pattern at the given reduction is returned.

Parameters
reductionOffset of the reduction in the pyramid, must be between eVision.EMatcher.FinalReduction and eVision.EMatcher.NumReductions - 1.

◆ GetScaleXStep() [2/2]

float eVision.EMatcher.GetScaleXStep ( self,
int reduction,
int learntPatternIndex )

Gets the scale step used on the X axis at the given reduction.

When multiple patterns are learned, the scale X step corresponding to the first pattern at the given reduction is returned.

Parameters
reductionOffset of the reduction in the pyramid, must be between eVision.EMatcher.FinalReduction and eVision.EMatcher.NumReductions - 1.
learntPatternIndexIndex of the learnt pattern. Defaults to 0.

◆ GetScaleYStep() [1/2]

float eVision.EMatcher.GetScaleYStep ( self,
int reduction )

Gets the scale step used on the Y axis at the given reduction.

When multiple patterns are learned, the scale Y step corresponding to the first pattern at the given reduction is returned.

Parameters
reductionOffset of the reduction in the pyramid, must be between eVision.EMatcher.FinalReduction and eVision.EMatcher.NumReductions - 1.

◆ GetScaleYStep() [2/2]

float eVision.EMatcher.GetScaleYStep ( self,
int reduction,
int learntPatternIndex )

Gets the scale step used on the Y axis at the given reduction.

When multiple patterns are learned, the scale Y step corresponding to the first pattern at the given reduction is returned.

Parameters
reductionOffset of the reduction in the pyramid, must be between eVision.EMatcher.FinalReduction and eVision.EMatcher.NumReductions - 1.
learntPatternIndexIndex of the learnt pattern. Defaults to 0.

◆ GetVersion()

int eVision.EMatcher.GetVersion ( )
static

Version number of the eVision.EMatcher object.

◆ InitialMinScore() [1/2]

float eVision.EMatcher.InitialMinScore ( self)

Minimum score applied as a selection criterion in the early stages of the matching process.

Remarks:

When the search for matches starts, EasyMatch considers a set of candidate positions that it progressively refines. When they later appear to be bad candidates, they are rejected. Though it is the minimum score level that is used to reject bad matching positions at the final step of the matching process, the "initial minimum score" parameter is used to eliminate bad positions (whose score is not high enough) in the early stages of the matching processing. If the matching process is achieved in one step, only the minimum score parameter will be considered. By default, this property is set to -1.

◆ InitialMinScore() [2/2]

eVision.EMatcher.InitialMinScore ( self,
float value )

Minimum score applied as a selection criterion in the early stages of the matching process.

Remarks:

When the search for matches starts, EasyMatch considers a set of candidate positions that it progressively refines. When they later appear to be bad candidates, they are rejected. Though it is the minimum score level that is used to reject bad matching positions at the final step of the matching process, the "initial minimum score" parameter is used to eliminate bad positions (whose score is not high enough) in the early stages of the matching processing. If the matching process is achieved in one step, only the minimum score parameter will be considered. By default, this property is set to -1.

◆ Interpolate() [1/2]

bool eVision.EMatcher.Interpolate ( self)

Interpolation mode.

Remarks:

By default, matching is done with a one-pixel precision for all degrees of freedom (translation, rotation and scaling). You can use an additional interpolation process to achieve sub-pixel accuracy. This generally leads to an improvement of the sub-pixel accuracy by a factor larger than 10. This is possible only when the found instances match closely the model. A score higher than 0.99 indicates that the instances are a close match of the model. In other words, the instance is considered to be more accurate when the score is higher. The added computational cost is low. By default, this property is set to false.

◆ Interpolate() [2/2]

eVision.EMatcher.Interpolate ( self,
bool value )

Interpolation mode.

Remarks:

By default, matching is done with a one-pixel precision for all degrees of freedom (translation, rotation and scaling). You can use an additional interpolation process to achieve sub-pixel accuracy. This generally leads to an improvement of the sub-pixel accuracy by a factor larger than 10. This is possible only when the found instances match closely the model. A score higher than 0.99 indicates that the instances are a close match of the model. In other words, the instance is considered to be more accurate when the score is higher. The added computational cost is low. By default, this property is set to false.

◆ IsotropicScale()

bool eVision.EMatcher.IsotropicScale ( self)

Flag indicating whether isotropic (as opposed to anisotropic) scaling is used.

Remarks:

true if isotropic (as opposed to anisotropic) scaling is used, i.e. when the scale factors in both the X and Y directions are equal.

◆ LearningHasRegion()

bool eVision.EMatcher.LearningHasRegion ( self)

Indicates whether a eVision.ERegion was used alongside the last learned pattern.

Returns false if no learning was performed.

◆ LearnPattern() [1/8]

None eVision.EMatcher.LearnPattern ( self,
eVision.EROIBW8 | None pattern )

Learns a pattern to subsequently match in an image.

Remarks:

The maximum size for a pattern is \((\sqrt{Minimum Reduced Area} - 1) * 2^8\). For the default Minimum Reduced Area of 64, this corresponds to a 1792x1792 maximum size. Increasing the Minimum Reduced Area enables larger pattern size but reduces the processing speed.

When a region is given, the method will ignore the pixels outside the region by internally setting them to 0 and setting eVision.EMatcher.DontCareThreshold to 1 if it wasn't set by the user. Thus, when working with an eVision.ERegion, all pixels that are black in the pattern will be discarded.

Consequently, when using binary images, the value 0 shouldn't be used if you use an eVision.ERegion for learning. 0's in your images should be replaced by 1's. This can be done with the eVision.EArithmeticLogicOperation.Add mode of eVision.EasyImage.Oper.

Parameters
patternPattern to learn.

◆ LearnPattern() [2/8]

None eVision.EMatcher.LearnPattern ( self,
eVision.EROIBW8 | None pattern,
eVision.EFrame frame )

Learns a pattern to subsequently match in an image.

Remarks:

The maximum size for a pattern is \((\sqrt{Minimum Reduced Area} - 1) * 2^8\). For the default Minimum Reduced Area of 64, this corresponds to a 1792x1792 maximum size. Increasing the Minimum Reduced Area enables larger pattern size but reduces the processing speed.

When a region is given, the method will ignore the pixels outside the region by internally setting them to 0 and setting eVision.EMatcher.DontCareThreshold to 1 if it wasn't set by the user. Thus, when working with an eVision.ERegion, all pixels that are black in the pattern will be discarded.

Consequently, when using binary images, the value 0 shouldn't be used if you use an eVision.ERegion for learning. 0's in your images should be replaced by 1's. This can be done with the eVision.EArithmeticLogicOperation.Add mode of eVision.EasyImage.Oper.

Parameters
patternPattern to learn.
frameReference frame of the learned image

◆ LearnPattern() [3/8]

None eVision.EMatcher.LearnPattern ( self,
eVision.EROIBW8 | None pattern,
eVision.ERegion region )

Learns a pattern to subsequently match in an image.

Remarks:

The maximum size for a pattern is \((\sqrt{Minimum Reduced Area} - 1) * 2^8\). For the default Minimum Reduced Area of 64, this corresponds to a 1792x1792 maximum size. Increasing the Minimum Reduced Area enables larger pattern size but reduces the processing speed.

When a region is given, the method will ignore the pixels outside the region by internally setting them to 0 and setting eVision.EMatcher.DontCareThreshold to 1 if it wasn't set by the user. Thus, when working with an eVision.ERegion, all pixels that are black in the pattern will be discarded.

Consequently, when using binary images, the value 0 shouldn't be used if you use an eVision.ERegion for learning. 0's in your images should be replaced by 1's. This can be done with the eVision.EArithmeticLogicOperation.Add mode of eVision.EasyImage.Oper.

Parameters
patternPattern to learn.
regionRegion in the pattern image to consider

◆ LearnPattern() [4/8]

None eVision.EMatcher.LearnPattern ( self,
eVision.EROIBW8 | None pattern,
eVision.ERegion region,
eVision.EFrame frame )

Learns a pattern to subsequently match in an image.

Remarks:

The maximum size for a pattern is \((\sqrt{Minimum Reduced Area} - 1) * 2^8\). For the default Minimum Reduced Area of 64, this corresponds to a 1792x1792 maximum size. Increasing the Minimum Reduced Area enables larger pattern size but reduces the processing speed.

When a region is given, the method will ignore the pixels outside the region by internally setting them to 0 and setting eVision.EMatcher.DontCareThreshold to 1 if it wasn't set by the user. Thus, when working with an eVision.ERegion, all pixels that are black in the pattern will be discarded.

Consequently, when using binary images, the value 0 shouldn't be used if you use an eVision.ERegion for learning. 0's in your images should be replaced by 1's. This can be done with the eVision.EArithmeticLogicOperation.Add mode of eVision.EasyImage.Oper.

Parameters
patternPattern to learn.
regionRegion in the pattern image to consider
frameReference frame of the learned image

◆ LearnPattern() [5/8]

None eVision.EMatcher.LearnPattern ( self,
eVision.EROIC24 | None pattern )

Learns a pattern to subsequently match in an image.

Remarks:

The maximum size for a pattern is \((\sqrt{Minimum Reduced Area} - 1) * 2^8\). For the default Minimum Reduced Area of 64, this corresponds to a 1792x1792 maximum size. Increasing the Minimum Reduced Area enables larger pattern size but reduces the processing speed.

When a region is given, the method will ignore the pixels outside the region by internally setting them to 0 and setting eVision.EMatcher.DontCareThreshold to 1 if it wasn't set by the user. Thus, when working with an eVision.ERegion, all pixels that are black in the pattern will be discarded.

Consequently, when using binary images, the value 0 shouldn't be used if you use an eVision.ERegion for learning. 0's in your images should be replaced by 1's. This can be done with the eVision.EArithmeticLogicOperation.Add mode of eVision.EasyImage.Oper.

Parameters
patternPattern to learn.

◆ LearnPattern() [6/8]

None eVision.EMatcher.LearnPattern ( self,
eVision.EROIC24 | None pattern,
eVision.EFrame frame )

Learns a pattern to subsequently match in an image.

Remarks:

The maximum size for a pattern is \((\sqrt{Minimum Reduced Area} - 1) * 2^8\). For the default Minimum Reduced Area of 64, this corresponds to a 1792x1792 maximum size. Increasing the Minimum Reduced Area enables larger pattern size but reduces the processing speed.

When a region is given, the method will ignore the pixels outside the region by internally setting them to 0 and setting eVision.EMatcher.DontCareThreshold to 1 if it wasn't set by the user. Thus, when working with an eVision.ERegion, all pixels that are black in the pattern will be discarded.

Consequently, when using binary images, the value 0 shouldn't be used if you use an eVision.ERegion for learning. 0's in your images should be replaced by 1's. This can be done with the eVision.EArithmeticLogicOperation.Add mode of eVision.EasyImage.Oper.

Parameters
patternPattern to learn.
frameReference frame of the learned image

◆ LearnPattern() [7/8]

None eVision.EMatcher.LearnPattern ( self,
eVision.EROIC24 | None pattern,
eVision.ERegion region )

Learns a pattern to subsequently match in an image.

Remarks:

The maximum size for a pattern is \((\sqrt{Minimum Reduced Area} - 1) * 2^8\). For the default Minimum Reduced Area of 64, this corresponds to a 1792x1792 maximum size. Increasing the Minimum Reduced Area enables larger pattern size but reduces the processing speed.

When a region is given, the method will ignore the pixels outside the region by internally setting them to 0 and setting eVision.EMatcher.DontCareThreshold to 1 if it wasn't set by the user. Thus, when working with an eVision.ERegion, all pixels that are black in the pattern will be discarded.

Consequently, when using binary images, the value 0 shouldn't be used if you use an eVision.ERegion for learning. 0's in your images should be replaced by 1's. This can be done with the eVision.EArithmeticLogicOperation.Add mode of eVision.EasyImage.Oper.

Parameters
patternPattern to learn.
regionRegion in the pattern image to consider

◆ LearnPattern() [8/8]

None eVision.EMatcher.LearnPattern ( self,
eVision.EROIC24 | None pattern,
eVision.ERegion region,
eVision.EFrame frame )

Learns a pattern to subsequently match in an image.

Remarks:

The maximum size for a pattern is \((\sqrt{Minimum Reduced Area} - 1) * 2^8\). For the default Minimum Reduced Area of 64, this corresponds to a 1792x1792 maximum size. Increasing the Minimum Reduced Area enables larger pattern size but reduces the processing speed.

When a region is given, the method will ignore the pixels outside the region by internally setting them to 0 and setting eVision.EMatcher.DontCareThreshold to 1 if it wasn't set by the user. Thus, when working with an eVision.ERegion, all pixels that are black in the pattern will be discarded.

Consequently, when using binary images, the value 0 shouldn't be used if you use an eVision.ERegion for learning. 0's in your images should be replaced by 1's. This can be done with the eVision.EArithmeticLogicOperation.Add mode of eVision.EasyImage.Oper.

Parameters
patternPattern to learn.
regionRegion in the pattern image to consider
frameReference frame of the learned image

◆ LearnPatterns() [1/4]

None eVision.EMatcher.LearnPatterns ( self,
list[eVision._eVision.EBaseROI | None] patterns )

Learns multiple (at least 2) patterns.

Remarks:

Learning multiple patterns is useful when your object presents slight variations: shape deformation, lighting, perspective,... Each pattern is Learned and Matched independently and only the best patterns are kept. The options of the eVision.EMatcher are used for all of the patterns. We recommend setting a eVision.EMatcher.MaxOverlap when using this feature.

Parameters
patternsVector of models to be learned (ROI).

◆ LearnPatterns() [2/4]

None eVision.EMatcher.LearnPatterns ( self,
list[eVision._eVision.EBaseROI | None] patterns,
eVision.EFrame frame )

Learns multiple (at least 2) patterns.

Remarks:

Learning multiple patterns is useful when your object presents slight variations: shape deformation, lighting, perspective,... Each pattern is Learned and Matched independently and only the best patterns are kept. The options of the eVision.EMatcher are used for all of the patterns. We recommend setting a eVision.EMatcher.MaxOverlap when using this feature.

Parameters
patternsVector of models to be learned (ROI).
frameReference frame of the learned image

◆ LearnPatterns() [3/4]

None eVision.EMatcher.LearnPatterns ( self,
list[eVision._eVision.EBaseROI | None] patterns,
list[eVision._eVision.ERegion | None] regions )

Learns multiple (at least 2) patterns.

Remarks:

Learning multiple patterns is useful when your object presents slight variations: shape deformation, lighting, perspective,... Each pattern is Learned and Matched independently and only the best patterns are kept. The options of the eVision.EMatcher are used for all of the patterns. We recommend setting a eVision.EMatcher.MaxOverlap when using this feature.

Parameters
patternsVector of models to be learned (ROI).
regionsVector of regions into the ROI where the learning is performed

◆ LearnPatterns() [4/4]

None eVision.EMatcher.LearnPatterns ( self,
list[eVision._eVision.EBaseROI | None] patterns,
list[eVision._eVision.ERegion | None] regions,
eVision.EFrame frame )

Learns multiple (at least 2) patterns.

Remarks:

Learning multiple patterns is useful when your object presents slight variations: shape deformation, lighting, perspective,... Each pattern is Learned and Matched independently and only the best patterns are kept. The options of the eVision.EMatcher are used for all of the patterns. We recommend setting a eVision.EMatcher.MaxOverlap when using this feature.

Parameters
patternsVector of models to be learned (ROI).
regionsVector of regions into the ROI where the learning is performed
frameReference frame of the learned image

◆ LearnTimeOut() [1/2]

int eVision.EMatcher.LearnTimeOut ( self)

Time-out for the eVision.EMatcher.LearnPattern and eVision.EMatcher.LearnPatterns methods.

Remarks:

If the processing time of one of these functions becomes longer than the set time-out, the processing is stopped and an exception is thrown. In that case, the error code of the exception is eVision.EError.TimeoutReached.

The time-out is set in microseconds.

This time-out is not a real time-out. The processing is stopped as soon as possible after the time-out has been reached. This means that the time elapsed effectively in the method can be greater than the time-out itself.

◆ LearnTimeOut() [2/2]

eVision.EMatcher.LearnTimeOut ( self,
int value )

Time-out for the eVision.EMatcher.LearnPattern and eVision.EMatcher.LearnPatterns methods.

Remarks:

If the processing time of one of these functions becomes longer than the set time-out, the processing is stopped and an exception is thrown. In that case, the error code of the exception is eVision.EError.TimeoutReached.

The time-out is set in microseconds.

This time-out is not a real time-out. The processing is stopped as soon as possible after the time-out has been reached. This means that the time elapsed effectively in the method can be greater than the time-out itself.

◆ Load() [1/2]

None eVision.EMatcher.Load ( self,
eVision.ESerializer | None serializer )

Loads the eVision.EMatcher.

The given eVision.ESerializer must have been created for reading.

Parameters
serializerThe serializer.

◆ Load() [2/2]

None eVision.EMatcher.Load ( self,
str path )

Loads the eVision.EMatcher.

The given eVision.ESerializer must have been created for reading.

Parameters
pathThe file path.

◆ Match() [1/8]

list[eVision._eVision.EFoundPattern] eVision.EMatcher.Match ( self,
eVision.EROIBW8 | None image )

Matches the pattern against an image.

Parameters
imagePointer to the image/ROI within which the pattern will be searched for.

◆ Match() [2/8]

list[eVision._eVision.EFoundPattern] eVision.EMatcher.Match ( self,
eVision.EROIBW8 | None image,
eVision.EFrame frame )

Matches the pattern against an image.

Parameters
imagePointer to the image/ROI within which the pattern will be searched for.
frameReference frame of the image

◆ Match() [3/8]

list[eVision._eVision.EFoundPattern] eVision.EMatcher.Match ( self,
eVision.EROIBW8 | None image,
eVision.ERegion region )

Matches the pattern against an image.

Parameters
imagePointer to the image/ROI within which the pattern will be searched for.
regionRegion within which the pattern will be searched for.

◆ Match() [4/8]

list[eVision._eVision.EFoundPattern] eVision.EMatcher.Match ( self,
eVision.EROIBW8 | None image,
eVision.ERegion region,
eVision.EFrame frame )

Matches the pattern against an image.

Parameters
imagePointer to the image/ROI within which the pattern will be searched for.
regionRegion within which the pattern will be searched for.
frameReference frame of the image

◆ Match() [5/8]

list[eVision._eVision.EFoundPattern] eVision.EMatcher.Match ( self,
eVision.EROIC24 | None image )

Matches the pattern against an image.

Parameters
imagePointer to the image/ROI within which the pattern will be searched for.

◆ Match() [6/8]

list[eVision._eVision.EFoundPattern] eVision.EMatcher.Match ( self,
eVision.EROIC24 | None image,
eVision.EFrame frame )

Matches the pattern against an image.

Parameters
imagePointer to the image/ROI within which the pattern will be searched for.
frameReference frame of the image

◆ Match() [7/8]

list[eVision._eVision.EFoundPattern] eVision.EMatcher.Match ( self,
eVision.EROIC24 | None image,
eVision.ERegion region )

Matches the pattern against an image.

Parameters
imagePointer to the image/ROI within which the pattern will be searched for.
regionRegion within which the pattern will be searched for.

◆ Match() [8/8]

list[eVision._eVision.EFoundPattern] eVision.EMatcher.Match ( self,
eVision.EROIC24 | None image,
eVision.ERegion region,
eVision.EFrame frame )

Matches the pattern against an image.

Parameters
imagePointer to the image/ROI within which the pattern will be searched for.
regionRegion within which the pattern will be searched for.
frameReference frame of the image

◆ MatchTimeOut() [1/2]

int eVision.EMatcher.MatchTimeOut ( self)

Time-out for the eVision.EMatcher.Match method.

Remarks:

If the processing time of one of these functions becomes longer than the set time-out, the processing is stopped and an exception is thrown. In that case, the error code of the exception is eVision.EError.TimeoutReached.

The time-out is set in microseconds.

This time-out is not a real time-out. The processing is stopped as soon as possible after the time-out has been reached. This means that the time elapsed effectively in the method can be greater than the time-out itself.

◆ MatchTimeOut() [2/2]

eVision.EMatcher.MatchTimeOut ( self,
int value )

Time-out for the eVision.EMatcher.Match method.

Remarks:

If the processing time of one of these functions becomes longer than the set time-out, the processing is stopped and an exception is thrown. In that case, the error code of the exception is eVision.EError.TimeoutReached.

The time-out is set in microseconds.

This time-out is not a real time-out. The processing is stopped as soon as possible after the time-out has been reached. This means that the time elapsed effectively in the method can be greater than the time-out itself.

◆ MaxAngle() [1/2]

float eVision.EMatcher.MaxAngle ( self)

Maximum angle, in the current angle unit.

Remarks:

The rotation of the pattern is allowed within the range (-1 <= MinAngle < MaxAngle <= 1 revolution). By default, both remain 0.

◆ MaxAngle() [2/2]

eVision.EMatcher.MaxAngle ( self,
float value )

Maximum angle, in the current angle unit.

Remarks:

The rotation of the pattern is allowed within the range (-1 <= MinAngle < MaxAngle <= 1 revolution). By default, both remain 0.

◆ MaxInitialPositions() [1/2]

int eVision.EMatcher.MaxInitialPositions ( self)

Maximum number of positions at the first stage of the matching process.

Remarks:

When the search for matches starts, EasyMatch considers a set of candidate positions that it progressively refines. When they later appear to be bad candidates, they are rejected. Eventually, a maximum of eVision.EMatcher.MaxPositions is returned. In some circumstances, when the image contains features roughly similar to the pattern, these can confuse the matching process, resulting in false matches. To overcome this situation, increasing the number of initial positions will help. By default, this property is set to 0, indicating that the value of eVision.EMatcher.MaxPositions should be used instead.

◆ MaxInitialPositions() [2/2]

eVision.EMatcher.MaxInitialPositions ( self,
int value )

Maximum number of positions at the first stage of the matching process.

Remarks:

When the search for matches starts, EasyMatch considers a set of candidate positions that it progressively refines. When they later appear to be bad candidates, they are rejected. Eventually, a maximum of eVision.EMatcher.MaxPositions is returned. In some circumstances, when the image contains features roughly similar to the pattern, these can confuse the matching process, resulting in false matches. To overcome this situation, increasing the number of initial positions will help. By default, this property is set to 0, indicating that the value of eVision.EMatcher.MaxPositions should be used instead.

◆ MaxOverlap() [1/2]

float eVision.EMatcher.MaxOverlap ( self)

Overlapping tolerance.

Remarks:

0.0 means all found patterns must be disconnected, 1.0 means they can fully overlap. Default: 1.0.

◆ MaxOverlap() [2/2]

eVision.EMatcher.MaxOverlap ( self,
float value )

Overlapping tolerance.

Remarks:

0.0 means all found patterns must be disconnected, 1.0 means they can fully overlap. Default: 1.0.

◆ MaxPositions() [1/2]

int eVision.EMatcher.MaxPositions ( self)

Maximum number of positions.

Remarks:

Indicates how many matching positions have to be returned at a maximum. This number corresponds to the expected maximum number of occurrences of the pattern (it is sometimes advisable to use a few additional positions). By default, this property is set to 1.

◆ MaxPositions() [2/2]

eVision.EMatcher.MaxPositions ( self,
int value )

Maximum number of positions.

Remarks:

Indicates how many matching positions have to be returned at a maximum. This number corresponds to the expected maximum number of occurrences of the pattern (it is sometimes advisable to use a few additional positions). By default, this property is set to 1.

◆ MaxScale() [1/2]

float eVision.EMatcher.MaxScale ( self)

Maximum scale factor for isotropic scaling.

Remarks:

Two scaling modes are allowed: in isotropic mode, the scale factor is identical in all directions; in anisotropic mode, the scale factors differ in the horizontal and vertical directions. To select the appropriate mode, it suffices to call the relevant Set member. The scaling of the pattern is recommended within the range (0.5 <= MinScale < MaxScale <= 2). By default, both remain 1. The same holds for anisotropic scale factors.

◆ MaxScale() [2/2]

eVision.EMatcher.MaxScale ( self,
float value )

Maximum scale factor for isotropic scaling.

Remarks:

Two scaling modes are allowed: in isotropic mode, the scale factor is identical in all directions; in anisotropic mode, the scale factors differ in the horizontal and vertical directions. To select the appropriate mode, it suffices to call the relevant Set member. The scaling of the pattern is recommended within the range (0.5 <= MinScale < MaxScale <= 2). By default, both remain 1. The same holds for anisotropic scale factors.

◆ MaxScaleX() [1/2]

float eVision.EMatcher.MaxScaleX ( self)

Maximum horizontal scale factor for anisotropic scaling.

Remarks:

Two scaling modes are allowed: in isotropic mode, the scale factor is identical in all directions; in anisotropic mode, the scale factors differ in the horizontal and vertical directions. To select the appropriate mode, it suffices to call the relevant Set member. The scaling of the pattern is recommended within the range (0.5 <= MinScaleX < MaxScaleX <= 2). By default, both remain 1. The same holds for anisotropic scale factors.

◆ MaxScaleX() [2/2]

eVision.EMatcher.MaxScaleX ( self,
float value )

Maximum horizontal scale factor for anisotropic scaling.

Remarks:

Two scaling modes are allowed: in isotropic mode, the scale factor is identical in all directions; in anisotropic mode, the scale factors differ in the horizontal and vertical directions. To select the appropriate mode, it suffices to call the relevant Set member. The scaling of the pattern is recommended within the range (0.5 <= MinScaleX < MaxScaleX <= 2). By default, both remain 1. The same holds for anisotropic scale factors.

◆ MaxScaleY() [1/2]

float eVision.EMatcher.MaxScaleY ( self)

Maximum vertical scale factor for anisotropic scaling.

Remarks:

Two scaling modes are allowed: in isotropic mode, the scale factor is identical in all directions; in anisotropic mode, the scale factors differ in the horizontal and vertical directions. To select the appropriate mode, it suffices to call the relevant Set member. The scaling of the pattern is recommended within the range (0.5 <= MinScaleY < MaxScaleY <= 2). By default, both remain 1. The same holds for anisotropic scale factors.

◆ MaxScaleY() [2/2]

eVision.EMatcher.MaxScaleY ( self,
float value )

Maximum vertical scale factor for anisotropic scaling.

Remarks:

Two scaling modes are allowed: in isotropic mode, the scale factor is identical in all directions; in anisotropic mode, the scale factors differ in the horizontal and vertical directions. To select the appropriate mode, it suffices to call the relevant Set member. The scaling of the pattern is recommended within the range (0.5 <= MinScaleY < MaxScaleY <= 2). By default, both remain 1. The same holds for anisotropic scale factors.

◆ MinAngle() [1/2]

float eVision.EMatcher.MinAngle ( self)

Minimum angle, in the current angle unit.

Remarks:

The rotation of the pattern is allowed within the range (-1 <= MinAngle < MaxAngle <= 1 revolution). By default, both remain 0.

◆ MinAngle() [2/2]

eVision.EMatcher.MinAngle ( self,
float value )

Minimum angle, in the current angle unit.

Remarks:

The rotation of the pattern is allowed within the range (-1 <= MinAngle < MaxAngle <= 1 revolution). By default, both remain 0.

◆ MinReducedArea() [1/2]

int eVision.EMatcher.MinReducedArea ( self)

Minimum reduced area parameter.

Remarks:

To achieve acceptable time performance, EasyMatch works by under-sampling the pattern in the early phases of the processing. This property tells how many pixels of the pattern are kept, at a minimum. By default, this property is set to 64, which is the right choice in most situations. Higher values are not recommended. Lower values can speed up the processing, but sometimes cause the matching process fail to find the best matches. To circumvent this problem, you can use guard positions, that is find more matches than expected and keep the good ones only.

Note
Changing this property invalidates any previous learning.

◆ MinReducedArea() [2/2]

eVision.EMatcher.MinReducedArea ( self,
int value )

Minimum reduced area parameter.

Remarks:

To achieve acceptable time performance, EasyMatch works by under-sampling the pattern in the early phases of the processing. This property tells how many pixels of the pattern are kept, at a minimum. By default, this property is set to 64, which is the right choice in most situations. Higher values are not recommended. Lower values can speed up the processing, but sometimes cause the matching process fail to find the best matches. To circumvent this problem, you can use guard positions, that is find more matches than expected and keep the good ones only.

Note
Changing this property invalidates any previous learning.

◆ MinScale() [1/2]

float eVision.EMatcher.MinScale ( self)

Minimum scale factor for isotropic scaling.

Remarks:

Two scaling modes are allowed: in isotropic mode, the scale factor is identical in all directions; in anisotropic mode, the scale factors differ in the horizontal and vertical directions. To select the appropriate mode, it suffices to call the relevant Set member. The scaling of the pattern is recommended within the range (0.5 <= MinScale < MaxScale <= 2). By default, both remain 1. The same holds for anisotropic scale factors.

◆ MinScale() [2/2]

eVision.EMatcher.MinScale ( self,
float value )

Minimum scale factor for isotropic scaling.

Remarks:

Two scaling modes are allowed: in isotropic mode, the scale factor is identical in all directions; in anisotropic mode, the scale factors differ in the horizontal and vertical directions. To select the appropriate mode, it suffices to call the relevant Set member. The scaling of the pattern is recommended within the range (0.5 <= MinScale < MaxScale <= 2). By default, both remain 1. The same holds for anisotropic scale factors.

◆ MinScaleX() [1/2]

float eVision.EMatcher.MinScaleX ( self)

Minimum horizontal scale factor for anisotropic scaling.

Remarks:

Two scaling modes are allowed: in isotropic mode, the scale factor is identical in all directions; in anisotropic mode, the scale factors differ in the horizontal and vertical directions. To select the appropriate mode, it suffices to call the relevant Set member. The scaling of the pattern is recommended within the range (0.5 <= MinScaleX < MaxScaleX <= 2). By default, both remain 1. The same holds for anisotropic scale factors.

◆ MinScaleX() [2/2]

eVision.EMatcher.MinScaleX ( self,
float value )

Minimum horizontal scale factor for anisotropic scaling.

Remarks:

Two scaling modes are allowed: in isotropic mode, the scale factor is identical in all directions; in anisotropic mode, the scale factors differ in the horizontal and vertical directions. To select the appropriate mode, it suffices to call the relevant Set member. The scaling of the pattern is recommended within the range (0.5 <= MinScaleX < MaxScaleX <= 2). By default, both remain 1. The same holds for anisotropic scale factors.

◆ MinScaleY() [1/2]

float eVision.EMatcher.MinScaleY ( self)

Minimum vertical scale factor for anisotropic scaling.

Remarks:

Two scaling modes are allowed: in isotropic mode, the scale factor is identical in all directions; in anisotropic mode, the scale factors differ in the horizontal and vertical directions. To select the appropriate mode, it suffices to call the relevant Set member. The scaling of the pattern is recommended within the range (0.5 <= MinScaleY < MaxScaleY <= 2). By default, both remain 1. The same holds for anisotropic scale factors.

◆ MinScaleY() [2/2]

eVision.EMatcher.MinScaleY ( self,
float value )

Minimum vertical scale factor for anisotropic scaling.

Remarks:

Two scaling modes are allowed: in isotropic mode, the scale factor is identical in all directions; in anisotropic mode, the scale factors differ in the horizontal and vertical directions. To select the appropriate mode, it suffices to call the relevant Set member. The scaling of the pattern is recommended within the range (0.5 <= MinScaleY < MaxScaleY <= 2). By default, both remain 1. The same holds for anisotropic scale factors.

◆ MinScore() [1/2]

float eVision.EMatcher.MinScore ( self)

Minimum score.

Remarks:

This property indicates what score a match must reach to be considered as good, and to be returned in the list of positions; this selection criterion is applied at the final stage of the matching process. One good way to select the appropriate eVision.EMatcher.MinScore in a given context is to set it to -1 (any match will be retained), set eVision.EMatcher.MaxPositions to more than needed, and examine the returned scores after a matching. By default, this property is set to -1.

◆ MinScore() [2/2]

eVision.EMatcher.MinScore ( self,
float value )

Minimum score.

Remarks:

This property indicates what score a match must reach to be considered as good, and to be returned in the list of positions; this selection criterion is applied at the final stage of the matching process. One good way to select the appropriate eVision.EMatcher.MinScore in a given context is to set it to -1 (any match will be retained), set eVision.EMatcher.MaxPositions to more than needed, and examine the returned scores after a matching. By default, this property is set to -1.

◆ NumLearnedPatterns()

int eVision.EMatcher.NumLearnedPatterns ( self)

Indicates the number of patterns learnt.

0 is returned if no learning was performed.

◆ NumPositions()

int eVision.EMatcher.NumPositions ( self)

Number of good matches found, as defined by eVision.EMatcher.MinScore and eVision.EMatcher.MaxPositions properties.

When multiple patterns are learned, the number of positions corresponding to the first pattern is returned.

Deprecated

Use the number of eVision.EFoundPattern objects returned by eVision.EMatcher.Match instead.

Deprecated in version 25.2. Scheduled to be removed in version 27.6.

◆ NumReductions()

int eVision.EMatcher.NumReductions ( self)

Number of reduction steps used in the matching process.

Remarks:

These depend on the actual pattern size, and on the MinReducedArea property. The FinalReduction property, used to speed up matching when coarse location is sufficient, must be set in range 0..NumReductions-1.

◆ PatternHeight()

int eVision.EMatcher.PatternHeight ( self)

Learned pattern height.

When multiple patterns are learned, the height of the first pattern is returned. Use eVision.EMatcher.GetPatternHeight for other learnt patterns.

◆ PatternLearnt()

bool eVision.EMatcher.PatternLearnt ( self)

Returns true after a learning operation has been successfully performed, indicating that the eVision.EMatcher object is ready for matching, and false otherwise.

◆ PatternType()

eVision.EImageType eVision.EMatcher.PatternType ( self)

Pixel type of the learned pattern.

◆ PatternWidth()

int eVision.EMatcher.PatternWidth ( self)

Learned pattern width.

When multiple patterns are learned, the width of the first pattern is returned. Use eVision.EMatcher.GetPatternWidth for other learnt patterns.

◆ PixelDimensions() [1/2]

eVision.ESize eVision.EMatcher.PixelDimensions ( self)

Gets/Sets the physical pixel dimensions.

Remarks:

When an image has been acquired in such a way that the pixels are "non-square" the physical width and height of the area covered by a pixel are unequal, a form of anisotropy results. When rotated, the objects become skewed; rectangles become parallelograms.

In such a situation, the pixel aspect ratio must be known to compensate it during matching. The aspect ratio is given by specifying the true width and height of a pixel.

The specification of the pixel dimensions is only useful when rotation is used.

Only the aspect ratio matters, so that relative width and height values can be given.

By default, the pixel width and height are set to 1.0.

◆ PixelDimensions() [2/2]

eVision.EMatcher.PixelDimensions ( self,
eVision.ESize value )

Gets/Sets the physical pixel dimensions.

Remarks:

When an image has been acquired in such a way that the pixels are "non-square" the physical width and height of the area covered by a pixel are unequal, a form of anisotropy results. When rotated, the objects become skewed; rectangles become parallelograms.

In such a situation, the pixel aspect ratio must be known to compensate it during matching. The aspect ratio is given by specifying the true width and height of a pixel.

The specification of the pixel dimensions is only useful when rotation is used.

Only the aspect ratio matters, so that relative width and height values can be given.

By default, the pixel width and height are set to 1.0.

◆ Positions()

list[eVision._eVision.EMatchPosition] eVision.EMatcher.Positions ( self)

Returns a vector of eVision.EMatchPosition objects, each containing the position coordinates and other matching results.

When multiple patterns are learned, the positions corresponding to the first pattern are returned.

Deprecated

Use the eVision.EFoundPattern objects returned by eVision.EMatcher.Match instead.

Deprecated in version 25.2. Scheduled to be removed in version 27.6.

◆ Save() [1/2]

None eVision.EMatcher.Save ( self,
eVision.ESerializer | None serializer )

Saves the eVision.EMatcher.

The given eVision.ESerializer must have been created for writing.

Parameters
serializerThe serializer.

◆ Save() [2/2]

None eVision.EMatcher.Save ( self,
str path )

Saves the eVision.EMatcher.

The given eVision.ESerializer must have been created for writing.

Parameters
pathThe file path.