eVision Python API
Loading...
Searching...
No Matches
eVision.Legacy.EChecker Class Reference

Manages a complete context for the inspection tool based on image comparison in EasyOCV. More...

Public Member Functions

None __init__ (self)
 Constructs an uninitialized checker context.
None Attach (self, eVision.EROIBW8|None source)
 Associates a source image to a checker context.
None SetTolerance (self, int toleranceX, int toleranceY)
 Sets the search margin, i.e.
None Register (self)
 Realigns and normalizes the source image.
None Learn (self, eVision.ELearningMode mode)
 Accumulates a reference image, following a sequence of operations.
None EmptyPathNames (self)
 Clears the list of file pathnames.
None AddPathName (self, str pathName)
 Adds a single file pathname.
None BatchLearn (self, eVision.ELearningMode mode)
 Performs the learning sequence using the specified list of image files.
None SetZoom (self, float zoom)
 Sets the zooming factor for use in display operations.
None SetZoom (self, float zoomX, float zoomY)
 Sets the zooming factor for use in display operations.
None SetPan (self, float panX, float panY)
 Sets the panning value, expressed in pixels, for use in display operations.
None Draw (self, eVision.EDrawAdapter|None graphicContext, eVision.EDrawingMode drawingMode, bool handles, float zoomX, float zoomY, float panX, float panY)
 Draws one of the geometric items that define the eVision.Legacy.EChecker.__init__ tool.
None Draw (self, eVision.EDrawAdapter|None graphicContext, eVision.EDrawingMode drawingMode, bool handles, float zoomX, float zoomY, float panX)
 Draws one of the geometric items that define the eVision.Legacy.EChecker.__init__ tool.
None Draw (self, eVision.EDrawAdapter|None graphicContext, eVision.EDrawingMode drawingMode, bool handles, float zoomX, float zoomY)
 Draws one of the geometric items that define the eVision.Legacy.EChecker.__init__ tool.
None Draw (self, eVision.EDrawAdapter|None graphicContext, eVision.EDrawingMode drawingMode, bool handles, float zoomX)
 Draws one of the geometric items that define the eVision.Legacy.EChecker.__init__ tool.
None Draw (self, eVision.EDrawAdapter|None graphicContext, eVision.EDrawingMode drawingMode, bool handles)
 Draws one of the geometric items that define the eVision.Legacy.EChecker.__init__ tool.
None Draw (self, eVision.EDrawAdapter|None graphicContext, eVision.EDrawingMode drawingMode)
 Draws one of the geometric items that define the eVision.Legacy.EChecker.__init__ tool.
bool HitTest (self, int x, int y)
 Returns true if the cursor is over one of the dragging handles.
None Drag (self, int x, int y)
 Moves the relevant ROI by means of its handle.
None Load (self, eVision.ESerializer|None serializer)
 Loads the eVision.Legacy.EChecker.
None Load (self, str path)
 Loads the eVision.Legacy.EChecker.
None Save (self, eVision.ESerializer|None serializer)
 Saves the eVision.Legacy.EChecker.
None Save (self, str path)
 Saves the eVision.Legacy.EChecker.
eVision.EImageBW8|None Low (self)
 Low threshold image for the adaptive segmentation.
eVision.EImageBW8|None High (self)
 High threshold image for the adaptive segmentation.
eVision.EImageBW8|None Registered (self)
 Represents the source image, after it has been aligned with the reference image.
int ToleranceX (self)
 Current horizontal search tolerance, in pixels.
int ToleranceY (self)
 Current vertical search tolerance, in pixels.
int NumAverageSamples (self)
 Number of samples that were accumulated in the "average" phase of the training.
int NumDeviationSamples (self)
 Number of samples that were accumulated in the "deviation" phase of the training.
eVision.ENormalizationMode Normalize (self)
 Current normalization mode.
 Normalize (self, eVision.ENormalizationMode value)
 Current normalization mode.
float Average (self)
 Global intensity of the mother image.
float Deviation (self)
 Global contrast of the mother image.
int DegreesOfFreedom (self)
 Boolean combination of eVision.EDegreesOfFreedom members that indicates which degrees of freedom are to be considered.
 DegreesOfFreedom (self, int value)
 Boolean combination of eVision.EDegreesOfFreedom members that indicates which degrees of freedom are to be considered.
float RelativeTolerance (self)
 Current tolerance factor to be used for threshold image setup.
 RelativeTolerance (self, float value)
 Current tolerance factor to be used for threshold image setup.
float DarkGray (self)
 Gray level in the dark areas of the mother image.
 DarkGray (self, float value)
 Gray level in the dark areas of the mother image.
float LightGray (self)
 Gray level in the light areas of the mother image.
 LightGray (self, float value)
 Gray level in the light areas of the mother image.
float ZoomX (self)
 Current horizontal zooming factor for use in display operations.
float ZoomY (self)
 Current vertical zooming factor for use in display operations.
float PanX (self)
 Current horizontal panning value, expressed in pixels, for use in display operations.
float PanY (self)
 Current vertical panning value, expressed in pixels, for use in display operations.
eVision.EDragHandle HitHandle (self)
 Handle currently hit.
eVision.ERoiHit HitRoi (self)
 ROI currently hit.

Detailed Description

Manages a complete context for the inspection tool based on image comparison in EasyOCV.

Remarks:

License(s): EasyMatch and EasyObject and EasyImage

Deprecated

Use eVision.Legacy.EChecker.__init__ instead.

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

Constructor & Destructor Documentation

◆ __init__()

None eVision.Legacy.EChecker.__init__ ( self)

Constructs an uninitialized checker context.

Member Function Documentation

◆ AddPathName()

None eVision.Legacy.EChecker.AddPathName ( self,
str pathName )

Adds a single file pathname.

Parameters
pathNameNULL terminated text string containing the file pathname.

◆ Attach()

None eVision.Legacy.EChecker.Attach ( self,
eVision.EROIBW8 | None source )

Associates a source image to a checker context.

Remarks:

The source image is used in all consecutive learning/inspection operations.

Parameters
sourcePointer to the source image.

◆ Average()

float eVision.Legacy.EChecker.Average ( self)

Global intensity of the mother image.

Remarks:

Valid in mode eVision.ENormalizationMode.Moments only.

◆ BatchLearn()

None eVision.Legacy.EChecker.BatchLearn ( self,
eVision.ELearningMode mode )

Performs the learning sequence using the specified list of image files.

Parameters
modeeVision.ELearningMode.RmsDeviation or eVision.ELearningMode.AbsDeviation, depending on the preferred method of computing the deviations.

◆ DarkGray() [1/2]

float eVision.Legacy.EChecker.DarkGray ( self)

Gray level in the dark areas of the mother image.

Remarks:

Valid in mode eVision.ENormalizationMode.Threshold only.

◆ DarkGray() [2/2]

eVision.Legacy.EChecker.DarkGray ( self,
float value )

Gray level in the dark areas of the mother image.

Remarks:

Valid in mode eVision.ENormalizationMode.Threshold only.

◆ DegreesOfFreedom() [1/2]

int eVision.Legacy.EChecker.DegreesOfFreedom ( self)

Boolean combination of eVision.EDegreesOfFreedom members that indicates which degrees of freedom are to be considered.

◆ DegreesOfFreedom() [2/2]

eVision.Legacy.EChecker.DegreesOfFreedom ( self,
int value )

Boolean combination of eVision.EDegreesOfFreedom members that indicates which degrees of freedom are to be considered.

◆ Deviation()

float eVision.Legacy.EChecker.Deviation ( self)

Global contrast of the mother image.

Remarks:

Valid in mode eVision.ENormalizationMode.Moments only.

◆ Drag()

None eVision.Legacy.EChecker.Drag ( self,
int x,
int y )

Moves the relevant ROI by means of its handle.

Parameters
xNew horizontal cursor position.
yNew vertical cursor position.

◆ Draw() [1/6]

None eVision.Legacy.EChecker.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.EDrawingMode drawingMode )

Draws one of the geometric items that define the eVision.Legacy.EChecker.__init__ tool.

Parameters
graphicContextDevice context of the drawing window.
drawingModeROI to be drawn, as defined by eVision.EDrawingMode.

◆ Draw() [2/6]

None eVision.Legacy.EChecker.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.EDrawingMode drawingMode,
bool handles )

Draws one of the geometric items that define the eVision.Legacy.EChecker.__init__ tool.

Parameters
graphicContextDevice context of the drawing window.
drawingModeROI to be drawn, as defined by eVision.EDrawingMode.
handlestrue if the dragging handles must be displayed.

◆ Draw() [3/6]

None eVision.Legacy.EChecker.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.EDrawingMode drawingMode,
bool handles,
float zoomX )

Draws one of the geometric items that define the eVision.Legacy.EChecker.__init__ tool.

Parameters
graphicContextDevice context of the drawing window.
drawingModeROI to be drawn, as defined by eVision.EDrawingMode.
handlestrue if the dragging handles must be displayed.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, the image is displayed in true scale.

◆ Draw() [4/6]

None eVision.Legacy.EChecker.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.EDrawingMode drawingMode,
bool handles,
float zoomX,
float zoomY )

Draws one of the geometric items that define the eVision.Legacy.EChecker.__init__ tool.

Parameters
graphicContextDevice context of the drawing window.
drawingModeROI to be drawn, as defined by eVision.EDrawingMode.
handlestrue if the dragging handles must be displayed.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, the image is displayed in true scale.
zoomYMagnification factor for zooming in or out in the vertical direction. Setting a 0 value (which is the default) will result in isotropic scaling (i.e. equal horizontal and vertical factors).

◆ Draw() [5/6]

None eVision.Legacy.EChecker.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.EDrawingMode drawingMode,
bool handles,
float zoomX,
float zoomY,
float panX )

Draws one of the geometric items that define the eVision.Legacy.EChecker.__init__ tool.

Parameters
graphicContextDevice context of the drawing window.
drawingModeROI to be drawn, as defined by eVision.EDrawingMode.
handlestrue if the dragging handles must be displayed.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, the image is displayed in true scale.
zoomYMagnification factor for zooming in or out in the vertical direction. Setting a 0 value (which is the default) will result in isotropic scaling (i.e. equal horizontal and vertical factors).
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [6/6]

None eVision.Legacy.EChecker.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.EDrawingMode drawingMode,
bool handles,
float zoomX,
float zoomY,
float panX,
float panY )

Draws one of the geometric items that define the eVision.Legacy.EChecker.__init__ tool.

Parameters
graphicContextDevice context of the drawing window.
drawingModeROI to be drawn, as defined by eVision.EDrawingMode.
handlestrue if the dragging handles must be displayed.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, the image is displayed in true scale.
zoomYMagnification factor for zooming in or out in the vertical direction. Setting a 0 value (which is the default) will result in isotropic scaling (i.e. equal horizontal and vertical factors).
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ EmptyPathNames()

None eVision.Legacy.EChecker.EmptyPathNames ( self)

Clears the list of file pathnames.

◆ High()

eVision.EImageBW8 | None eVision.Legacy.EChecker.High ( self)

High threshold image for the adaptive segmentation.

◆ HitHandle()

eVision.EDragHandle eVision.Legacy.EChecker.HitHandle ( self)

Handle currently hit.

◆ HitRoi()

eVision.ERoiHit eVision.Legacy.EChecker.HitRoi ( self)

ROI currently hit.

◆ HitTest()

bool eVision.Legacy.EChecker.HitTest ( self,
int x,
int y )

Returns true if the cursor is over one of the dragging handles.

Remarks:

In this case, eVision.Legacy.EChecker.HitRoi returns the name of the ROI that has been hit, and eVision.Legacy.EChecker.HitHandle returns the name of the corresponding handle.

Parameters
xCurrent horizontal cursor position.
yCurrent vertical cursor position.

◆ Learn()

None eVision.Legacy.EChecker.Learn ( self,
eVision.ELearningMode mode )

Accumulates a reference image, following a sequence of operations.

Remarks:

First the model is reset; then the matching patterns are shown; next a series of images is presented to estimate the average gray levels; then a second series of images is presented to estimate the gray-level variations; finally, the threshold images are generated. A typical sequence with three reference images goes as follows:

For standard deviation estimation:

For robust deviation estimation:

Parameters
modeCurrent mode of operation in the learning sequence, as defined by eVision.ELearningMode.

◆ LightGray() [1/2]

float eVision.Legacy.EChecker.LightGray ( self)

Gray level in the light areas of the mother image.

Remarks:

Valid in mode eVision.ENormalizationMode.Threshold only.

◆ LightGray() [2/2]

eVision.Legacy.EChecker.LightGray ( self,
float value )

Gray level in the light areas of the mother image.

Remarks:

Valid in mode eVision.ENormalizationMode.Threshold only.

◆ Load() [1/2]

None eVision.Legacy.EChecker.Load ( self,
eVision.ESerializer | None serializer )

Loads the eVision.Legacy.EChecker.

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

Parameters
serializerThe serializer.

◆ Load() [2/2]

None eVision.Legacy.EChecker.Load ( self,
str path )

Loads the eVision.Legacy.EChecker.

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

Parameters
pathThe file path.

◆ Low()

eVision.EImageBW8 | None eVision.Legacy.EChecker.Low ( self)

Low threshold image for the adaptive segmentation.

◆ Normalize() [1/2]

eVision.ENormalizationMode eVision.Legacy.EChecker.Normalize ( self)

Current normalization mode.

◆ Normalize() [2/2]

eVision.Legacy.EChecker.Normalize ( self,
eVision.ENormalizationMode value )

Current normalization mode.

◆ NumAverageSamples()

int eVision.Legacy.EChecker.NumAverageSamples ( self)

Number of samples that were accumulated in the "average" phase of the training.

◆ NumDeviationSamples()

int eVision.Legacy.EChecker.NumDeviationSamples ( self)

Number of samples that were accumulated in the "deviation" phase of the training.

◆ PanX()

float eVision.Legacy.EChecker.PanX ( self)

Current horizontal panning value, expressed in pixels, for use in display operations.

◆ PanY()

float eVision.Legacy.EChecker.PanY ( self)

Current vertical panning value, expressed in pixels, for use in display operations.

◆ Register()

None eVision.Legacy.EChecker.Register ( self)

Realigns and normalizes the source image.

Remarks:

Only the inspected ROI is processed. The first time this function is called, the current pattern ROI are used to define the search patterns. After registration, public member eVision.Legacy.EChecker.Registered contains the realigned, normalized contents of the inspected ROI.

◆ Registered()

eVision.EImageBW8 | None eVision.Legacy.EChecker.Registered ( self)

Represents the source image, after it has been aligned with the reference image.

◆ RelativeTolerance() [1/2]

float eVision.Legacy.EChecker.RelativeTolerance ( self)

Current tolerance factor to be used for threshold image setup.

◆ RelativeTolerance() [2/2]

eVision.Legacy.EChecker.RelativeTolerance ( self,
float value )

Current tolerance factor to be used for threshold image setup.

◆ Save() [1/2]

None eVision.Legacy.EChecker.Save ( self,
eVision.ESerializer | None serializer )

Saves the eVision.Legacy.EChecker.

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

Parameters
serializerThe serializer.

◆ Save() [2/2]

None eVision.Legacy.EChecker.Save ( self,
str path )

Saves the eVision.Legacy.EChecker.

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

Parameters
pathThe file path.

◆ SetPan()

None eVision.Legacy.EChecker.SetPan ( self,
float panX,
float panY )

Sets the panning value, expressed in pixels, for use in display operations.

Parameters
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ SetTolerance()

None eVision.Legacy.EChecker.SetTolerance ( self,
int toleranceX,
int toleranceY )

Sets the search margin, i.e.

the width and height of the search area surrounding the alignment pattern(s).

Parameters
toleranceXHorizontal search tolerance, in pixels.
toleranceYVertical search tolerance, in pixels.

◆ SetZoom() [1/2]

None eVision.Legacy.EChecker.SetZoom ( self,
float zoom )

Sets the zooming factor for use in display operations.

Parameters
zoomMagnification factor for zooming in or out in the horizontal and vertical directions (isotropic scaling).

◆ SetZoom() [2/2]

None eVision.Legacy.EChecker.SetZoom ( self,
float zoomX,
float zoomY )

Sets the zooming factor for use in display operations.

Parameters
zoomXMagnification factor for zooming in or out in the horizontal direction.
zoomYMagnification factor for zooming in or out in the vertical direction.

◆ ToleranceX()

int eVision.Legacy.EChecker.ToleranceX ( self)

Current horizontal search tolerance, in pixels.

◆ ToleranceY()

int eVision.Legacy.EChecker.ToleranceY ( self)

Current vertical search tolerance, in pixels.

◆ ZoomX()

float eVision.Legacy.EChecker.ZoomX ( self)

Current horizontal zooming factor for use in display operations.

◆ ZoomY()

float eVision.Legacy.EChecker.ZoomY ( self)

Current vertical zooming factor for use in display operations.