Manages a complete context for the EChecker golden template inspection tool. More...
Public Member Functions | |
| None | __init__ (self) |
| Constructs a golden template inspection context. | |
| None | __init__ (self, eVision.EChecker other) |
| Constructs a golden template inspection context. | |
| None | Train (self, list[eVision._eVision.EROIBW8|None] rois, list[eVision._eVision.EFrame] frames, eVision.ERegion inspectionRegion) |
| Train. | |
| None | Train (self, list[eVision._eVision.EROIBW8|None] rois, list[eVision._eVision.EFrame] frames) |
| Train. | |
| None | Train (self, list[eVision._eVision.EROIBW8|None] rois, eVision.ERegion inspectionRegion) |
| Train. | |
| None | Train (self, list[eVision._eVision.EROIBW8|None] rois) |
| Train. | |
| None | TrainOnSingleImage (self, eVision.EROIBW8 roi, eVision.EFrame frame, eVision.ERegion inspectionRegion, int geometricTolerance, int grayLevelTolerance) |
| Train on a single image. | |
| None | TrainOnSingleImage (self, eVision.EROIBW8 roi, eVision.EFrame frame, int geometricTolerance, int grayLevelTolerance) |
| Train on a single image. | |
| None | TrainOnSingleImage (self, eVision.EROIBW8 roi, eVision.ERegion inspectionRegion, int geometricTolerance, int grayLevelTolerance) |
| Train on a single image. | |
| None | TrainOnSingleImage (self, eVision.EROIBW8 roi, int geometricTolerance, int grayLevelTolerance) |
| Train on a single image. | |
| None | ResetTraining (self) |
| Reset training. | |
| None | Inspect (self, eVision.EROIBW8 roi, eVision.EFrame frame, eVision.ECodedImage2 defects) |
| Inspect the image. | |
| None | Inspect (self, eVision.EROIBW8 roi, eVision.ECodedImage2 defects) |
| Inspect the image. | |
| None | DrawInspectionRegion (self, eVision.EDrawAdapter|None graphicContext, float zoomX, float zoomY, float panX, float panY) |
| Draws the inspection region on eVision.EChecker.LowThresholdImage, eVision.EChecker.HighThresholdImage or eVision.EChecker.LastRegisteredImage. | |
| None | DrawInspectionRegion (self, eVision.EDrawAdapter|None graphicContext, float zoomX, float zoomY, float panX) |
| Draws the inspection region on eVision.EChecker.LowThresholdImage, eVision.EChecker.HighThresholdImage or eVision.EChecker.LastRegisteredImage. | |
| None | DrawInspectionRegion (self, eVision.EDrawAdapter|None graphicContext, float zoomX, float zoomY) |
| Draws the inspection region on eVision.EChecker.LowThresholdImage, eVision.EChecker.HighThresholdImage or eVision.EChecker.LastRegisteredImage. | |
| None | DrawInspectionRegion (self, eVision.EDrawAdapter|None graphicContext, float zoomX) |
| Draws the inspection region on eVision.EChecker.LowThresholdImage, eVision.EChecker.HighThresholdImage or eVision.EChecker.LastRegisteredImage. | |
| None | DrawInspectionRegion (self, eVision.EDrawAdapter|None graphicContext) |
| Draws the inspection region on eVision.EChecker.LowThresholdImage, eVision.EChecker.HighThresholdImage or eVision.EChecker.LastRegisteredImage. | |
| None | Load (self, str file) |
| Load an inspection model. | |
| None | Load (self, eVision.ESerializer|None serializer) |
| Load an inspection model. | |
| None | Save (self, eVision.ESerializer|None serializer) |
| Save the inspection model. | |
| None | Save (self, str file) |
| Save the inspection model. | |
| eVision.ETrainingMode | TrainingMode (self) |
| Training mode. | |
| TrainingMode (self, eVision.ETrainingMode value) | |
| Training mode. | |
| eVision.ENormalizationMode | NormalizationMode (self) |
| Normalization mode. | |
| NormalizationMode (self, eVision.ENormalizationMode value) | |
| Normalization mode. | |
| float | InspectionTolerance (self) |
| Inspection Tolerance factor. | |
| InspectionTolerance (self, float value) | |
| Inspection Tolerance factor. | |
| eVision.EImageBW8 | LowThresholdImage (self) |
| Low threshold image. | |
| eVision.EImageBW8 | HighThresholdImage (self) |
| High threshold image. | |
| eVision.EImageBW8 | LastRegisteredImage (self) |
| Represents the last source image, after it has been aligned with the reference image and normalized. | |
| eVision.ERegion | InspectionRegion (self) |
| Represents the inspection region, overlayed on eVision.EChecker.LowThresholdImage, eVision.EChecker.HighThresholdImage or eVision.EChecker.LastRegisteredImage. | |
| bool | IsTrained (self) |
| Application state. | |
Manages a complete context for the EChecker golden template inspection tool.
Remarks:
License(s): EasyObject
| None eVision.EChecker.__init__ | ( | self | ) |
Constructs a golden template inspection context.
| None eVision.EChecker.__init__ | ( | self, | |
| eVision.EChecker | other ) |
Constructs a golden template inspection context.
| other | The eVision.EChecker to copy into this one. |
| None eVision.EChecker.DrawInspectionRegion | ( | self, | |
| eVision.EDrawAdapter | None | graphicContext ) |
Draws the inspection region on eVision.EChecker.LowThresholdImage, eVision.EChecker.HighThresholdImage or eVision.EChecker.LastRegisteredImage.
| graphicContext | Device context of the drawing window. |
| None eVision.EChecker.DrawInspectionRegion | ( | self, | |
| eVision.EDrawAdapter | None | graphicContext, | ||
| float | zoomX ) |
Draws the inspection region on eVision.EChecker.LowThresholdImage, eVision.EChecker.HighThresholdImage or eVision.EChecker.LastRegisteredImage.
| graphicContext | Device context of the drawing window. |
| zoomX | Magnification factor for zooming in or out in the horizontal direction. By default, the image is displayed in true scale. |
| None eVision.EChecker.DrawInspectionRegion | ( | self, | |
| eVision.EDrawAdapter | None | graphicContext, | ||
| float | zoomX, | ||
| float | zoomY ) |
Draws the inspection region on eVision.EChecker.LowThresholdImage, eVision.EChecker.HighThresholdImage or eVision.EChecker.LastRegisteredImage.
| graphicContext | Device context of the drawing window. |
| zoomX | Magnification factor for zooming in or out in the horizontal direction. By default, the image is displayed in true scale. |
| zoomY | Magnification 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). |
| None eVision.EChecker.DrawInspectionRegion | ( | self, | |
| eVision.EDrawAdapter | None | graphicContext, | ||
| float | zoomX, | ||
| float | zoomY, | ||
| float | panX ) |
Draws the inspection region on eVision.EChecker.LowThresholdImage, eVision.EChecker.HighThresholdImage or eVision.EChecker.LastRegisteredImage.
| graphicContext | Device context of the drawing window. |
| zoomX | Magnification factor for zooming in or out in the horizontal direction. By default, the image is displayed in true scale. |
| zoomY | Magnification 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). |
| panX | Horizontal panning factor. By default, no panning occurs. |
| None eVision.EChecker.DrawInspectionRegion | ( | self, | |
| eVision.EDrawAdapter | None | graphicContext, | ||
| float | zoomX, | ||
| float | zoomY, | ||
| float | panX, | ||
| float | panY ) |
Draws the inspection region on eVision.EChecker.LowThresholdImage, eVision.EChecker.HighThresholdImage or eVision.EChecker.LastRegisteredImage.
| graphicContext | Device context of the drawing window. |
| zoomX | Magnification factor for zooming in or out in the horizontal direction. By default, the image is displayed in true scale. |
| zoomY | Magnification 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). |
| panX | Horizontal panning factor. By default, no panning occurs. |
| panY | Vertical panning factor. By default, no panning occurs. |
| eVision.EImageBW8 eVision.EChecker.HighThresholdImage | ( | self | ) |
High threshold image.
| None eVision.EChecker.Inspect | ( | self, | |
| eVision.EROIBW8 | roi, | ||
| eVision.ECodedImage2 | defects ) |
Inspect the image.
The defects are returned in the referential images aligned on the inspection region. See eVision.EChecker.LowThresholdImage, eVision.EChecker.HighThresholdImage and eVision.EChecker.LastRegisteredImage.
Frame is assumed to be a default frame when not specified.
| roi | ROI or Image to inspect. |
| defects | List of defects returned by the inspection. |
| None eVision.EChecker.Inspect | ( | self, | |
| 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 eVision.EChecker.LowThresholdImage, eVision.EChecker.HighThresholdImage and eVision.EChecker.LastRegisteredImage.
Frame is assumed to be a default frame when not specified.
| roi | ROI or Image to inspect. |
| frame | Frame relative to roi. |
| defects | List of defects returned by the inspection. |
| eVision.ERegion eVision.EChecker.InspectionRegion | ( | self | ) |
Represents the inspection region, overlayed on eVision.EChecker.LowThresholdImage, eVision.EChecker.HighThresholdImage or eVision.EChecker.LastRegisteredImage.
| float eVision.EChecker.InspectionTolerance | ( | self | ) |
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.EChecker.InspectionTolerance | ( | self, | |
| float | value ) |
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
| bool eVision.EChecker.IsTrained | ( | self | ) |
Application state.
Has the checker been trained.
| eVision.EImageBW8 eVision.EChecker.LastRegisteredImage | ( | self | ) |
Represents the last source image, after it has been aligned with the reference image and normalized.
| None eVision.EChecker.Load | ( | self, | |
| eVision.ESerializer | None | serializer ) |
Load an inspection model.
| serializer | Serializer. Must be in read mode |
| None eVision.EChecker.Load | ( | self, | |
| str | file ) |
Load an inspection model.
| file | File path |
| eVision.EImageBW8 eVision.EChecker.LowThresholdImage | ( | self | ) |
Low threshold image.
| eVision.ENormalizationMode eVision.EChecker.NormalizationMode | ( | self | ) |
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.
Remarks:
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.
| eVision.EChecker.NormalizationMode | ( | self, | |
| eVision.ENormalizationMode | value ) |
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.
Remarks:
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.
| None eVision.EChecker.ResetTraining | ( | self | ) |
Reset training.
Use this if you want to reset the state of the object.
| None eVision.EChecker.Save | ( | self, | |
| eVision.ESerializer | None | serializer ) |
Save the inspection model.
| serializer | Serializer. Must be in write mode |
| None eVision.EChecker.Save | ( | self, | |
| str | file ) |
Save the inspection model.
| file | File path |
| None eVision.EChecker.Train | ( | self, | |
| list[eVision._eVision.EROIBW8 | None] | 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 eVision.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.
| rois | ROI or Images to train on. |
| None eVision.EChecker.Train | ( | self, | |
| list[eVision._eVision.EROIBW8 | None] | 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 eVision.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.
| rois | ROI or Images to train on. |
| inspectionRegion | Region used for the inspection process. |
| None eVision.EChecker.Train | ( | self, | |
| list[eVision._eVision.EROIBW8 | None] | rois, | ||
| list[eVision._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 eVision.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.
| rois | ROI or Images to train on. |
| frames | Frames that correspond to each of the rois. |
| None eVision.EChecker.Train | ( | self, | |
| list[eVision._eVision.EROIBW8 | None] | rois, | ||
| list[eVision._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 eVision.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.
| rois | ROI or Images to train on. |
| frames | Frames that correspond to each of the rois. |
| inspectionRegion | Region used for the inspection process. |
| eVision.ETrainingMode eVision.EChecker.TrainingMode | ( | self | ) |
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.EChecker.TrainingMode | ( | self, | |
| eVision.ETrainingMode | value ) |
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.
| None eVision.EChecker.TrainOnSingleImage | ( | self, | |
| eVision.EROIBW8 | roi, | ||
| eVision.EFrame | frame, | ||
| eVision.ERegion | inspectionRegion, | ||
| int | geometricTolerance, | ||
| int | 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. eVision.EChecker.InspectionTolerance and eVision.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.
| roi | ROI or Image to train on. |
| frame | Frame that correspond to the roi. |
| inspectionRegion | Region used for the inspection process. |
| geometricTolerance | Tolerance in geometric space (in pixels). |
| grayLevelTolerance | Tolerance in gray level space. |
| None eVision.EChecker.TrainOnSingleImage | ( | self, | |
| eVision.EROIBW8 | roi, | ||
| eVision.EFrame | frame, | ||
| int | geometricTolerance, | ||
| int | 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. eVision.EChecker.InspectionTolerance and eVision.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.
| roi | ROI or Image to train on. |
| frame | Frame that correspond to the roi. |
| geometricTolerance | Tolerance in geometric space (in pixels). |
| grayLevelTolerance | Tolerance in gray level space. |
| None eVision.EChecker.TrainOnSingleImage | ( | self, | |
| eVision.EROIBW8 | roi, | ||
| eVision.ERegion | inspectionRegion, | ||
| int | geometricTolerance, | ||
| int | 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. eVision.EChecker.InspectionTolerance and eVision.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.
| roi | ROI or Image to train on. |
| inspectionRegion | Region used for the inspection process. |
| geometricTolerance | Tolerance in geometric space (in pixels). |
| grayLevelTolerance | Tolerance in gray level space. |
| None eVision.EChecker.TrainOnSingleImage | ( | self, | |
| eVision.EROIBW8 | roi, | ||
| int | geometricTolerance, | ||
| int | 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. eVision.EChecker.InspectionTolerance and eVision.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.
| roi | ROI or Image to train on. |
| geometricTolerance | Tolerance in geometric space (in pixels). |
| grayLevelTolerance | Tolerance in gray level space. |