Manages a complete finding context in EasyFind. More...
Public Member Functions | |
| None | __init__ (self) |
| Constructs a eVision.EPatternFinder.__init__ context. | |
| None | __init__ (self, eVision.EPatternFinder other) |
| Constructs a eVision.EPatternFinder.__init__ context. | |
| None | Learn (self, eVision.EROIBW8|None pattern) |
| Learns a given pattern and stores it in the eVision.EPatternFinder.__init__ object. | |
| None | Learn (self, eVision.EROIBW8|None pattern, eVision.ERegion region) |
| Learns a given pattern and stores it in the eVision.EPatternFinder.__init__ object. | |
| None | Learn (self, eVision.EROIBW8|None pattern, eVision.ERegion region, eVision.EFrame frame) |
| Learns a given pattern and stores it in the eVision.EPatternFinder.__init__ object. | |
| None | Learn (self, eVision.EROIBW8|None pattern, eVision.EFrame frame) |
| Learns a given pattern and stores it in the eVision.EPatternFinder.__init__ object. | |
| None | Learn (self, eVision.EVectorModel model) |
| Learns a given pattern and stores it in the eVision.EPatternFinder.__init__ object. | |
| None | Learn (self, eVision.EROIBW8|None pattern, eVision.EROIBW8|None dontCare) |
| Learns a given pattern and stores it in the eVision.EPatternFinder.__init__ object. | |
| None | LearnPatterns (self, list[eVision._eVision.EROIBW8|None] patterns) |
| Learns multiple (at least two) patterns. | |
| None | LearnPatterns (self, list[eVision._eVision.EROIBW8|None] patterns, list[eVision._eVision.ERegion|None] regions) |
| Learns multiple (at least two) patterns. | |
| None | LearnPatterns (self, list[eVision._eVision.EROIBW8|None] patterns, list[eVision._eVision.ERegion|None] regions, eVision.EFrame frame) |
| Learns multiple (at least two) patterns. | |
| None | LearnPatterns (self, list[eVision._eVision.EROIBW8|None] patterns, eVision.EFrame frame) |
| Learns multiple (at least two) patterns. | |
| None | CopyLearntPattern (self, eVision.EImageBW8 image, bool maskWithDontCare, int learntPatternIndex) |
| Copies the learned pattern in the supplied image. | |
| None | CopyLearntPattern (self, eVision.EImageBW8 image, bool maskWithDontCare) |
| Copies the learned pattern in the supplied image. | |
| None | CopyLearntPattern (self, eVision.EImageBW8 image) |
| Copies the learned pattern in the supplied image. | |
| list[eVision._eVision.EFoundPattern] | Find (self, eVision.EROIBW8|None source) |
| Locates a set of possible occurrences of the learned pattern in the supplied search field. | |
| list[eVision._eVision.EFoundPattern] | Find (self, eVision.EROIBW8|None source, eVision.ERegion region) |
| Locates a set of possible occurrences of the learned pattern in the supplied search field. | |
| list[eVision._eVision.EFoundPattern] | Find (self, eVision.EROIBW8|None source, eVision.ERegion region, eVision.EFrame frame) |
| Locates a set of possible occurrences of the learned pattern in the supplied search field. | |
| list[eVision._eVision.EFoundPattern] | Find (self, eVision.EROIBW8|None source, eVision.EFrame frame) |
| Locates a set of possible occurrences of the learned pattern in the supplied search field. | |
| None | DrawModel (self, eVision.EDrawAdapter|None graphicContext, float zoomX, float zoomY, float panX, float panY) |
| Draws the model features with an overlay in image coordinates. | |
| None | DrawModel (self, eVision.EDrawAdapter|None graphicContext, float zoomX, float zoomY, float panX) |
| Draws the model features with an overlay in image coordinates. | |
| None | DrawModel (self, eVision.EDrawAdapter|None graphicContext, float zoomX, float zoomY) |
| Draws the model features with an overlay in image coordinates. | |
| None | DrawModel (self, eVision.EDrawAdapter|None graphicContext, float zoomX) |
| Draws the model features with an overlay in image coordinates. | |
| None | DrawModel (self, eVision.EDrawAdapter|None graphicContext) |
| Draws the model features with an overlay in image coordinates. | |
| None | DrawModel (self, eVision.EDrawAdapter|None graphicContext, int learntPatternIndex, float zoomX, float zoomY, float panX, float panY) |
| Draws the model features with an overlay in image coordinates. | |
| list[eVision._eVision.EFindFeaturePoint] | GetFeaturePoints (self, int learntPatternIndex) |
| The feature points used by the model. | |
| None | Save (self, str path) |
| Loads an eVision.EPatternFinder.The given eVision.EPatternFinder must have been created for writing. | |
| None | Save (self, eVision.ESerializer|None serializer) |
| Loads an eVision.EPatternFinder.The given eVision.EPatternFinder must have been created for writing. | |
| None | Load (self, str path) |
| Loads an eVision.EPatternFinder.The given eVision.EPatternFinder must have been created for reading. | |
| None | Load (self, eVision.ESerializer|None serializer) |
| Loads an eVision.EPatternFinder.The given eVision.EPatternFinder must have been created for reading. | |
| int | NumLearnedPatterns (self) |
| Indicates the number of patterns learnt. | |
| bool | LearningDone (self) |
| Indicates whether a pattern has already been learned. | |
| bool | LearningHasRegion (self) |
| Indicates whether a eVision.ERegion was used alongside the learned pattern. | |
| float | AngleBias (self) |
| Angle bias, expressed in the current angle unit. | |
| AngleBias (self, float value) | |
| Angle bias, expressed in the current angle unit. | |
| float | AngleTolerance (self) |
| Angle tolerance, expressed in the current angle unit. | |
| AngleTolerance (self, float value) | |
| Angle tolerance, expressed in the current angle unit. | |
| float | ScaleBias (self) |
| Scale bias, expressed in units (not in percent). | |
| ScaleBias (self, float value) | |
| Scale bias, expressed in units (not in percent). | |
| float | MaxOverlap (self) |
| Overlapping tolerance. | |
| MaxOverlap (self, float value) | |
| Overlapping tolerance. | |
| float | MaximumOverlapping (self) |
| MaximumOverlapping (self, float value) | |
| float | ScaleTolerance (self) |
| Scale tolerance, expressed in units (not in percent). | |
| ScaleTolerance (self, float value) | |
| Scale tolerance, expressed in units (not in percent). | |
| bool | Interpolate (self) |
| Whether interpolation is performed when searching for a pattern occurrence. | |
| Interpolate (self, bool value) | |
| Whether interpolation is performed when searching for a pattern occurrence. | |
| bool | ComputePerFeaturePointScore (self) |
| Whether the eVision.EPatternFinder should compute a score for each feature point. | |
| ComputePerFeaturePointScore (self, bool value) | |
| Whether the eVision.EPatternFinder should compute a score for each feature point. | |
| eVision.EFindContrastMode | ContrastMode (self) |
| Contrast of the instance, as defined in eVision.EFindContrastMode. | |
| ContrastMode (self, eVision.EFindContrastMode value) | |
| Contrast of the instance, as defined in eVision.EFindContrastMode. | |
| eVision.EReductionMode | ReductionMode (self) |
| The reduction mode that is to be used when learning the model (automatic or manual), as defined in eVision.EReductionMode. | |
| ReductionMode (self, eVision.EReductionMode value) | |
| The reduction mode that is to be used when learning the model (automatic or manual), as defined in eVision.EReductionMode. | |
| eVision.ELocalSearchMode | LocalSearchMode (self) |
| Sets the local search mode. | |
| LocalSearchMode (self, eVision.ELocalSearchMode value) | |
| Sets the local search mode. | |
| int | AngleSearchExtent (self) |
| The angular extension of the search neighborhood. | |
| AngleSearchExtent (self, int value) | |
| The angular extension of the search neighborhood. | |
| int | ScaleSearchExtent (self) |
| The scaling extension of the search neighborhood. | |
| ScaleSearchExtent (self, int value) | |
| The scaling extension of the search neighborhood. | |
| int | XSearchExtent (self) |
| The X-axis extension of the search neighborhood. | |
| XSearchExtent (self, int value) | |
| The X-axis extension of the search neighborhood. | |
| int | YSearchExtent (self) |
| The Y-axis extension of the search neighborhood. | |
| YSearchExtent (self, int value) | |
| The Y-axis extension of the search neighborhood. | |
| int | MaxInstances (self) |
| Maximum number of instances to be found. | |
| MaxInstances (self, int value) | |
| Maximum number of instances to be found. | |
| int | MaxInitialCandidates (self) |
| Maximum number of initial candidates. | |
| MaxInitialCandidates (self, int value) | |
| Maximum number of initial candidates. | |
| float | MinScore (self) |
| Minimum score of found instances, between [-1.0, 1.0]. | |
| MinScore (self, float value) | |
| Minimum score of found instances, between [-1.0, 1.0]. | |
| float | ReductionStrength (self) |
| The reduction strength that is to be used when learning the model, between 0 and 1. | |
| ReductionStrength (self, float value) | |
| The reduction strength that is to be used when learning the model, between 0 and 1. | |
| int | MinFeaturePoints (self) |
| Minimum number of feature points at the coarse stage. | |
| MinFeaturePoints (self, int value) | |
| Minimum number of feature points at the coarse stage. | |
| int | MaxFeaturePoints (self) |
| Maximum number of feature points at the fine stage. | |
| MaxFeaturePoints (self, int value) | |
| Maximum number of feature points at the fine stage. | |
| eVision.EPatternType | PatternType (self) |
| Pattern type, as defined in eVision.EPatternType. | |
| PatternType (self, eVision.EPatternType value) | |
| Pattern type, as defined in eVision.EPatternType. | |
| int | FindExtension (self) |
| Extension value, that is the pattern margin size (in pixels) that is allowed to go out of the search field. | |
| FindExtension (self, int value) | |
| Extension value, that is the pattern margin size (in pixels) that is allowed to go out of the search field. | |
| float | LightBalance (self) |
| Light balance, between [-1.0, 1.0]. | |
| LightBalance (self, float value) | |
| Light balance, between [-1.0, 1.0]. | |
| eVision.EThinStructureMode | ThinStructureMode (self) |
| Mode for eVision.EPatternType.ThinStructure, as defined in eVision.EThinStructureMode. | |
| ThinStructureMode (self, eVision.EThinStructureMode value) | |
| Mode for eVision.EPatternType.ThinStructure, as defined in eVision.EThinStructureMode. | |
| list[eVision._eVision.EFindFeaturePoint] | FeaturePoints (self) |
| The feature points used by the model. | |
| eVision.EPoint | Pivot (self) |
| Reference point in the model. | |
| Pivot (self, eVision.EPoint value) | |
| Reference point in the model. | |
| int | LearnTimeOut (self) |
| Time-out for the eVision.EPatternFinder.Learn and eVision.EPatternFinder.LearnPatterns methods. | |
| LearnTimeOut (self, int value) | |
| Time-out for the eVision.EPatternFinder.Learn and eVision.EPatternFinder.LearnPatterns methods. | |
| int | FindTimeOut (self) |
| Time-out for the eVision.EPatternFinder.Find method. | |
| FindTimeOut (self, int value) | |
| Time-out for the eVision.EPatternFinder.Find method. | |
Manages a complete finding context in EasyFind.
Remarks:
License(s): EasyFind
| None eVision.EPatternFinder.__init__ | ( | self | ) |
Constructs a eVision.EPatternFinder.__init__ context.
Remarks:
All properties are initialized to their respective default values.
| None eVision.EPatternFinder.__init__ | ( | self, | |
| eVision.EPatternFinder | other ) |
Constructs a eVision.EPatternFinder.__init__ context.
Remarks:
All properties are initialized to their respective default values.
| other | Another eVision.EPatternFinder object to be copied in the new eVision.EPatternFinder object. |
| float eVision.EPatternFinder.AngleBias | ( | self | ) |
Angle bias, expressed in the current angle unit.
Remarks:
The AngleBias defines the angle offset between the model and the instances. Finding the pattern is performed in range AngleBias +/- eVision.EPatternFinder.AngleTolerance. This range should not exceed a full turn. Default: 0.0.
| eVision.EPatternFinder.AngleBias | ( | self, | |
| float | value ) |
Angle bias, expressed in the current angle unit.
Remarks:
The AngleBias defines the angle offset between the model and the instances. Finding the pattern is performed in range AngleBias +/- eVision.EPatternFinder.AngleTolerance. This range should not exceed a full turn. Default: 0.0.
| int eVision.EPatternFinder.AngleSearchExtent | ( | self | ) |
The angular extension of the search neighborhood.
Only odd values are allowed for this parameter. See the eVision.EPatternFinder.LocalSearchMode property description for further details.
| eVision.EPatternFinder.AngleSearchExtent | ( | self, | |
| int | value ) |
The angular extension of the search neighborhood.
Only odd values are allowed for this parameter. See the eVision.EPatternFinder.LocalSearchMode property description for further details.
| float eVision.EPatternFinder.AngleTolerance | ( | self | ) |
Angle tolerance, expressed in the current angle unit.
Remarks:
The AngleTolerance defines the angle allowance of the instances around the eVision.EPatternFinder.AngleBias. Finding the pattern is performed in range eVision.EPatternFinder.AngleBias +/- AngleTolerance. This range should not exceed a full turn. A NULL tolerance can be set, in which case the angle bias value is assumed. Default: 0.0.
| eVision.EPatternFinder.AngleTolerance | ( | self, | |
| float | value ) |
Angle tolerance, expressed in the current angle unit.
Remarks:
The AngleTolerance defines the angle allowance of the instances around the eVision.EPatternFinder.AngleBias. Finding the pattern is performed in range eVision.EPatternFinder.AngleBias +/- AngleTolerance. This range should not exceed a full turn. A NULL tolerance can be set, in which case the angle bias value is assumed. Default: 0.0.
| bool eVision.EPatternFinder.ComputePerFeaturePointScore | ( | self | ) |
Whether the eVision.EPatternFinder should compute a score for each feature point.
The scores are then displayed as a Red-Yellow-Green colormap by eVision.EFoundPattern.Draw. Note that the scores correspond to the Point-By-Point variants of eVision.EPatternFinder.ContrastMode, so if eVision.EPatternFinder.ContrastMode is not a Point-By-Point variant, eVision.EFoundPattern.Score isn't exactly the average of the displayed scores for each feature point.
| eVision.EPatternFinder.ComputePerFeaturePointScore | ( | self, | |
| bool | value ) |
Whether the eVision.EPatternFinder should compute a score for each feature point.
The scores are then displayed as a Red-Yellow-Green colormap by eVision.EFoundPattern.Draw. Note that the scores correspond to the Point-By-Point variants of eVision.EPatternFinder.ContrastMode, so if eVision.EPatternFinder.ContrastMode is not a Point-By-Point variant, eVision.EFoundPattern.Score isn't exactly the average of the displayed scores for each feature point.
| eVision.EFindContrastMode eVision.EPatternFinder.ContrastMode | ( | self | ) |
Contrast of the instance, as defined in eVision.EFindContrastMode.
Remarks:
This is a eVision.EPatternType.ConsistentEdges pattern type property. It defines the contrast of regions. Contrast can be normal (as in the model), inverse (inverse contrast of the model), or any (same or inverse contrast of the model). Default: eVision.EFindContrastMode.Normal.
| eVision.EPatternFinder.ContrastMode | ( | self, | |
| eVision.EFindContrastMode | value ) |
Contrast of the instance, as defined in eVision.EFindContrastMode.
Remarks:
This is a eVision.EPatternType.ConsistentEdges pattern type property. It defines the contrast of regions. Contrast can be normal (as in the model), inverse (inverse contrast of the model), or any (same or inverse contrast of the model). Default: eVision.EFindContrastMode.Normal.
| None eVision.EPatternFinder.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.
| image | Pointer to the image in which the learned pattern will be returned. |
| None eVision.EPatternFinder.CopyLearntPattern | ( | self, | |
| eVision.EImageBW8 | image, | ||
| bool | maskWithDontCare ) |
Copies the learned pattern in the supplied image.
If no pattern has been learned, an exception with code eVision.EError.NoPatternLearnt will be thrown.
| image | Pointer to the image in which the learned pattern will be returned. |
| maskWithDontCare | If true and a don't care Area or Region was used when learning, masked pixels will be displayed in black. Default: false. |
| None eVision.EPatternFinder.CopyLearntPattern | ( | self, | |
| eVision.EImageBW8 | image, | ||
| bool | maskWithDontCare, | ||
| 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.
| image | Pointer to the image in which the learned pattern will be returned. |
| maskWithDontCare | If true and a don't care Area or Region was used when learning, masked pixels will be displayed in black. Default: false. |
| learntPatternIndex | Index of the learnt pattern. Default: 0. |
| None eVision.EPatternFinder.DrawModel | ( | self, | |
| eVision.EDrawAdapter | None | graphicContext ) |
Draws the model features with an overlay in image coordinates.
Image coordinates means that we expect to draw in the parent image of the roi given in eVision.EPatternFinder.Learn or eVision.EPatternFinder.LearnPatterns.
| graphicContext | Handle to the device context of the destination windows. |
| None eVision.EPatternFinder.DrawModel | ( | self, | |
| eVision.EDrawAdapter | None | graphicContext, | ||
| float | zoomX ) |
Draws the model features with an overlay in image coordinates.
Image coordinates means that we expect to draw in the parent image of the roi given in eVision.EPatternFinder.Learn or eVision.EPatternFinder.LearnPatterns.
| graphicContext | Handle to the device context of the destination windows. |
| zoomX | Horizontal zooming factor. |
| None eVision.EPatternFinder.DrawModel | ( | self, | |
| eVision.EDrawAdapter | None | graphicContext, | ||
| float | zoomX, | ||
| float | zoomY ) |
Draws the model features with an overlay in image coordinates.
Image coordinates means that we expect to draw in the parent image of the roi given in eVision.EPatternFinder.Learn or eVision.EPatternFinder.LearnPatterns.
| graphicContext | Handle to the device context of the destination windows. |
| zoomX | Horizontal zooming factor. |
| zoomY | Vertical zooming factor. If set to 0, the horizontal zooming factor will be used for isotropic zooming. |
| None eVision.EPatternFinder.DrawModel | ( | self, | |
| eVision.EDrawAdapter | None | graphicContext, | ||
| float | zoomX, | ||
| float | zoomY, | ||
| float | panX ) |
Draws the model features with an overlay in image coordinates.
Image coordinates means that we expect to draw in the parent image of the roi given in eVision.EPatternFinder.Learn or eVision.EPatternFinder.LearnPatterns.
| graphicContext | Handle to the device context of the destination windows. |
| zoomX | Horizontal zooming factor. |
| zoomY | Vertical zooming factor. If set to 0, the horizontal zooming factor will be used for isotropic zooming. |
| panX | Horizontal panning value expressed in pixels. By default, no panning occurs. |
| None eVision.EPatternFinder.DrawModel | ( | self, | |
| eVision.EDrawAdapter | None | graphicContext, | ||
| float | zoomX, | ||
| float | zoomY, | ||
| float | panX, | ||
| float | panY ) |
Draws the model features with an overlay in image coordinates.
Image coordinates means that we expect to draw in the parent image of the roi given in eVision.EPatternFinder.Learn or eVision.EPatternFinder.LearnPatterns.
| graphicContext | Handle to the device context of the destination windows. |
| zoomX | Horizontal zooming factor. |
| zoomY | Vertical zooming factor. If set to 0, the horizontal zooming factor will be used for isotropic zooming. |
| panX | Horizontal panning value expressed in pixels. By default, no panning occurs. |
| panY | Vertical panning value expressed in pixels. By default, no panning occurs. |
| None eVision.EPatternFinder.DrawModel | ( | self, | |
| eVision.EDrawAdapter | None | graphicContext, | ||
| int | learntPatternIndex, | ||
| float | zoomX, | ||
| float | zoomY, | ||
| float | panX, | ||
| float | panY ) |
Draws the model features with an overlay in image coordinates.
Image coordinates means that we expect to draw in the parent image of the roi given in eVision.EPatternFinder.Learn or eVision.EPatternFinder.LearnPatterns.
| graphicContext | Handle to the device context of the destination windows. |
| learntPatternIndex | Index of the learnt pattern. Defaults to 0. |
| zoomX | Horizontal zooming factor. |
| zoomY | Vertical zooming factor. If set to 0, the horizontal zooming factor will be used for isotropic zooming. |
| panX | Horizontal panning value expressed in pixels. By default, no panning occurs. |
| panY | Vertical panning value expressed in pixels. By default, no panning occurs. |
| list[eVision._eVision.EFindFeaturePoint] eVision.EPatternFinder.FeaturePoints | ( | self | ) |
The feature points used by the model.
Remarks:
The feature points are expressed with respect to the parent image of the ROI given as input to the eVision.EPatternFinder.Learn method.
| list[eVision._eVision.EFoundPattern] eVision.EPatternFinder.Find | ( | self, | |
| eVision.EROIBW8 | None | source ) |
Locates a set of possible occurrences of the learned pattern in the supplied search field.
Remarks:
This method will fail if no pattern has been learned previously. The result is a vector of eVision.EFoundPattern objects.
| source | Image or part of an image in which the learned model has to be searched for. |
| list[eVision._eVision.EFoundPattern] eVision.EPatternFinder.Find | ( | self, | |
| eVision.EROIBW8 | None | source, | ||
| eVision.EFrame | frame ) |
Locates a set of possible occurrences of the learned pattern in the supplied search field.
Remarks:
This method will fail if no pattern has been learned previously. The result is a vector of eVision.EFoundPattern objects.
| source | Image or part of an image in which the learned model has to be searched for. |
| frame | Frame of the input image. |
| list[eVision._eVision.EFoundPattern] eVision.EPatternFinder.Find | ( | self, | |
| eVision.EROIBW8 | None | source, | ||
| eVision.ERegion | region ) |
Locates a set of possible occurrences of the learned pattern in the supplied search field.
Remarks:
This method will fail if no pattern has been learned previously. The result is a vector of eVision.EFoundPattern objects.
| source | Image or part of an image in which the learned model has to be searched for. |
| region | Region into the ROI where the search is performed. |
| list[eVision._eVision.EFoundPattern] eVision.EPatternFinder.Find | ( | self, | |
| eVision.EROIBW8 | None | source, | ||
| eVision.ERegion | region, | ||
| eVision.EFrame | frame ) |
Locates a set of possible occurrences of the learned pattern in the supplied search field.
Remarks:
This method will fail if no pattern has been learned previously. The result is a vector of eVision.EFoundPattern objects.
| source | Image or part of an image in which the learned model has to be searched for. |
| region | Region into the ROI where the search is performed. |
| frame | Frame of the input image. |
| int eVision.EPatternFinder.FindExtension | ( | self | ) |
Extension value, that is the pattern margin size (in pixels) that is allowed to go out of the search field.
Remarks:
When a non-NULL value is attributed to the extension, the detection of instances partially out of the ROI is allowed. The extension value defines how much the ROI is extended. Default: 0.
| eVision.EPatternFinder.FindExtension | ( | self, | |
| int | value ) |
Extension value, that is the pattern margin size (in pixels) that is allowed to go out of the search field.
Remarks:
When a non-NULL value is attributed to the extension, the detection of instances partially out of the ROI is allowed. The extension value defines how much the ROI is extended. Default: 0.
| int eVision.EPatternFinder.FindTimeOut | ( | self | ) |
Time-out for the eVision.EPatternFinder.Find 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.
| eVision.EPatternFinder.FindTimeOut | ( | self, | |
| int | value ) |
Time-out for the eVision.EPatternFinder.Find 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.
| list[eVision._eVision.EFindFeaturePoint] eVision.EPatternFinder.GetFeaturePoints | ( | self, | |
| int | learntPatternIndex ) |
The feature points used by the model.
Remarks:
The feature points are expressed with respect to the parent image of the ROI given as input to the eVision.EPatternFinder.LearnPatterns method.
| learntPatternIndex | Index of the learnt pattern. |
| bool eVision.EPatternFinder.Interpolate | ( | self | ) |
Whether interpolation is performed when searching for a pattern occurrence.
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. Default: true.
| eVision.EPatternFinder.Interpolate | ( | self, | |
| bool | value ) |
Whether interpolation is performed when searching for a pattern occurrence.
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. Default: true.
| None eVision.EPatternFinder.Learn | ( | self, | |
| eVision.EROIBW8 | None | pattern ) |
Learns a given pattern and stores it in the eVision.EPatternFinder.__init__ object.
Remarks:
Learning another pattern erases the information stored for the first one. A "don't care area" can be set as argument, allowing to mask and not take into account certain parts of the pattern while learning. The "don't care area" mask should have the same size as the pattern or as its eventual parent image. The mask should be a bi-level image with pixel - values of '0' for ignored areas and '255' otherwise.
| pattern | Model to be learned (ROI). |
| None eVision.EPatternFinder.Learn | ( | self, | |
| eVision.EROIBW8 | None | pattern, | ||
| eVision.EFrame | frame ) |
Learns a given pattern and stores it in the eVision.EPatternFinder.__init__ object.
Remarks:
Learning another pattern erases the information stored for the first one. A "don't care area" can be set as argument, allowing to mask and not take into account certain parts of the pattern while learning. The "don't care area" mask should have the same size as the pattern or as its eventual parent image. The mask should be a bi-level image with pixel - values of '0' for ignored areas and '255' otherwise.
| pattern | Model to be learned (ROI). |
| frame | Reference frame of the learned image |
| None eVision.EPatternFinder.Learn | ( | self, | |
| eVision.EROIBW8 | None | pattern, | ||
| eVision.ERegion | region ) |
Learns a given pattern and stores it in the eVision.EPatternFinder.__init__ object.
Remarks:
Learning another pattern erases the information stored for the first one. A "don't care area" can be set as argument, allowing to mask and not take into account certain parts of the pattern while learning. The "don't care area" mask should have the same size as the pattern or as its eventual parent image. The mask should be a bi-level image with pixel - values of '0' for ignored areas and '255' otherwise.
| pattern | Model to be learned (ROI). |
| region | Region into the ROI where the learning is performed |
| None eVision.EPatternFinder.Learn | ( | self, | |
| eVision.EROIBW8 | None | pattern, | ||
| eVision.ERegion | region, | ||
| eVision.EFrame | frame ) |
Learns a given pattern and stores it in the eVision.EPatternFinder.__init__ object.
Remarks:
Learning another pattern erases the information stored for the first one. A "don't care area" can be set as argument, allowing to mask and not take into account certain parts of the pattern while learning. The "don't care area" mask should have the same size as the pattern or as its eventual parent image. The mask should be a bi-level image with pixel - values of '0' for ignored areas and '255' otherwise.
| pattern | Model to be learned (ROI). |
| region | Region into the ROI where the learning is performed |
| frame | Reference frame of the learned image |
| None eVision.EPatternFinder.Learn | ( | self, | |
| eVision.EROIBW8 | None | pattern, | ||
| eVision.EROIBW8 | None | dontCare ) |
Learns a given pattern and stores it in the eVision.EPatternFinder.__init__ object.
Remarks:
Learning another pattern erases the information stored for the first one. A "don't care area" can be set as argument, allowing to mask and not take into account certain parts of the pattern while learning. The "don't care area" mask should have the same size as the pattern or as its eventual parent image. The mask should be a bi-level image with pixel - values of '0' for ignored areas and '255' otherwise.
Use the overload taking an eVision.ERegion instead.
Deprecated in version 25.2. Scheduled to be removed in version 27.6.
| pattern | Model to be learned (ROI). |
| dontCare | "Don't care" area mask (ROI). |
| None eVision.EPatternFinder.Learn | ( | self, | |
| eVision.EVectorModel | model ) |
Learns a given pattern and stores it in the eVision.EPatternFinder.__init__ object.
Remarks:
Learning another pattern erases the information stored for the first one. A "don't care area" can be set as argument, allowing to mask and not take into account certain parts of the pattern while learning. The "don't care area" mask should have the same size as the pattern or as its eventual parent image. The mask should be a bi-level image with pixel - values of '0' for ignored areas and '255' otherwise.
| model | eVision.EVectorModel to be learned. |
| bool eVision.EPatternFinder.LearningDone | ( | self | ) |
Indicates whether a pattern has already been learned.
| bool eVision.EPatternFinder.LearningHasRegion | ( | self | ) |
Indicates whether a eVision.ERegion was used alongside the learned pattern.
Returns false if no learning was performed.
| None eVision.EPatternFinder.LearnPatterns | ( | self, | |
| list[eVision._eVision.EROIBW8 | None] | patterns ) |
Learns multiple (at least two) patterns.
Remarks:
Learning multiple patterns is useful when your object presents slight variations: shape deformation, lighting, perspective,... Each pattern is Learned and Found independently and only the best patterns are kept. The options of the eVision.EPatternFinder are used for all of the patterns. We recommend setting a eVision.EPatternFinder.MaxOverlap when using this feature.
| patterns | Vector of models to be learned (ROI). |
| None eVision.EPatternFinder.LearnPatterns | ( | self, | |
| list[eVision._eVision.EROIBW8 | None] | patterns, | ||
| eVision.EFrame | frame ) |
Learns multiple (at least two) patterns.
Remarks:
Learning multiple patterns is useful when your object presents slight variations: shape deformation, lighting, perspective,... Each pattern is Learned and Found independently and only the best patterns are kept. The options of the eVision.EPatternFinder are used for all of the patterns. We recommend setting a eVision.EPatternFinder.MaxOverlap when using this feature.
| patterns | Vector of models to be learned (ROI). |
| frame | Reference frame of the learned image |
| None eVision.EPatternFinder.LearnPatterns | ( | self, | |
| list[eVision._eVision.EROIBW8 | None] | patterns, | ||
| list[eVision._eVision.ERegion | None] | regions ) |
Learns multiple (at least two) patterns.
Remarks:
Learning multiple patterns is useful when your object presents slight variations: shape deformation, lighting, perspective,... Each pattern is Learned and Found independently and only the best patterns are kept. The options of the eVision.EPatternFinder are used for all of the patterns. We recommend setting a eVision.EPatternFinder.MaxOverlap when using this feature.
| patterns | Vector of models to be learned (ROI). |
| regions | Vector of regions into the ROI where the learning is performed |
| None eVision.EPatternFinder.LearnPatterns | ( | self, | |
| list[eVision._eVision.EROIBW8 | None] | patterns, | ||
| list[eVision._eVision.ERegion | None] | regions, | ||
| eVision.EFrame | frame ) |
Learns multiple (at least two) patterns.
Remarks:
Learning multiple patterns is useful when your object presents slight variations: shape deformation, lighting, perspective,... Each pattern is Learned and Found independently and only the best patterns are kept. The options of the eVision.EPatternFinder are used for all of the patterns. We recommend setting a eVision.EPatternFinder.MaxOverlap when using this feature.
| patterns | Vector of models to be learned (ROI). |
| regions | Vector of regions into the ROI where the learning is performed |
| frame | Reference frame of the learned image |
| int eVision.EPatternFinder.LearnTimeOut | ( | self | ) |
Time-out for the eVision.EPatternFinder.Learn and eVision.EPatternFinder.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.
| eVision.EPatternFinder.LearnTimeOut | ( | self, | |
| int | value ) |
Time-out for the eVision.EPatternFinder.Learn and eVision.EPatternFinder.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.
| float eVision.EPatternFinder.LightBalance | ( | self | ) |
Light balance, between [-1.0, 1.0].
Remarks:
In the eVision.EPatternType.ConsistentEdges and eVision.EPatternType.ThinStructure modes, the LightBalance property governs the selection of the feature points while learning the model. It drives which edge points are eligible as feature points in the model, by defining a criterion for ignoring those edge points that are not sharp enough. As a consequence, this property will influence the spatial distribution of the feature points. In the aforementioned operating modes, the feature points are the places in the image that exhibit a strong variation in the gray level signal. Mathematically, these places are those at which the magnitude of the gradient is significant. The LightBalance property defines the way the latter threshold on the magnitude of the gradient is computed, through a careful analysis of the dynamics of gradient. The more the LightBalance tends to -1, the more tolerant will be the threshold, and the more edge points will be considered as candidates for becoming feature points. Conversely, as the LightBalance property becomes close to 1, only the points with a high gradient magnitude are taken into consideration. In other words, a small LightBalance defines a loose criterion for defining what an edge point is, whereas a great value implies a conservative criterion. By default, this property is fixed to 0.0. This is an appropriate value for most images which are encountered in industrial machine vision. The LightBalance is automatically set to 0.0 after a learning process. Once the LightBalance is changed, a new learning process has to be done to take the new value into account. An efficient way to see the effect of changing this property is to use the eVision.EPatternFinder.DrawModel method.
| eVision.EPatternFinder.LightBalance | ( | self, | |
| float | value ) |
Light balance, between [-1.0, 1.0].
Remarks:
In the eVision.EPatternType.ConsistentEdges and eVision.EPatternType.ThinStructure modes, the LightBalance property governs the selection of the feature points while learning the model. It drives which edge points are eligible as feature points in the model, by defining a criterion for ignoring those edge points that are not sharp enough. As a consequence, this property will influence the spatial distribution of the feature points. In the aforementioned operating modes, the feature points are the places in the image that exhibit a strong variation in the gray level signal. Mathematically, these places are those at which the magnitude of the gradient is significant. The LightBalance property defines the way the latter threshold on the magnitude of the gradient is computed, through a careful analysis of the dynamics of gradient. The more the LightBalance tends to -1, the more tolerant will be the threshold, and the more edge points will be considered as candidates for becoming feature points. Conversely, as the LightBalance property becomes close to 1, only the points with a high gradient magnitude are taken into consideration. In other words, a small LightBalance defines a loose criterion for defining what an edge point is, whereas a great value implies a conservative criterion. By default, this property is fixed to 0.0. This is an appropriate value for most images which are encountered in industrial machine vision. The LightBalance is automatically set to 0.0 after a learning process. Once the LightBalance is changed, a new learning process has to be done to take the new value into account. An efficient way to see the effect of changing this property is to use the eVision.EPatternFinder.DrawModel method.
| None eVision.EPatternFinder.Load | ( | self, | |
| eVision.ESerializer | None | serializer ) |
Loads an eVision.EPatternFinder.The given eVision.EPatternFinder must have been created for reading.
| serializer | Pointer to the eVision.ESerializer created for reading. |
| None eVision.EPatternFinder.Load | ( | self, | |
| str | path ) |
Loads an eVision.EPatternFinder.The given eVision.EPatternFinder must have been created for reading.
| path | The file path. |
| eVision.ELocalSearchMode eVision.EPatternFinder.LocalSearchMode | ( | self | ) |
Sets the local search mode.
Remarks:
In the multi-stage approach of EasyFind, pattern occurrence candidates are at first found at the coarsest stage. Then, at each of the following stages, their position and score are refined until the last and finest one. This refining is achieved by searching for better candidates in the neighborhood of each of the ones found in the previous stage. The local search mode allows the user to set the extent of this neighborhood. By default, the local search mode is set to eVision.ELocalSearchMode.Basic.
| eVision.EPatternFinder.LocalSearchMode | ( | self, | |
| eVision.ELocalSearchMode | value ) |
Sets the local search mode.
Remarks:
In the multi-stage approach of EasyFind, pattern occurrence candidates are at first found at the coarsest stage. Then, at each of the following stages, their position and score are refined until the last and finest one. This refining is achieved by searching for better candidates in the neighborhood of each of the ones found in the previous stage. The local search mode allows the user to set the extent of this neighborhood. By default, the local search mode is set to eVision.ELocalSearchMode.Basic.
| int eVision.EPatternFinder.MaxFeaturePoints | ( | self | ) |
Maximum number of feature points at the fine stage.
Remarks:
Default: 1024. Reserved use.
| eVision.EPatternFinder.MaxFeaturePoints | ( | self, | |
| int | value ) |
Maximum number of feature points at the fine stage.
Remarks:
Default: 1024. Reserved use.
| float eVision.EPatternFinder.MaximumOverlapping | ( | self | ) |
Use eVision.EPatternFinder.MaxOverlap instead.
Deprecated in version 26.6. Scheduled to be removed in version 27.6.
| eVision.EPatternFinder.MaximumOverlapping | ( | self, | |
| float | value ) |
Use eVision.EPatternFinder.MaxOverlap instead.
Deprecated in version 26.6. Scheduled to be removed in version 27.6.
| int eVision.EPatternFinder.MaxInitialCandidates | ( | self | ) |
Maximum number of initial candidates.
Remarks:
During the search for matching patterns, EasyFind considers a set of candidates that it progressively refines. The maximum number of initial candidates must be greater or equal than the number of instances to be found (see eVision.EPatternFinder.MaxInstances). A large number of initial candidates can help finding difficult or partial match but at the cost of increasing processing time. A small number can help speeding up the find process. By default, the value for maximum number of initial candidates is 0, indicating that the value is chosen internally.
| eVision.EPatternFinder.MaxInitialCandidates | ( | self, | |
| int | value ) |
Maximum number of initial candidates.
Remarks:
During the search for matching patterns, EasyFind considers a set of candidates that it progressively refines. The maximum number of initial candidates must be greater or equal than the number of instances to be found (see eVision.EPatternFinder.MaxInstances). A large number of initial candidates can help finding difficult or partial match but at the cost of increasing processing time. A small number can help speeding up the find process. By default, the value for maximum number of initial candidates is 0, indicating that the value is chosen internally.
| int eVision.EPatternFinder.MaxInstances | ( | self | ) |
Maximum number of instances to be found.
Remarks:
Default: 1.
| eVision.EPatternFinder.MaxInstances | ( | self, | |
| int | value ) |
Maximum number of instances to be found.
Remarks:
Default: 1.
| float eVision.EPatternFinder.MaxOverlap | ( | self | ) |
Overlapping tolerance.
Remarks:
0.0 means all found patterns must be disconnected, 1.0 means they can fully overlap. Default: 1.0.
| eVision.EPatternFinder.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.
| int eVision.EPatternFinder.MinFeaturePoints | ( | self | ) |
Minimum number of feature points at the coarse stage.
Remarks:
Default: 8. Reserved use.
| eVision.EPatternFinder.MinFeaturePoints | ( | self, | |
| int | value ) |
Minimum number of feature points at the coarse stage.
Remarks:
Default: 8. Reserved use.
| float eVision.EPatternFinder.MinScore | ( | self | ) |
Minimum score of found instances, between [-1.0, 1.0].
Remarks:
Instances with a score under the MinScore will not be returned.
| eVision.EPatternFinder.MinScore | ( | self, | |
| float | value ) |
Minimum score of found instances, between [-1.0, 1.0].
Remarks:
Instances with a score under the MinScore will not be returned.
| int eVision.EPatternFinder.NumLearnedPatterns | ( | self | ) |
Indicates the number of patterns learnt.
0 is returned if no learning was performed.
| eVision.EPatternType eVision.EPatternFinder.PatternType | ( | self | ) |
Pattern type, as defined in eVision.EPatternType.
Remarks:
This property informs the eVision.EPatternFinder.__init__ of the general nature of the model to be learned. Default: eVision.EPatternType.ConsistentEdges.
| eVision.EPatternFinder.PatternType | ( | self, | |
| eVision.EPatternType | value ) |
Pattern type, as defined in eVision.EPatternType.
Remarks:
This property informs the eVision.EPatternFinder.__init__ of the general nature of the model to be learned. Default: eVision.EPatternType.ConsistentEdges.
| eVision.EPoint eVision.EPatternFinder.Pivot | ( | self | ) |
Reference point in the model.
Remarks:
The coordinates of the reference point are relative to the upper left corner of the model. The location of an instance (Coordinates (X,Y)) is the location of its reference point defined in the model. By default, the pivot is a eVision.EPoint set to the pattern center. eVision.EPoint is a structure that contains two x and y float values.
| eVision.EPatternFinder.Pivot | ( | self, | |
| eVision.EPoint | value ) |
Reference point in the model.
Remarks:
The coordinates of the reference point are relative to the upper left corner of the model. The location of an instance (Coordinates (X,Y)) is the location of its reference point defined in the model. By default, the pivot is a eVision.EPoint set to the pattern center. eVision.EPoint is a structure that contains two x and y float values.
| eVision.EReductionMode eVision.EPatternFinder.ReductionMode | ( | self | ) |
The reduction mode that is to be used when learning the model (automatic or manual), as defined in eVision.EReductionMode.
Remarks:
Specifies whether the best-guess method should be used to assert the level of reduction that will be used when learning the model. If this property is set to eVision.EReductionMode.Manual, it is up to the user to provide a suitable reduction strength. This value is only used when learning the model. Default: eVision.EReductionMode.Auto, which means that the best-guess algorithm is used by default.
| eVision.EPatternFinder.ReductionMode | ( | self, | |
| eVision.EReductionMode | value ) |
The reduction mode that is to be used when learning the model (automatic or manual), as defined in eVision.EReductionMode.
Remarks:
Specifies whether the best-guess method should be used to assert the level of reduction that will be used when learning the model. If this property is set to eVision.EReductionMode.Manual, it is up to the user to provide a suitable reduction strength. This value is only used when learning the model. Default: eVision.EReductionMode.Auto, which means that the best-guess algorithm is used by default.
| float eVision.EPatternFinder.ReductionStrength | ( | self | ) |
The reduction strength that is to be used when learning the model, between 0 and 1.
Remarks:
Specifies the reduction strength for learning the model (encoded as a percentage). Its precise semantics depends on the reduction mode (see the eVision.EPatternFinder.ReductionMode property):
| eVision.EPatternFinder.ReductionStrength | ( | self, | |
| float | value ) |
The reduction strength that is to be used when learning the model, between 0 and 1.
Remarks:
Specifies the reduction strength for learning the model (encoded as a percentage). Its precise semantics depends on the reduction mode (see the eVision.EPatternFinder.ReductionMode property):
| None eVision.EPatternFinder.Save | ( | self, | |
| eVision.ESerializer | None | serializer ) |
Loads an eVision.EPatternFinder.The given eVision.EPatternFinder must have been created for writing.
| serializer | Pointer to the eVision.ESerializer created for writing. |
| None eVision.EPatternFinder.Save | ( | self, | |
| str | path ) |
Loads an eVision.EPatternFinder.The given eVision.EPatternFinder must have been created for writing.
| path | The file path. |
| float eVision.EPatternFinder.ScaleBias | ( | self | ) |
Scale bias, expressed in units (not in percent).
Remarks:
The ScaleBias defines the scale factor between the model and the instances. Finding the pattern is performed in range ScaleBias +/- ScaleTolerance. This range should not exceed [0.5..2.5] (50% to 250% scaling). Default: 1.0 (100%).
| eVision.EPatternFinder.ScaleBias | ( | self, | |
| float | value ) |
Scale bias, expressed in units (not in percent).
Remarks:
The ScaleBias defines the scale factor between the model and the instances. Finding the pattern is performed in range ScaleBias +/- ScaleTolerance. This range should not exceed [0.5..2.5] (50% to 250% scaling). Default: 1.0 (100%).
| int eVision.EPatternFinder.ScaleSearchExtent | ( | self | ) |
The scaling extension of the search neighborhood.
Only odd values are allowed for this parameter. See the eVision.EPatternFinder.LocalSearchMode property description for further details.
| eVision.EPatternFinder.ScaleSearchExtent | ( | self, | |
| int | value ) |
The scaling extension of the search neighborhood.
Only odd values are allowed for this parameter. See the eVision.EPatternFinder.LocalSearchMode property description for further details.
| float eVision.EPatternFinder.ScaleTolerance | ( | self | ) |
Scale tolerance, expressed in units (not in percent).
Remarks:
The ScaleTolerance defines the scale allowance of the instances around the eVision.EPatternFinder.ScaleBias. Finding the pattern is performed in range eVision.EPatternFinder.ScaleBias +/- ScaleTolerance. This range should not exceed [0.5..2] (50 % to 200 % scaling). A NULL tolerance can be set, in which case the scale bias value is assumed. Default: 0.0.
| eVision.EPatternFinder.ScaleTolerance | ( | self, | |
| float | value ) |
Scale tolerance, expressed in units (not in percent).
Remarks:
The ScaleTolerance defines the scale allowance of the instances around the eVision.EPatternFinder.ScaleBias. Finding the pattern is performed in range eVision.EPatternFinder.ScaleBias +/- ScaleTolerance. This range should not exceed [0.5..2] (50 % to 200 % scaling). A NULL tolerance can be set, in which case the scale bias value is assumed. Default: 0.0.
| eVision.EThinStructureMode eVision.EPatternFinder.ThinStructureMode | ( | self | ) |
Mode for eVision.EPatternType.ThinStructure, as defined in eVision.EThinStructureMode.
Remarks:
eVision.EThinStructureMode informs EasyFind if thin elements in the model are darker or brighter than regions. Default: eVision.EThinStructureMode.Auto, which detects the best mode between dark or bright.
| eVision.EPatternFinder.ThinStructureMode | ( | self, | |
| eVision.EThinStructureMode | value ) |
Mode for eVision.EPatternType.ThinStructure, as defined in eVision.EThinStructureMode.
Remarks:
eVision.EThinStructureMode informs EasyFind if thin elements in the model are darker or brighter than regions. Default: eVision.EThinStructureMode.Auto, which detects the best mode between dark or bright.
| int eVision.EPatternFinder.XSearchExtent | ( | self | ) |
The X-axis extension of the search neighborhood.
Only odd values are allowed for this parameter. See the eVision.EPatternFinder.LocalSearchMode property description for further details.
| eVision.EPatternFinder.XSearchExtent | ( | self, | |
| int | value ) |
The X-axis extension of the search neighborhood.
Only odd values are allowed for this parameter. See the eVision.EPatternFinder.LocalSearchMode property description for further details.
| int eVision.EPatternFinder.YSearchExtent | ( | self | ) |
The Y-axis extension of the search neighborhood.
Only odd values are allowed for this parameter. See the eVision.EPatternFinder.LocalSearchMode property description for further details.
| eVision.EPatternFinder.YSearchExtent | ( | self, | |
| int | value ) |
The Y-axis extension of the search neighborhood.
Only odd values are allowed for this parameter. See the eVision.EPatternFinder.LocalSearchMode property description for further details.