eVision.ESpotDetector is dedicated to the detection of spots, particles and scratches on images. More...
Public Member Functions | |
| None | __init__ (self) |
| Constructs an eVision.ESpotDetector with default configuration. | |
| None | __init__ (self, eVision.ESpotDetector other) |
| Copy constructor for eVision.ESpotDetector. | |
| None | Load (self, str path) |
| Loads the eVision.ESpotDetector. | |
| None | Load (self, eVision.ESerializer|None serializer) |
| Loads the eVision.ESpotDetector. | |
| None | Save (self, str path) |
| Saves the eVision.ESpotDetector. | |
| None | Save (self, eVision.ESerializer|None serializer) |
| Saves the eVision.ESpotDetector. | |
| None | GetParticleDetectionParameters (self, eVision.EParticleDetectionParameters parameters) |
| Gets the particle detection parameters. | |
| None | GetScratchDetectionParameters (self, eVision.EScratchDetectionParameters parameters) |
| Gets the scratch detection parameters. | |
| int | Detect (self, eVision.EROIBW8 sourceImage) |
| Performs the spot detection in the given eVision.EROIBW8. | |
| int | Detect (self, eVision.EROIBW8 sourceImage, eVision.ERegion region) |
| Performs the spot detection in the given eVision.EROIBW8. | |
| int | Detect (self, eVision.EROIBW8 sourceImage, eVision.EFrame frame) |
| Performs the spot detection in the given eVision.EROIBW8. | |
| int | Detect (self, eVision.EROIBW8 sourceImage, eVision.ERegion region, eVision.EFrame frame) |
| Performs the spot detection in the given eVision.EROIBW8. | |
| None | GenerateSegmentationMap (self, eVision.EImageBW8 map) |
| Returns the last computed segmentation map. | |
| None | Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.ERGBColor color, float zoomX, float zoomY, float panX, float panY) |
| Draw the eVision.ESpotDetector. | |
| None | Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.ERGBColor color, float zoomX, float zoomY, float panX) |
| Draw the eVision.ESpotDetector. | |
| None | Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.ERGBColor color, float zoomX, float zoomY) |
| Draw the eVision.ESpotDetector. | |
| None | Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.ERGBColor color, float zoomX) |
| Draw the eVision.ESpotDetector. | |
| None | Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.ERGBColor color) |
| Draw the eVision.ESpotDetector. | |
| None | Draw (self, eVision.EDrawAdapter|None drawAdapter) |
| Draw the eVision.ESpotDetector. | |
| int | AddDetectedSpotsToDLProject (self, str projectPath, int roiExtension, str imageName, int noDefectSamples, str noDefectLabel) |
| To be called after eVision.ESpotDetector.Detect to add the detected spots to a new or existing EDeepLearningProject. | |
| int | AddDetectedSpotsToDLProject (self, str projectPath, int roiExtension, str imageName, int noDefectSamples) |
| To be called after eVision.ESpotDetector.Detect to add the detected spots to a new or existing EDeepLearningProject. | |
| int | AddDetectedSpotsToDLProject (self, str projectPath, int roiExtension, str imageName) |
| To be called after eVision.ESpotDetector.Detect to add the detected spots to a new or existing EDeepLearningProject. | |
| int | AddDetectedSpotsToDLProject (self, str projectPath, int roiExtension) |
| To be called after eVision.ESpotDetector.Detect to add the detected spots to a new or existing EDeepLearningProject. | |
| int | AddDetectedSpotsToDLProject (self, str projectPath) |
| To be called after eVision.ESpotDetector.Detect to add the detected spots to a new or existing EDeepLearningProject. | |
| None | UnsetDLClassifier (self) |
| Disable the usage of the Deep Learning classifier. | |
| bool | IsDLClassifierSet (self) |
| Returns True if a classifier has been loaded. | |
| bool | EnableAlignment (self) |
| Enables or disables the optional alignment process. | |
| EnableAlignment (self, bool value) | |
| Enables or disables the optional alignment process. | |
| eVision.ERectangle | AlignmentArea (self) |
| Sets/Gets an initial estimate of the rectangle on which spots will be detected in the image. | |
| AlignmentArea (self, eVision.ERectangle value) | |
| Sets/Gets an initial estimate of the rectangle on which spots will be detected in the image. | |
| int | AlignmentTolerance (self) |
| Sets/Gets the tolerance around the initial estimate of the alignment area, in pixels. | |
| AlignmentTolerance (self, int value) | |
| Sets/Gets the tolerance around the initial estimate of the alignment area, in pixels. | |
| eVision.EGuardBand | GuardBand (self) |
| Sets/Gets the eVision.EGuardBand. | |
| GuardBand (self, eVision.EGuardBand value) | |
| Sets/Gets the eVision.EGuardBand. | |
| bool | EnableParticleDetection (self) |
| Sets/Gets the particle detection processing. | |
| EnableParticleDetection (self, bool value) | |
| Sets/Gets the particle detection processing. | |
| bool | EnableScratchDetection (self) |
| Sets/Gets the scratch detection processing. | |
| EnableScratchDetection (self, bool value) | |
| Sets/Gets the scratch detection processing. | |
| list[eVision._eVision.ESpot] | Spots (self) |
| Gets the spots detected by a previous call to eVision.ESpotDetector.Detect. | |
| int | NumSpots (self) |
| Gets the number of spots detected by a previous call to eVision.ESpotDetector.Detect. | |
| eVision.EROIBW8 | SourceROI (self) |
| Gets the last used Region Of Interest, after optionnal alignment and guard band clipping. | |
| str | DLClassifierPath (self) |
| Opens a DL classifier and use it to classify all further detected spots. | |
| DLClassifierPath (self, str value) | |
| Opens a DL classifier and use it to classify all further detected spots. | |
| eVision.EasyDeepLearning.EDeepLearningExecutionSettings | DLExecutionSettings (self) |
| Controls the execution settings of the DL Classifier. | |
| DLExecutionSettings (self, eVision.EasyDeepLearning.EDeepLearningExecutionSettings value) | |
| Controls the execution settings of the DL Classifier. | |
Protected Member Functions | |
| _ParticleDetectionParameters__setter (self, eVision.EParticleDetectionParameters value) | |
| Sets the particle detection parameters. | |
| _ScratchDetectionParameters__setter (self, eVision.EScratchDetectionParameters value) | |
| Sets the scratch detection parameters. | |
Properties | |
| ParticleDetectionParameters | |
| ScratchDetectionParameters | |
eVision.ESpotDetector is dedicated to the detection of spots, particles and scratches on images.
It is especially efficient at detecting faint contaminations on noisy surface images. It produces a list of eVision.ESpot objects.
Remarks:
License(s): EasySpotDetector
| None eVision.ESpotDetector.__init__ | ( | self | ) |
Constructs an eVision.ESpotDetector with default configuration.
| None eVision.ESpotDetector.__init__ | ( | self, | |
| eVision.ESpotDetector | other ) |
Copy constructor for eVision.ESpotDetector.
| other | The other eVision.ESpotDetector that we will copy into this one. |
|
protected |
Sets the particle detection parameters.
|
protected |
Sets the scratch detection parameters.
| int eVision.ESpotDetector.AddDetectedSpotsToDLProject | ( | self, | |
| str | projectPath ) |
To be called after eVision.ESpotDetector.Detect to add the detected spots to a new or existing EDeepLearningProject.
This method returns the number of spots added.
The image used by eVision.ESpotDetector.Detect is copied to a subdirectory 'Images' of the project file and linked in the project. All detected spots are added to the project as ROI of the image, with the label depending on the spot type ('Particle' or 'Scratch'). Optional parameter roiExtension can be used to increase the ROI size by a pixel amount. It could help the deep learning inference to have a 'context' around the ROI. Automatic image names are generated unless the parameter imageName is set. All images must have a different name. The optional parameter noDefectSamples sets the number of extra ROIs added to the project representing areas without defect. The label of these defects are given by parameter noDefectLabel.
| projectPath | The path to the Deep Learning project (usually a file with edlproject extension). |
| int eVision.ESpotDetector.AddDetectedSpotsToDLProject | ( | self, | |
| str | projectPath, | ||
| int | roiExtension ) |
To be called after eVision.ESpotDetector.Detect to add the detected spots to a new or existing EDeepLearningProject.
This method returns the number of spots added.
The image used by eVision.ESpotDetector.Detect is copied to a subdirectory 'Images' of the project file and linked in the project. All detected spots are added to the project as ROI of the image, with the label depending on the spot type ('Particle' or 'Scratch'). Optional parameter roiExtension can be used to increase the ROI size by a pixel amount. It could help the deep learning inference to have a 'context' around the ROI. Automatic image names are generated unless the parameter imageName is set. All images must have a different name. The optional parameter noDefectSamples sets the number of extra ROIs added to the project representing areas without defect. The label of these defects are given by parameter noDefectLabel.
| projectPath | The path to the Deep Learning project (usually a file with edlproject extension). |
| roiExtension | The ROI extension in pixels. Default value is 5. |
| int eVision.ESpotDetector.AddDetectedSpotsToDLProject | ( | self, | |
| str | projectPath, | ||
| int | roiExtension, | ||
| str | imageName ) |
To be called after eVision.ESpotDetector.Detect to add the detected spots to a new or existing EDeepLearningProject.
This method returns the number of spots added.
The image used by eVision.ESpotDetector.Detect is copied to a subdirectory 'Images' of the project file and linked in the project. All detected spots are added to the project as ROI of the image, with the label depending on the spot type ('Particle' or 'Scratch'). Optional parameter roiExtension can be used to increase the ROI size by a pixel amount. It could help the deep learning inference to have a 'context' around the ROI. Automatic image names are generated unless the parameter imageName is set. All images must have a different name. The optional parameter noDefectSamples sets the number of extra ROIs added to the project representing areas without defect. The label of these defects are given by parameter noDefectLabel.
| projectPath | The path to the Deep Learning project (usually a file with edlproject extension). |
| roiExtension | The ROI extension in pixels. Default value is 5. |
| imageName | Override the default image name. |
| int eVision.ESpotDetector.AddDetectedSpotsToDLProject | ( | self, | |
| str | projectPath, | ||
| int | roiExtension, | ||
| str | imageName, | ||
| int | noDefectSamples ) |
To be called after eVision.ESpotDetector.Detect to add the detected spots to a new or existing EDeepLearningProject.
This method returns the number of spots added.
The image used by eVision.ESpotDetector.Detect is copied to a subdirectory 'Images' of the project file and linked in the project. All detected spots are added to the project as ROI of the image, with the label depending on the spot type ('Particle' or 'Scratch'). Optional parameter roiExtension can be used to increase the ROI size by a pixel amount. It could help the deep learning inference to have a 'context' around the ROI. Automatic image names are generated unless the parameter imageName is set. All images must have a different name. The optional parameter noDefectSamples sets the number of extra ROIs added to the project representing areas without defect. The label of these defects are given by parameter noDefectLabel.
| projectPath | The path to the Deep Learning project (usually a file with edlproject extension). |
| roiExtension | The ROI extension in pixels. Default value is 5. |
| imageName | Override the default image name. |
| noDefectSamples | Number of extra ROI to be created to represent areas without defect. Default value is 0. |
| int eVision.ESpotDetector.AddDetectedSpotsToDLProject | ( | self, | |
| str | projectPath, | ||
| int | roiExtension, | ||
| str | imageName, | ||
| int | noDefectSamples, | ||
| str | noDefectLabel ) |
To be called after eVision.ESpotDetector.Detect to add the detected spots to a new or existing EDeepLearningProject.
This method returns the number of spots added.
The image used by eVision.ESpotDetector.Detect is copied to a subdirectory 'Images' of the project file and linked in the project. All detected spots are added to the project as ROI of the image, with the label depending on the spot type ('Particle' or 'Scratch'). Optional parameter roiExtension can be used to increase the ROI size by a pixel amount. It could help the deep learning inference to have a 'context' around the ROI. Automatic image names are generated unless the parameter imageName is set. All images must have a different name. The optional parameter noDefectSamples sets the number of extra ROIs added to the project representing areas without defect. The label of these defects are given by parameter noDefectLabel.
| projectPath | The path to the Deep Learning project (usually a file with edlproject extension). |
| roiExtension | The ROI extension in pixels. Default value is 5. |
| imageName | Override the default image name. |
| noDefectSamples | Number of extra ROI to be created to represent areas without defect. Default value is 0. |
| noDefectLabel | The label for the extra ROI (if noDefectSamples>0). Default value is 'NotADefect'. |
| eVision.ERectangle eVision.ESpotDetector.AlignmentArea | ( | self | ) |
Sets/Gets an initial estimate of the rectangle on which spots will be detected in the image.
The alignment process is enabled with eVision.ESpotDetector.EnableAlignment. To perform the alignment, a tolerance must be set as well, see eVision.ESpotDetector.AlignmentTolerance.
| eVision.ESpotDetector.AlignmentArea | ( | self, | |
| eVision.ERectangle | value ) |
Sets/Gets an initial estimate of the rectangle on which spots will be detected in the image.
The alignment process is enabled with eVision.ESpotDetector.EnableAlignment. To perform the alignment, a tolerance must be set as well, see eVision.ESpotDetector.AlignmentTolerance.
| int eVision.ESpotDetector.AlignmentTolerance | ( | self | ) |
Sets/Gets the tolerance around the initial estimate of the alignment area, in pixels.
The default is 100 pixels. See also eVision.ESpotDetector.AlignmentArea.
| eVision.ESpotDetector.AlignmentTolerance | ( | self, | |
| int | value ) |
Sets/Gets the tolerance around the initial estimate of the alignment area, in pixels.
The default is 100 pixels. See also eVision.ESpotDetector.AlignmentArea.
| int eVision.ESpotDetector.Detect | ( | self, | |
| eVision.EROIBW8 | sourceImage ) |
Performs the spot detection in the given eVision.EROIBW8.
It returns the number of spot detected. Use eVision.ESpotDetector.Spots the retrieve the list of detected spots.
| sourceImage | The image in which the spots are detected. |
| int eVision.ESpotDetector.Detect | ( | self, | |
| eVision.EROIBW8 | sourceImage, | ||
| eVision.EFrame | frame ) |
Performs the spot detection in the given eVision.EROIBW8.
It returns the number of spot detected. Use eVision.ESpotDetector.Spots the retrieve the list of detected spots.
| sourceImage | The image in which the spots are detected. |
| frame | Reference frame of the input region |
| int eVision.ESpotDetector.Detect | ( | self, | |
| eVision.EROIBW8 | sourceImage, | ||
| eVision.ERegion | region ) |
Performs the spot detection in the given eVision.EROIBW8.
It returns the number of spot detected. Use eVision.ESpotDetector.Spots the retrieve the list of detected spots.
| sourceImage | The image in which the spots are detected. |
| region | The region on which the image is processed. |
| int eVision.ESpotDetector.Detect | ( | self, | |
| eVision.EROIBW8 | sourceImage, | ||
| eVision.ERegion | region, | ||
| eVision.EFrame | frame ) |
Performs the spot detection in the given eVision.EROIBW8.
It returns the number of spot detected. Use eVision.ESpotDetector.Spots the retrieve the list of detected spots.
| sourceImage | The image in which the spots are detected. |
| region | The region on which the image is processed. |
| frame | Reference frame of the input region |
| str eVision.ESpotDetector.DLClassifierPath | ( | self | ) |
Opens a DL classifier and use it to classify all further detected spots.
The resulting class is stored in eVision.ESpot. Use eVision.ESpotDetector.UnsetDLClassifier to remove the Deep Learning classification. Setting a Deep Learning Classifier triggers an initialization of the model. The initialization can take a few milliseconds to several minutes depending on the engine and device selected.
| eVision.ESpotDetector.DLClassifierPath | ( | self, | |
| str | value ) |
Opens a DL classifier and use it to classify all further detected spots.
The resulting class is stored in eVision.ESpot. Use eVision.ESpotDetector.UnsetDLClassifier to remove the Deep Learning classification. Setting a Deep Learning Classifier triggers an initialization of the model. The initialization can take a few milliseconds to several minutes depending on the engine and device selected.
| eVision.EasyDeepLearning.EDeepLearningExecutionSettings eVision.ESpotDetector.DLExecutionSettings | ( | self | ) |
Controls the execution settings of the DL Classifier.
Set the class eVision.EasyDeepLearning.EDeepLearningExecutionSettings to choose between engines, devices and other inference parameters. Changing the execution settings triggers an initialization of the deep learning model. The initialization can take a few milliseconds to several minutes depending on the engine and device selected.
| eVision.ESpotDetector.DLExecutionSettings | ( | self, | |
| eVision.EasyDeepLearning.EDeepLearningExecutionSettings | value ) |
Controls the execution settings of the DL Classifier.
Set the class eVision.EasyDeepLearning.EDeepLearningExecutionSettings to choose between engines, devices and other inference parameters. Changing the execution settings triggers an initialization of the deep learning model. The initialization can take a few milliseconds to several minutes depending on the engine and device selected.
| None eVision.ESpotDetector.Draw | ( | self, | |
| eVision.EDrawAdapter | None | drawAdapter ) |
Draw the eVision.ESpotDetector.
| drawAdapter | eVision.EDrawAdapter that will be used to draw. |
| None eVision.ESpotDetector.Draw | ( | self, | |
| eVision.EDrawAdapter | None | drawAdapter, | ||
| eVision.ERGBColor | color ) |
Draw the eVision.ESpotDetector.
| drawAdapter | eVision.EDrawAdapter that will be used to draw. |
| color | Color of the drawn rectangle. |
| None eVision.ESpotDetector.Draw | ( | self, | |
| eVision.EDrawAdapter | None | drawAdapter, | ||
| eVision.ERGBColor | color, | ||
| float | zoomX ) |
Draw the eVision.ESpotDetector.
| drawAdapter | eVision.EDrawAdapter that will be used to draw. |
| color | Color of the drawn rectangle. |
| zoomX | Horizontal zooming factor. By default, true scale is used. |
| None eVision.ESpotDetector.Draw | ( | self, | |
| eVision.EDrawAdapter | None | drawAdapter, | ||
| eVision.ERGBColor | color, | ||
| float | zoomX, | ||
| float | zoomY ) |
Draw the eVision.ESpotDetector.
| drawAdapter | eVision.EDrawAdapter that will be used to draw. |
| color | Color of the drawn rectangle. |
| zoomX | Horizontal zooming factor. By default, true scale is used. |
| zoomY | Vertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming. |
| None eVision.ESpotDetector.Draw | ( | self, | |
| eVision.EDrawAdapter | None | drawAdapter, | ||
| eVision.ERGBColor | color, | ||
| float | zoomX, | ||
| float | zoomY, | ||
| float | panX ) |
Draw the eVision.ESpotDetector.
| drawAdapter | eVision.EDrawAdapter that will be used to draw. |
| color | Color of the drawn rectangle. |
| zoomX | Horizontal zooming factor. By default, true scale is used. |
| zoomY | Vertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming. |
| panX | Horizontal panning value expressed in pixels. By default, no panning occurs. |
| None eVision.ESpotDetector.Draw | ( | self, | |
| eVision.EDrawAdapter | None | drawAdapter, | ||
| eVision.ERGBColor | color, | ||
| float | zoomX, | ||
| float | zoomY, | ||
| float | panX, | ||
| float | panY ) |
Draw the eVision.ESpotDetector.
| drawAdapter | eVision.EDrawAdapter that will be used to draw. |
| color | Color of the drawn rectangle. |
| zoomX | Horizontal zooming factor. By default, true scale is used. |
| zoomY | Vertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide 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. |
| bool eVision.ESpotDetector.EnableAlignment | ( | self | ) |
Enables or disables the optional alignment process.
The alignment area and the tolerance must be set as well, see eVision.ESpotDetector.AlignmentArea and eVision.ESpotDetector.AlignmentTolerance.
| eVision.ESpotDetector.EnableAlignment | ( | self, | |
| bool | value ) |
Enables or disables the optional alignment process.
The alignment area and the tolerance must be set as well, see eVision.ESpotDetector.AlignmentArea and eVision.ESpotDetector.AlignmentTolerance.
| bool eVision.ESpotDetector.EnableParticleDetection | ( | self | ) |
Sets/Gets the particle detection processing.
| eVision.ESpotDetector.EnableParticleDetection | ( | self, | |
| bool | value ) |
Sets/Gets the particle detection processing.
| bool eVision.ESpotDetector.EnableScratchDetection | ( | self | ) |
Sets/Gets the scratch detection processing.
| eVision.ESpotDetector.EnableScratchDetection | ( | self, | |
| bool | value ) |
Sets/Gets the scratch detection processing.
| None eVision.ESpotDetector.GenerateSegmentationMap | ( | self, | |
| eVision.EImageBW8 | map ) |
Returns the last computed segmentation map.
| map | The destination image for the segmentation map. |
| None eVision.ESpotDetector.GetParticleDetectionParameters | ( | self, | |
| eVision.EParticleDetectionParameters | parameters ) |
Gets the particle detection parameters.
| parameters | From eVision.EParticleDetectionParameters. |
| None eVision.ESpotDetector.GetScratchDetectionParameters | ( | self, | |
| eVision.EScratchDetectionParameters | parameters ) |
Gets the scratch detection parameters.
| parameters | From eVision.EScratchDetectionParameters. |
| eVision.EGuardBand eVision.ESpotDetector.GuardBand | ( | self | ) |
Sets/Gets the eVision.EGuardBand.
| eVision.ESpotDetector.GuardBand | ( | self, | |
| eVision.EGuardBand | value ) |
Sets/Gets the eVision.EGuardBand.
| bool eVision.ESpotDetector.IsDLClassifierSet | ( | self | ) |
Returns True if a classifier has been loaded.
See also eVision.ESpotDetector.DLClassifierPath and eVision.ESpotDetector.UnsetDLClassifier.
| None eVision.ESpotDetector.Load | ( | self, | |
| eVision.ESerializer | None | serializer ) |
Loads the eVision.ESpotDetector.
The given eVision.ESerializer must have been created for reading.
| serializer | The serializer. |
| None eVision.ESpotDetector.Load | ( | self, | |
| str | path ) |
Loads the eVision.ESpotDetector.
The given eVision.ESerializer must have been created for reading.
| path | The file path. |
| int eVision.ESpotDetector.NumSpots | ( | self | ) |
Gets the number of spots detected by a previous call to eVision.ESpotDetector.Detect.
| None eVision.ESpotDetector.Save | ( | self, | |
| eVision.ESerializer | None | serializer ) |
Saves the eVision.ESpotDetector.
The given eVision.ESerializer must have been created for writing.
| serializer | The eVision.ESerializer object that is written to. |
| None eVision.ESpotDetector.Save | ( | self, | |
| str | path ) |
Saves the eVision.ESpotDetector.
The given eVision.ESerializer must have been created for writing.
| path | The file path. |
| eVision.EROIBW8 eVision.ESpotDetector.SourceROI | ( | self | ) |
Gets the last used Region Of Interest, after optionnal alignment and guard band clipping.
No image is attached to that eVision.EROIBW8. See also eVision.ESpotDetector.EnableAlignment and eVision.ESpotDetector.GuardBand.
| list[eVision._eVision.ESpot] eVision.ESpotDetector.Spots | ( | self | ) |
Gets the spots detected by a previous call to eVision.ESpotDetector.Detect.
| None eVision.ESpotDetector.UnsetDLClassifier | ( | self | ) |
Disable the usage of the Deep Learning classifier.
See also eVision.ESpotDetector.DLClassifierPath and eVision.ESpotDetector.IsDLClassifierSet.
|
static |
|
static |