eVision Python API
Loading...
Searching...
No Matches
eVision.Segmenters.EGrayscaleSingleThresholdSegmenter Class Reference

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

Inheritance diagram for eVision.Segmenters.EGrayscaleSingleThresholdSegmenter:
Collaboration diagram for eVision.Segmenters.EGrayscaleSingleThresholdSegmenter:

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.

Properties

 Mode = property(_Mode__getter, _Mode__setter)
 Threshold selection mode.
 AbsoluteThreshold = property(_AbsoluteThreshold__getter, _AbsoluteThreshold__setter)
 Value of the threshold to be used in the case of absolute thresholding.
 RelativeThreshold = property(_RelativeThreshold__getter, _RelativeThreshold__setter)
 Fraction of the image pixels that belongs to the black layer in the case of relative thresholding.
 LastThreshold = property(_LastThreshold__getter, None)
 Retrieves the actual threshold value that was used for the last image that got encoded by the segmenter.
Properties inherited from eVision.Segmenters.ETwoLayersImageSegmenter
 BlackLayerIndex = property(_BlackLayerIndex__getter, _BlackLayerIndex__setter)
 Index of the black layer in the destination coded image.
 BlackLayerEncoded = property(_BlackLayerEncoded__getter, _BlackLayerEncoded__setter)
 Black layer encoding status.
 WhiteLayerIndex = property(_WhiteLayerIndex__getter, _WhiteLayerIndex__setter)
 Index of the white layer in the destination coded image.
 WhiteLayerEncoded = property(_WhiteLayerEncoded__getter, _WhiteLayerEncoded__setter)
 White layer encoding status.

Detailed Description

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

Member Function Documentation

◆ IsFirstApplication()

bool eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.IsFirstApplication ( self)

Checks whether the segmenter has already been used to segment an image.

◆ Load() [1/2]

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.

Parameters
serializerThe serializer.

Reimplemented from eVision.Segmenters.ETwoLayersImageSegmenter.

◆ Load() [2/2]

None eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.Load ( self,
str path )

Load the eVision.Segmenters.EGrayscaleSingleThresholdSegmenter configuration.

The given eVision.ESerializer must have been created for reading.

Parameters
pathThe file path.

Reimplemented from eVision.Segmenters.ETwoLayersImageSegmenter.

◆ Save() [1/2]

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.

Parameters
serializerThe serializer.

Reimplemented from eVision.Segmenters.ETwoLayersImageSegmenter.

◆ Save() [2/2]

None eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.Save ( self,
str path )

Save the eVision.Segmenters.EGrayscaleSingleThresholdSegmenter configuration.

The given eVision.ESerializer must have been created for writing.

Parameters
pathThe file path.

Reimplemented from eVision.Segmenters.ETwoLayersImageSegmenter.

Property Documentation

◆ AbsoluteThreshold

eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.AbsoluteThreshold = property(_AbsoluteThreshold__getter, _AbsoluteThreshold__setter)
static

Value of the threshold to be used in the case of absolute thresholding.

◆ LastThreshold

eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.LastThreshold = property(_LastThreshold__getter, None)
static

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.

◆ Mode

eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.Mode = property(_Mode__getter, _Mode__setter)
static

Threshold selection mode.

◆ RelativeThreshold

eVision.Segmenters.EGrayscaleSingleThresholdSegmenter.RelativeThreshold = property(_RelativeThreshold__getter, _RelativeThreshold__setter)
static

Fraction of the image pixels that belongs to the black layer in the case of relative thresholding.