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.

Properties

 Low = property(_Low__getter, None)
 Low threshold image for the adaptive segmentation.
 High = property(_High__getter, None)
 High threshold image for the adaptive segmentation.
 Registered = property(_Registered__getter, None)
 Represents the source image, after it has been aligned with the reference image.
 ToleranceX = property(_ToleranceX__getter, None)
 Current horizontal search tolerance, in pixels.
 ToleranceY = property(_ToleranceY__getter, None)
 Current vertical search tolerance, in pixels.
 NumAverageSamples = property(_NumAverageSamples__getter, None)
 Number of samples that were accumulated in the "average" phase of the training.
 NumDeviationSamples = property(_NumDeviationSamples__getter, None)
 Number of samples that were accumulated in the "deviation" phase of the training.
 Normalize = property(_Normalize__getter, _Normalize__setter)
 Current normalization mode.
 Average = property(_Average__getter, None)
 Global intensity of the mother image.
 Deviation = property(_Deviation__getter, None)
 Global contrast of the mother image.
 DegreesOfFreedom = property(_DegreesOfFreedom__getter, _DegreesOfFreedom__setter)
 Boolean combination of eVision.EDegreesOfFreedom members that indicates which degrees of freedom are to be considered.
 RelativeTolerance = property(_RelativeTolerance__getter, _RelativeTolerance__setter)
 Current tolerance factor to be used for threshold image setup.
 DarkGray = property(_DarkGray__getter, _DarkGray__setter)
 Gray level in the dark areas of the mother image.
 LightGray = property(_LightGray__getter, _LightGray__setter)
 Gray level in the light areas of the mother image.
 ZoomX = property(_ZoomX__getter, None)
 Current horizontal zooming factor for use in display operations.
 ZoomY = property(_ZoomY__getter, None)
 Current vertical zooming factor for use in display operations.
 PanX = property(_PanX__getter, None)
 Current horizontal panning value, expressed in pixels, for use in display operations.
 PanY = property(_PanY__getter, None)
 Current vertical panning value, expressed in pixels, for use in display operations.
 HitHandle = property(_HitHandle__getter, None)
 Handle currently hit.
 HitRoi = property(_HitRoi__getter, None)
 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.

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

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

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

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

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

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

Property Documentation

◆ Average

eVision.Legacy.EChecker.Average = property(_Average__getter, None)
static

Global intensity of the mother image.

Remarks:

Valid in mode eVision.ENormalizationMode.Moments only.

◆ DarkGray

eVision.Legacy.EChecker.DarkGray = property(_DarkGray__getter, _DarkGray__setter)
static

Gray level in the dark areas of the mother image.

Remarks:

Valid in mode eVision.ENormalizationMode.Threshold only.

◆ DegreesOfFreedom

eVision.Legacy.EChecker.DegreesOfFreedom = property(_DegreesOfFreedom__getter, _DegreesOfFreedom__setter)
static

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

◆ Deviation

eVision.Legacy.EChecker.Deviation = property(_Deviation__getter, None)
static

Global contrast of the mother image.

Remarks:

Valid in mode eVision.ENormalizationMode.Moments only.

◆ High

eVision.Legacy.EChecker.High = property(_High__getter, None)
static

High threshold image for the adaptive segmentation.

◆ HitHandle

eVision.Legacy.EChecker.HitHandle = property(_HitHandle__getter, None)
static

Handle currently hit.

◆ HitRoi

eVision.Legacy.EChecker.HitRoi = property(_HitRoi__getter, None)
static

ROI currently hit.

◆ LightGray

eVision.Legacy.EChecker.LightGray = property(_LightGray__getter, _LightGray__setter)
static

Gray level in the light areas of the mother image.

Remarks:

Valid in mode eVision.ENormalizationMode.Threshold only.

◆ Low

eVision.Legacy.EChecker.Low = property(_Low__getter, None)
static

Low threshold image for the adaptive segmentation.

◆ Normalize

eVision.Legacy.EChecker.Normalize = property(_Normalize__getter, _Normalize__setter)
static

Current normalization mode.

◆ NumAverageSamples

eVision.Legacy.EChecker.NumAverageSamples = property(_NumAverageSamples__getter, None)
static

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

◆ NumDeviationSamples

eVision.Legacy.EChecker.NumDeviationSamples = property(_NumDeviationSamples__getter, None)
static

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

◆ PanX

eVision.Legacy.EChecker.PanX = property(_PanX__getter, None)
static

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

◆ PanY

eVision.Legacy.EChecker.PanY = property(_PanY__getter, None)
static

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

◆ Registered

eVision.Legacy.EChecker.Registered = property(_Registered__getter, None)
static

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

◆ RelativeTolerance

eVision.Legacy.EChecker.RelativeTolerance = property(_RelativeTolerance__getter, _RelativeTolerance__setter)
static

Current tolerance factor to be used for threshold image setup.

◆ ToleranceX

eVision.Legacy.EChecker.ToleranceX = property(_ToleranceX__getter, None)
static

Current horizontal search tolerance, in pixels.

◆ ToleranceY

eVision.Legacy.EChecker.ToleranceY = property(_ToleranceY__getter, None)
static

Current vertical search tolerance, in pixels.

◆ ZoomX

eVision.Legacy.EChecker.ZoomX = property(_ZoomX__getter, None)
static

Current horizontal zooming factor for use in display operations.

◆ ZoomY

eVision.Legacy.EChecker.ZoomY = property(_ZoomY__getter, None)
static

Current vertical zooming factor for use in display operations.