Segments an image using a single threshold on a grayscale image. More...


Public Member Functions | |
| None | Load (self, str path) |
| Load the eVision.Segmenters.EGrayscaleSingleThresholdSegmenter configuration. | |
| None | Load (self, eVision.ESerializer|None serializer) |
| Load the eVision.Segmenters.EGrayscaleSingleThresholdSegmenter configuration. | |
| None | Save (self, str path) |
| Save the eVision.Segmenters.EGrayscaleSingleThresholdSegmenter configuration. | |
| None | Save (self, eVision.ESerializer|None serializer) |
| Save the eVision.Segmenters.EGrayscaleSingleThresholdSegmenter configuration. | |
| bool | IsFirstApplication (self) |
| Checks whether the segmenter has already been used to segment an image. | |
| eVision.EGrayscaleSingleThreshold | Mode (self) |
| Threshold selection mode. | |
| Mode (self, eVision.EGrayscaleSingleThreshold value) | |
| Threshold selection mode. | |
| int | AbsoluteThreshold (self) |
| Value of the threshold to be used in the case of absolute thresholding. | |
| AbsoluteThreshold (self, int value) | |
| Value of the threshold to be used in the case of absolute thresholding. | |
| float | RelativeThreshold (self) |
| Fraction of the image pixels that belongs to the black layer in the case of relative thresholding. | |
| RelativeThreshold (self, float value) | |
| Fraction of the image pixels that belongs to the black layer in the case of relative thresholding. | |
| int | LastThreshold (self) |
| Retrieves the actual threshold value that was used for the last image that got encoded by the segmenter. | |
| Public Member Functions inherited from eVision.Segmenters.ETwoLayersImageSegmenter | |
| int | BlackLayerIndex (self) |
| Index of the black layer in the destination coded image. | |
| BlackLayerIndex (self, int value) | |
| Index of the black layer in the destination coded image. | |
| bool | BlackLayerEncoded (self) |
| Black layer encoding status. | |
| BlackLayerEncoded (self, bool value) | |
| Black layer encoding status. | |
| int | WhiteLayerIndex (self) |
| Index of the white layer in the destination coded image. | |
| WhiteLayerIndex (self, int value) | |
| Index of the white layer in the destination coded image. | |
| bool | WhiteLayerEncoded (self) |
| White layer encoding status. | |
| WhiteLayerEncoded (self, bool value) | |
| White layer encoding status. | |
Segments an image using a single threshold on a grayscale image.
Remarks:
This segmenter is applicable to eVision.EROIBW8 and eVision.EROIBW16 grayscale images. It produces coded images with two layers: the black layer (usually, with index 0) contains the unmasked pixels having a gray value strictly below the threshold value; and the white layer (usually, with index 1) contains the remaining unmasked pixels, i.e. unmasked pixels having a gray value greater or equal to the threshold value. The default thresholding method is minimum residue. If another method is required, the eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.Mode property must be set prior to encoding.
License(s): EasyObject
| int eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.AbsoluteThreshold | ( | self | ) |
Value of the threshold to be used in the case of absolute thresholding.
| eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.AbsoluteThreshold | ( | self, | |
| int | value ) |
Value of the threshold to be used in the case of absolute thresholding.
| bool eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.IsFirstApplication | ( | self | ) |
Checks whether the segmenter has already been used to segment an image.
| int eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.LastThreshold | ( | self | ) |
Retrieves the actual threshold value that was used for the last image that got encoded by the segmenter.
Remarks:
A call to this method will result in an exception if it is the first time the segmenter is applied. To check whether the segmenter has already been applied, call the eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.IsFirstApplication method.
| None eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.Load | ( | self, | |
| eVision.ESerializer | None | serializer ) |
Load the eVision.Segmenters.EGrayscaleSingleThresholdSegmenter configuration.
The given eVision.ESerializer must have been created for reading.
| serializer | The serializer. |
Reimplemented from eVision.Segmenters.ETwoLayersImageSegmenter.
| None eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.Load | ( | self, | |
| str | path ) |
Load the eVision.Segmenters.EGrayscaleSingleThresholdSegmenter configuration.
The given eVision.ESerializer must have been created for reading.
| path | The file path. |
Reimplemented from eVision.Segmenters.ETwoLayersImageSegmenter.
| eVision.EGrayscaleSingleThreshold eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.Mode | ( | self | ) |
Threshold selection mode.
| eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.Mode | ( | self, | |
| eVision.EGrayscaleSingleThreshold | value ) |
Threshold selection mode.
| float eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.RelativeThreshold | ( | self | ) |
Fraction of the image pixels that belongs to the black layer in the case of relative thresholding.
| eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.RelativeThreshold | ( | self, | |
| float | value ) |
Fraction of the image pixels that belongs to the black layer in the case of relative thresholding.
| None eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.Save | ( | self, | |
| eVision.ESerializer | None | serializer ) |
Save the eVision.Segmenters.EGrayscaleSingleThresholdSegmenter configuration.
The given eVision.ESerializer must have been created for writing.
| serializer | The serializer. |
Reimplemented from eVision.Segmenters.ETwoLayersImageSegmenter.
| None eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.Save | ( | self, | |
| str | path ) |
Save the eVision.Segmenters.EGrayscaleSingleThresholdSegmenter configuration.
The given eVision.ESerializer must have been created for writing.
| path | The file path. |
Reimplemented from eVision.Segmenters.ETwoLayersImageSegmenter.