eVision .NET API
Loading...
Searching...
No Matches
eVision.EChecker Class Reference

Manages a complete context for the EChecker golden template inspection tool. More...

Inheritance diagram for eVision.EChecker:
Collaboration diagram for eVision.EChecker:

Public Member Functions

 EChecker ()
 Constructs a golden template inspection context.
 EChecker (eVision.EChecker other)
 Constructs a golden template inspection context.
void Train (eVision.EROIBW8[] rois, eVision.EFrame[] frames, eVision.ERegion inspectionRegion)
 Train. The distribution of noise is estimated for each pixel based on the training images. At inspection, a pixel is validated it if is close enough to the average value on the training set. The size of that interval is proportional to EChecker.InspectionTolerance.
void Train (eVision.EROIBW8[] rois, eVision.EFrame[] frames)
 Train. The distribution of noise is estimated for each pixel based on the training images. At inspection, a pixel is validated it if is close enough to the average value on the training set. The size of that interval is proportional to EChecker.InspectionTolerance.
void Train (eVision.EROIBW8[] rois, eVision.ERegion inspectionRegion)
 Train. The distribution of noise is estimated for each pixel based on the training images. At inspection, a pixel is validated it if is close enough to the average value on the training set. The size of that interval is proportional to EChecker.InspectionTolerance.
void Train (eVision.EROIBW8[] rois)
 Train. The distribution of noise is estimated for each pixel based on the training images. At inspection, a pixel is validated it if is close enough to the average value on the training set. The size of that interval is proportional to EChecker.InspectionTolerance.
void TrainOnSingleImage (eVision.EROIBW8 roi, eVision.EFrame frame, eVision.ERegion inspectionRegion, uint geometricTolerance, uint grayLevelTolerance)
 Train on a single image. At inspection, a pixel is validated if it is above "the smallest pixel in a geometricTolerance vicinity" - grayLevelTolerance and below "the biggest pixel in a geometricTolerance vicinity" + grayLevelTolerance. EChecker.InspectionTolerance and EChecker.TrainingMode are ignored by this method.
void TrainOnSingleImage (eVision.EROIBW8 roi, eVision.EFrame frame, uint geometricTolerance, uint grayLevelTolerance)
 Train on a single image. At inspection, a pixel is validated if it is above "the smallest pixel in a geometricTolerance vicinity" - grayLevelTolerance and below "the biggest pixel in a geometricTolerance vicinity" + grayLevelTolerance. EChecker.InspectionTolerance and EChecker.TrainingMode are ignored by this method.
void TrainOnSingleImage (eVision.EROIBW8 roi, eVision.ERegion inspectionRegion, uint geometricTolerance, uint grayLevelTolerance)
 Train on a single image. At inspection, a pixel is validated if it is above "the smallest pixel in a geometricTolerance vicinity" - grayLevelTolerance and below "the biggest pixel in a geometricTolerance vicinity" + grayLevelTolerance. EChecker.InspectionTolerance and EChecker.TrainingMode are ignored by this method.
void TrainOnSingleImage (eVision.EROIBW8 roi, uint geometricTolerance, uint grayLevelTolerance)
 Train on a single image. At inspection, a pixel is validated if it is above "the smallest pixel in a geometricTolerance vicinity" - grayLevelTolerance and below "the biggest pixel in a geometricTolerance vicinity" + grayLevelTolerance. EChecker.InspectionTolerance and EChecker.TrainingMode are ignored by this method.
void ResetTraining ()
 Reset training. Use this if you want to reset the state of the object.
void Inspect (eVision.EROIBW8 roi, eVision.EFrame frame, eVision.ECodedImage2 defects)
 Inspect the image. The defects are returned in the referential images aligned on the inspection region. See EChecker.LowThresholdImage, EChecker.HighThresholdImage and EChecker.LastRegisteredImage.
void Inspect (eVision.EROIBW8 roi, eVision.ECodedImage2 defects)
 Inspect the image. The defects are returned in the referential images aligned on the inspection region. See EChecker.LowThresholdImage, EChecker.HighThresholdImage and EChecker.LastRegisteredImage.
void DrawInspectionRegion (eVision.EDrawAdapter graphicContext, float zoomX, float zoomY, float panX, float panY)
 Draws the inspection region on EChecker.LowThresholdImage, EChecker.HighThresholdImage or EChecker.LastRegisteredImage.
void DrawInspectionRegion (eVision.EDrawAdapter graphicContext, float zoomX, float zoomY, float panX)
 Draws the inspection region on EChecker.LowThresholdImage, EChecker.HighThresholdImage or EChecker.LastRegisteredImage.
void DrawInspectionRegion (eVision.EDrawAdapter graphicContext, float zoomX, float zoomY)
 Draws the inspection region on EChecker.LowThresholdImage, EChecker.HighThresholdImage or EChecker.LastRegisteredImage.
void DrawInspectionRegion (eVision.EDrawAdapter graphicContext, float zoomX)
 Draws the inspection region on EChecker.LowThresholdImage, EChecker.HighThresholdImage or EChecker.LastRegisteredImage.
void DrawInspectionRegion (eVision.EDrawAdapter graphicContext)
 Draws the inspection region on EChecker.LowThresholdImage, EChecker.HighThresholdImage or EChecker.LastRegisteredImage.
void Load (string file)
 Load an inspection model.
void Load (eVision.ESerializer serializer)
 Load an inspection model.
void Save (eVision.ESerializer serializer)
 Save the inspection model.
void Save (string file)
 Save the inspection model.

Properties

eVision.ETrainingMode TrainingMode [get, set]
 Training mode. The training mode determines which process will be used to build the threshold images used for inspection. EChecker has two training modes: A Quick mode, efficient for crude defects and stable images, and a Precise mode, designed for more subtle defects and handling more variability in the images. Default: Precise training mode.
eVision.ENormalizationMode NormalizationMode [get, set]
 Normalization mode. This setting allows you to specify if you want to enable normalization, and if yes, which type. Normalization allows the training and inspection processes to automatically correct global illumination differences between the images. Default: Moments based normalization.
float InspectionTolerance [get, set]
 Inspection Tolerance factor. If you need to be more tolerant towards noise, texture or illumination irregularities, raise this value. If you have clean images, low texture and some defects are missed, lower this value. Default value: 4.0.
eVision.EImageBW8 LowThresholdImage [get]
 Low threshold image.
eVision.EImageBW8 HighThresholdImage [get]
 High threshold image.
eVision.EImageBW8 LastRegisteredImage [get]
 Represents the last source image, after it has been aligned with the reference image and normalized.
eVision.ERegion InspectionRegion [get]
 Represents the inspection region, overlayed on EChecker.LowThresholdImage, EChecker.HighThresholdImage or EChecker.LastRegisteredImage.
bool IsTrained [get]
 Application state. Has the checker been trained.

Detailed Description

Manages a complete context for the EChecker golden template inspection tool.

License(s): EasyObject

Constructor & Destructor Documentation

◆ EChecker() [1/2]

eVision.EChecker.EChecker ( )

Constructs a golden template inspection context.

◆ EChecker() [2/2]

eVision.EChecker.EChecker ( eVision.EChecker other)

Constructs a golden template inspection context.

Parameters
otherThe EChecker to copy into this one.

Member Function Documentation

◆ DrawInspectionRegion() [1/5]

void eVision.EChecker.DrawInspectionRegion ( eVision.EDrawAdapter graphicContext)

Draws the inspection region on EChecker.LowThresholdImage, EChecker.HighThresholdImage or EChecker.LastRegisteredImage.

Parameters
graphicContextDevice context of the drawing window.

◆ DrawInspectionRegion() [2/5]

void eVision.EChecker.DrawInspectionRegion ( eVision.EDrawAdapter graphicContext,
float zoomX )

Draws the inspection region on EChecker.LowThresholdImage, EChecker.HighThresholdImage or EChecker.LastRegisteredImage.

Parameters
graphicContextDevice context of the drawing window.
zoomXMagnification factor for zooming in or out in the horizontal direction. By default, the image is displayed in true scale.

◆ DrawInspectionRegion() [3/5]

void eVision.EChecker.DrawInspectionRegion ( eVision.EDrawAdapter graphicContext,
float zoomX,
float zoomY )

Draws the inspection region on EChecker.LowThresholdImage, EChecker.HighThresholdImage or EChecker.LastRegisteredImage.

Parameters
graphicContextDevice context of the drawing window.
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).

◆ DrawInspectionRegion() [4/5]

void eVision.EChecker.DrawInspectionRegion ( eVision.EDrawAdapter graphicContext,
float zoomX,
float zoomY,
float panX )

Draws the inspection region on EChecker.LowThresholdImage, EChecker.HighThresholdImage or EChecker.LastRegisteredImage.

Parameters
graphicContextDevice context of the drawing window.
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 factor. By default, no panning occurs.

◆ DrawInspectionRegion() [5/5]

void eVision.EChecker.DrawInspectionRegion ( eVision.EDrawAdapter graphicContext,
float zoomX,
float zoomY,
float panX,
float panY )

Draws the inspection region on EChecker.LowThresholdImage, EChecker.HighThresholdImage or EChecker.LastRegisteredImage.

Parameters
graphicContextDevice context of the drawing window.
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 factor. By default, no panning occurs.
panYVertical panning factor. By default, no panning occurs.

◆ Inspect() [1/2]

void eVision.EChecker.Inspect ( eVision.EROIBW8 roi,
eVision.ECodedImage2 defects )

Inspect the image. The defects are returned in the referential images aligned on the inspection region. See EChecker.LowThresholdImage, EChecker.HighThresholdImage and EChecker.LastRegisteredImage.

Frame is assumed to be a default frame when not specified.

Parameters
roiROI or Image to inspect.
defectsList of defects returned by the inspection.

◆ Inspect() [2/2]

void eVision.EChecker.Inspect ( eVision.EROIBW8 roi,
eVision.EFrame frame,
eVision.ECodedImage2 defects )

Inspect the image. The defects are returned in the referential images aligned on the inspection region. See EChecker.LowThresholdImage, EChecker.HighThresholdImage and EChecker.LastRegisteredImage.

Frame is assumed to be a default frame when not specified.

Parameters
roiROI or Image to inspect.
frameFrame relative to roi.
defectsList of defects returned by the inspection.

◆ Load() [1/2]

void eVision.EChecker.Load ( eVision.ESerializer serializer)

Load an inspection model.

Parameters
serializerSerializer. Must be in read mode

◆ Load() [2/2]

void eVision.EChecker.Load ( string file)

Load an inspection model.

Parameters
fileFile path

◆ ResetTraining()

void eVision.EChecker.ResetTraining ( )

Reset training. Use this if you want to reset the state of the object.

◆ Save() [1/2]

void eVision.EChecker.Save ( eVision.ESerializer serializer)

Save the inspection model.

Parameters
serializerSerializer. Must be in write mode

◆ Save() [2/2]

void eVision.EChecker.Save ( string file)

Save the inspection model.

Parameters
fileFile path

◆ Train() [1/4]

void eVision.EChecker.Train ( eVision.EROIBW8[] rois)

Train. The distribution of noise is estimated for each pixel based on the training images. At inspection, a pixel is validated it if is close enough to the average value on the training set. The size of that interval is proportional to EChecker.InspectionTolerance.

Frames argument is assumed to be default frames if not specified (no transformation performed). Inspection region is assumed to be the whole image when not specified.

Parameters
roisROI or Images to train on.

◆ Train() [2/4]

void eVision.EChecker.Train ( eVision.EROIBW8[] rois,
eVision.EFrame[] frames )

Train. The distribution of noise is estimated for each pixel based on the training images. At inspection, a pixel is validated it if is close enough to the average value on the training set. The size of that interval is proportional to EChecker.InspectionTolerance.

Frames argument is assumed to be default frames if not specified (no transformation performed). Inspection region is assumed to be the whole image when not specified.

Parameters
roisROI or Images to train on.
framesFrames that correspond to each of the rois.

◆ Train() [3/4]

void eVision.EChecker.Train ( eVision.EROIBW8[] rois,
eVision.EFrame[] frames,
eVision.ERegion inspectionRegion )

Train. The distribution of noise is estimated for each pixel based on the training images. At inspection, a pixel is validated it if is close enough to the average value on the training set. The size of that interval is proportional to EChecker.InspectionTolerance.

Frames argument is assumed to be default frames if not specified (no transformation performed). Inspection region is assumed to be the whole image when not specified.

Parameters
roisROI or Images to train on.
framesFrames that correspond to each of the rois.
inspectionRegionRegion used for the inspection process.

◆ Train() [4/4]

void eVision.EChecker.Train ( eVision.EROIBW8[] rois,
eVision.ERegion inspectionRegion )

Train. The distribution of noise is estimated for each pixel based on the training images. At inspection, a pixel is validated it if is close enough to the average value on the training set. The size of that interval is proportional to EChecker.InspectionTolerance.

Frames argument is assumed to be default frames if not specified (no transformation performed). Inspection region is assumed to be the whole image when not specified.

Parameters
roisROI or Images to train on.
inspectionRegionRegion used for the inspection process.

◆ TrainOnSingleImage() [1/4]

void eVision.EChecker.TrainOnSingleImage ( eVision.EROIBW8 roi,
eVision.EFrame frame,
eVision.ERegion inspectionRegion,
uint geometricTolerance,
uint grayLevelTolerance )

Train on a single image. At inspection, a pixel is validated if it is above "the smallest pixel in a geometricTolerance vicinity" - grayLevelTolerance and below "the biggest pixel in a geometricTolerance vicinity" + grayLevelTolerance. EChecker.InspectionTolerance and EChecker.TrainingMode are ignored by this method.

Frame argument is assumed to be a default frame if not specified (no transformation performed). Inspection region is assumed to be the whole image when not specified.

Parameters
roiROI or Image to train on.
frameFrame that correspond to the roi.
inspectionRegionRegion used for the inspection process.
geometricToleranceTolerance in geometric space (in pixels).
grayLevelToleranceTolerance in gray level space.

◆ TrainOnSingleImage() [2/4]

void eVision.EChecker.TrainOnSingleImage ( eVision.EROIBW8 roi,
eVision.EFrame frame,
uint geometricTolerance,
uint grayLevelTolerance )

Train on a single image. At inspection, a pixel is validated if it is above "the smallest pixel in a geometricTolerance vicinity" - grayLevelTolerance and below "the biggest pixel in a geometricTolerance vicinity" + grayLevelTolerance. EChecker.InspectionTolerance and EChecker.TrainingMode are ignored by this method.

Frame argument is assumed to be a default frame if not specified (no transformation performed). Inspection region is assumed to be the whole image when not specified.

Parameters
roiROI or Image to train on.
frameFrame that correspond to the roi.
geometricToleranceTolerance in geometric space (in pixels).
grayLevelToleranceTolerance in gray level space.

◆ TrainOnSingleImage() [3/4]

void eVision.EChecker.TrainOnSingleImage ( eVision.EROIBW8 roi,
eVision.ERegion inspectionRegion,
uint geometricTolerance,
uint grayLevelTolerance )

Train on a single image. At inspection, a pixel is validated if it is above "the smallest pixel in a geometricTolerance vicinity" - grayLevelTolerance and below "the biggest pixel in a geometricTolerance vicinity" + grayLevelTolerance. EChecker.InspectionTolerance and EChecker.TrainingMode are ignored by this method.

Frame argument is assumed to be a default frame if not specified (no transformation performed). Inspection region is assumed to be the whole image when not specified.

Parameters
roiROI or Image to train on.
inspectionRegionRegion used for the inspection process.
geometricToleranceTolerance in geometric space (in pixels).
grayLevelToleranceTolerance in gray level space.

◆ TrainOnSingleImage() [4/4]

void eVision.EChecker.TrainOnSingleImage ( eVision.EROIBW8 roi,
uint geometricTolerance,
uint grayLevelTolerance )

Train on a single image. At inspection, a pixel is validated if it is above "the smallest pixel in a geometricTolerance vicinity" - grayLevelTolerance and below "the biggest pixel in a geometricTolerance vicinity" + grayLevelTolerance. EChecker.InspectionTolerance and EChecker.TrainingMode are ignored by this method.

Frame argument is assumed to be a default frame if not specified (no transformation performed). Inspection region is assumed to be the whole image when not specified.

Parameters
roiROI or Image to train on.
geometricToleranceTolerance in geometric space (in pixels).
grayLevelToleranceTolerance in gray level space.

Property Documentation

◆ HighThresholdImage

eVision.EImageBW8 eVision.EChecker.HighThresholdImage
get

High threshold image.

◆ InspectionRegion

eVision.ERegion eVision.EChecker.InspectionRegion
get

Represents the inspection region, overlayed on EChecker.LowThresholdImage, EChecker.HighThresholdImage or EChecker.LastRegisteredImage.

◆ InspectionTolerance

float eVision.EChecker.InspectionTolerance
getset

Inspection Tolerance factor. If you need to be more tolerant towards noise, texture or illumination irregularities, raise this value. If you have clean images, low texture and some defects are missed, lower this value. Default value: 4.0.

◆ IsTrained

bool eVision.EChecker.IsTrained
get

Application state. Has the checker been trained.

◆ LastRegisteredImage

eVision.EImageBW8 eVision.EChecker.LastRegisteredImage
get

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

◆ LowThresholdImage

eVision.EImageBW8 eVision.EChecker.LowThresholdImage
get

Low threshold image.

◆ NormalizationMode

eVision.ENormalizationMode eVision.EChecker.NormalizationMode
getset

Normalization mode. This setting allows you to specify if you want to enable normalization, and if yes, which type. Normalization allows the training and inspection processes to automatically correct global illumination differences between the images. Default: Moments based normalization.

If you have consistent illumination between your images, using normalization can prove detrimental, as in that case the defect themselves might be enough to shift the global contrast.

◆ TrainingMode

eVision.ETrainingMode eVision.EChecker.TrainingMode
getset

Training mode. The training mode determines which process will be used to build the threshold images used for inspection. EChecker has two training modes: A Quick mode, efficient for crude defects and stable images, and a Precise mode, designed for more subtle defects and handling more variability in the images. Default: Precise training mode.