eVision Python API
Loading...
Searching...
No Matches
eVision.EasyDeepLearning.ESupervisedSegmenterResult Class Reference

An eVision.EasyDeepLearning.ESupervisedSegmenterResult object represents the result of a supervised segmenter. More...

Public Member Functions

None __init__ (self)
 Constructs a non-valid eVision.EasyDeepLearning.ESupervisedSegmenterResult.
None __init__ (self, eVision.EasyDeepLearning.ESupervisedSegmenterResult other)
 Copy constructor of an eVision.EasyDeepLearning.ESupervisedSegmenterResult object.
bool IsValid (self)
 Indicates whether the result is valid and ready to be used.
eVision.ERegion ToRegion (self)
 Returns the region.
eVision.ERegion GetRegionForLabel (self, str label)
 Region corresponding to the given label.
eVision.EImageBW8 GetProbabilityMap (self, str label)
 Probability map for the given label.
int GetNumBlobs (self, str label)
 Number of detected blobs for all labels or for the specified label.
int GetNumBlobs (self)
 Number of detected blobs for all labels or for the specified label.
list[eVision._eVision.EasyDeepLearning.ESupervisedSegmenterBlob] GetBlobs (self)
 Detected blobs for all labels or for the specified label.
list[eVision._eVision.EasyDeepLearning.ESupervisedSegmenterBlob] GetBlobs (self, str label)
 Detected blobs for all labels or for the specified label.
bool HasForegroundSegments (self)
 Whether the predicted segmentation contains non-background pixels.
str GetLabel (self, int labelIndex)
 Label at the given index.
eVision.ERGBColor GetLabelColor (self, int i)
 Color of a label.
eVision.ERGBColor GetLabelColor (self, str label)
 Color of a label.
bool HasGroundtruthSegmentation (self)
 Whether the result is associated with a ground truth segmentation map.
None RemoveGroundtruthSegmentation (self)
 Removes any ground truth associated with the result.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, float zoomX, float zoomY, float panX, float panY)
 Draws the segmentation.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, float zoomX, float zoomY, float panX)
 Draws the segmentation.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, float zoomX, float zoomY)
 Draws the segmentation.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, float zoomX)
 Draws the segmentation.
None Draw (self, eVision.EDrawAdapter|None drawAdapter)
 Draws the segmentation.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.EFrame frame, float zoomX, float zoomY, float panX, float panY)
 Draws the segmentation.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.EFrame frame, float zoomX, float zoomY, float panX)
 Draws the segmentation.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.EFrame frame, float zoomX, float zoomY)
 Draws the segmentation.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.EFrame frame, float zoomX)
 Draws the segmentation.
None Draw (self, eVision.EDrawAdapter|None drawAdapter, eVision.EFrame frame)
 Draws the segmentation.

Protected Member Functions

eVision.EImageBW16 _SegmentationMap__getter (self)
 \cond
eVision.ECodedImage2 _CodedImage__getter (self)
 \cond
eVision.EFrame _Frame__getter (self)
 \cond
 _Frame__setter (self, eVision.EFrame value)
 Gets the frame in which the result was computed.
eVision.EImageC24 _ColorizedSegmentation__getter (self)
 \cond
eVision.EImageC24A _ColorizedSegmentationWithTransparency__getter (self)
 \cond
eVision.EasyDeepLearning.ESupervisedSegmenterMetrics _ImageMetrics__getter (self)
 \cond
eVision.EImageBW16 _GroundtruthSegmentationMap__getter (self)
 \cond
 _GroundtruthSegmentationMap__setter (self, eVision.EImageBW16 value)
 Ground truth segmentation map.
int _NumLabels__getter (self)
 \cond
float _Score__getter (self)
 \cond
float _ClassificationThreshold__getter (self)
 \cond
 _ClassificationThreshold__setter (self, float value)
 Classification threshold for determining whether the image contains blobs with a label different than background.
int _Width__getter (self)
 \cond
int _Height__getter (self)
 \cond

Properties

 SegmentationMap = property(_SegmentationMap__getter, None)
 \endcond
 CodedImage = property(_CodedImage__getter, None)
 \endcond
 Frame = property(_Frame__getter, _Frame__setter)
 \endcond
 ColorizedSegmentation = property(_ColorizedSegmentation__getter, None)
 \endcond
 ColorizedSegmentationWithTransparency = property(_ColorizedSegmentationWithTransparency__getter, None)
 \endcond
 ImageMetrics = property(_ImageMetrics__getter, None)
 \endcond
 GroundtruthSegmentationMap = property(_GroundtruthSegmentationMap__getter, _GroundtruthSegmentationMap__setter)
 \endcond
 NumLabels = property(_NumLabels__getter, None)
 \endcond
 Score = property(_Score__getter, None)
 \endcond
 ClassificationThreshold = property(_ClassificationThreshold__getter, _ClassificationThreshold__setter)
 \endcond
 Width = property(_Width__getter, None)
 \endcond
 Height = property(_Height__getter, None)
 \endcond

Detailed Description

An eVision.EasyDeepLearning.ESupervisedSegmenterResult object represents the result of a supervised segmenter.

Remarks:

License(s): BasicTypes

Constructor & Destructor Documentation

◆ __init__() [1/2]

None eVision.EasyDeepLearning.ESupervisedSegmenterResult.__init__ ( self)

◆ __init__() [2/2]

None eVision.EasyDeepLearning.ESupervisedSegmenterResult.__init__ ( self,
eVision.EasyDeepLearning.ESupervisedSegmenterResult other )

Copy constructor of an eVision.EasyDeepLearning.ESupervisedSegmenterResult object.

Parameters
otherReference to the eVision.EasyDeepLearning.ESupervisedSegmenterResult object that should be copied

Member Function Documentation

◆ _ClassificationThreshold__getter()

float eVision.EasyDeepLearning.ESupervisedSegmenterResult._ClassificationThreshold__getter ( self)
protected

\cond

Classification threshold for determining whether the image contains blobs with a label different than background.

By default, its value is given by the supervised segmenter that produced this result.

◆ _ClassificationThreshold__setter()

eVision.EasyDeepLearning.ESupervisedSegmenterResult._ClassificationThreshold__setter ( self,
float value )
protected

Classification threshold for determining whether the image contains blobs with a label different than background.

By default, its value is given by the supervised segmenter that produced this result.

◆ _CodedImage__getter()

eVision.ECodedImage2 eVision.EasyDeepLearning.ESupervisedSegmenterResult._CodedImage__getter ( self)
protected

\cond

Returns the coded image obtained during the segmentation.

◆ _ColorizedSegmentation__getter()

eVision.EImageC24 eVision.EasyDeepLearning.ESupervisedSegmenterResult._ColorizedSegmentation__getter ( self)
protected

\cond

Colorized version of the segmentation map.

◆ _ColorizedSegmentationWithTransparency__getter()

eVision.EImageC24A eVision.EasyDeepLearning.ESupervisedSegmenterResult._ColorizedSegmentationWithTransparency__getter ( self)
protected

\cond

Colorized version of the segmentation map with transparency.

◆ _Frame__getter()

eVision.EFrame eVision.EasyDeepLearning.ESupervisedSegmenterResult._Frame__getter ( self)
protected

\cond

Gets the frame in which the result was computed.

◆ _Frame__setter()

eVision.EasyDeepLearning.ESupervisedSegmenterResult._Frame__setter ( self,
eVision.EFrame value )
protected

Gets the frame in which the result was computed.

◆ _GroundtruthSegmentationMap__getter()

eVision.EImageBW16 eVision.EasyDeepLearning.ESupervisedSegmenterResult._GroundtruthSegmentationMap__getter ( self)
protected

\cond

Ground truth segmentation map.

By default, the ground truth segmentation map is all background.

◆ _GroundtruthSegmentationMap__setter()

eVision.EasyDeepLearning.ESupervisedSegmenterResult._GroundtruthSegmentationMap__setter ( self,
eVision.EImageBW16 value )
protected

Ground truth segmentation map.

By default, the ground truth segmentation map is all background.

◆ _Height__getter()

int eVision.EasyDeepLearning.ESupervisedSegmenterResult._Height__getter ( self)
protected

\cond

Height of the source image and of the segmentation result.

◆ _ImageMetrics__getter()

eVision.EasyDeepLearning.ESupervisedSegmenterMetrics eVision.EasyDeepLearning.ESupervisedSegmenterResult._ImageMetrics__getter ( self)
protected

\cond

Metrics for the image.

You must set the eVision.EasyDeepLearning.ESupervisedSegmenterResult.GroundtruthSegmentationMap before accessing this field.

◆ _NumLabels__getter()

int eVision.EasyDeepLearning.ESupervisedSegmenterResult._NumLabels__getter ( self)
protected

\cond

Number of segmentation labels of the supervised segmenter that produced this result.

◆ _Score__getter()

float eVision.EasyDeepLearning.ESupervisedSegmenterResult._Score__getter ( self)
protected

\cond

Score used to determine whether the result contains segments that are not background.

◆ _SegmentationMap__getter()

eVision.EImageBW16 eVision.EasyDeepLearning.ESupervisedSegmenterResult._SegmentationMap__getter ( self)
protected

\cond

Segmentation result.

The segmentation map is expressed in the sensor coordinates even if an EFrame was used during the inference of the model.

◆ _Width__getter()

int eVision.EasyDeepLearning.ESupervisedSegmenterResult._Width__getter ( self)
protected

\cond

Width of the source image and of the segmentation result.

◆ Draw() [1/10]

None eVision.EasyDeepLearning.ESupervisedSegmenterResult.Draw ( self,
eVision.EDrawAdapter | None drawAdapter )

Draws the segmentation.

The detected segment are drawn with the label color specified in the dataset used for training. The pixel classified as background are transparent.

Parameters
drawAdapterA pointer to an eVision.EDrawAdapter (like the eVision.EWindowsDrawAdapter).

◆ Draw() [2/10]

None eVision.EasyDeepLearning.ESupervisedSegmenterResult.Draw ( self,
eVision.EDrawAdapter | None drawAdapter,
eVision.EFrame frame )

Draws the segmentation.

The detected segment are drawn with the label color specified in the dataset used for training. The pixel classified as background are transparent.

Parameters
drawAdapterA pointer to an eVision.EDrawAdapter (like the eVision.EWindowsDrawAdapter).
frameFrame of reference in which this result was computed.

◆ Draw() [3/10]

None eVision.EasyDeepLearning.ESupervisedSegmenterResult.Draw ( self,
eVision.EDrawAdapter | None drawAdapter,
eVision.EFrame frame,
float zoomX )

Draws the segmentation.

The detected segment are drawn with the label color specified in the dataset used for training. The pixel classified as background are transparent.

Parameters
drawAdapterA pointer to an eVision.EDrawAdapter (like the eVision.EWindowsDrawAdapter).
frameFrame of reference in which this result was computed.
zoomXHorizontal zooming factor. A value greater than 1 means zoom in. By default, true scale is used.

◆ Draw() [4/10]

None eVision.EasyDeepLearning.ESupervisedSegmenterResult.Draw ( self,
eVision.EDrawAdapter | None drawAdapter,
eVision.EFrame frame,
float zoomX,
float zoomY )

Draws the segmentation.

The detected segment are drawn with the label color specified in the dataset used for training. The pixel classified as background are transparent.

Parameters
drawAdapterA pointer to an eVision.EDrawAdapter (like the eVision.EWindowsDrawAdapter).
frameFrame of reference in which this result was computed.
zoomXHorizontal zooming factor. A value greater than 1 means zoom in. By default, true scale is used.
zoomYVertical zooming factor. A value greater than 1 means zoom in. If set to 0, the default value, the horizontal zooming factor is used instead, so as to provide isotropic zooming.

◆ Draw() [5/10]

None eVision.EasyDeepLearning.ESupervisedSegmenterResult.Draw ( self,
eVision.EDrawAdapter | None drawAdapter,
eVision.EFrame frame,
float zoomX,
float zoomY,
float panX )

Draws the segmentation.

The detected segment are drawn with the label color specified in the dataset used for training. The pixel classified as background are transparent.

Parameters
drawAdapterA pointer to an eVision.EDrawAdapter (like the eVision.EWindowsDrawAdapter).
frameFrame of reference in which this result was computed.
zoomXHorizontal zooming factor. A value greater than 1 means zoom in. By default, true scale is used.
zoomYVertical zooming factor. A value greater than 1 means zoom in. If set to 0, the default value, the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [6/10]

None eVision.EasyDeepLearning.ESupervisedSegmenterResult.Draw ( self,
eVision.EDrawAdapter | None drawAdapter,
eVision.EFrame frame,
float zoomX,
float zoomY,
float panX,
float panY )

Draws the segmentation.

The detected segment are drawn with the label color specified in the dataset used for training. The pixel classified as background are transparent.

Parameters
drawAdapterA pointer to an eVision.EDrawAdapter (like the eVision.EWindowsDrawAdapter).
frameFrame of reference in which this result was computed.
zoomXHorizontal zooming factor. A value greater than 1 means zoom in. By default, true scale is used.
zoomYVertical zooming factor. A value greater than 1 means zoom in. If set to 0, the default value, the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [7/10]

None eVision.EasyDeepLearning.ESupervisedSegmenterResult.Draw ( self,
eVision.EDrawAdapter | None drawAdapter,
float zoomX )

Draws the segmentation.

The detected segment are drawn with the label color specified in the dataset used for training. The pixel classified as background are transparent.

Parameters
drawAdapterA pointer to an eVision.EDrawAdapter (like the eVision.EWindowsDrawAdapter).
zoomXHorizontal zooming factor. A value greater than 1 means zoom in. By default, true scale is used.

◆ Draw() [8/10]

None eVision.EasyDeepLearning.ESupervisedSegmenterResult.Draw ( self,
eVision.EDrawAdapter | None drawAdapter,
float zoomX,
float zoomY )

Draws the segmentation.

The detected segment are drawn with the label color specified in the dataset used for training. The pixel classified as background are transparent.

Parameters
drawAdapterA pointer to an eVision.EDrawAdapter (like the eVision.EWindowsDrawAdapter).
zoomXHorizontal zooming factor. A value greater than 1 means zoom in. By default, true scale is used.
zoomYVertical zooming factor. A value greater than 1 means zoom in. If set to 0, the default value, the horizontal zooming factor is used instead, so as to provide isotropic zooming.

◆ Draw() [9/10]

None eVision.EasyDeepLearning.ESupervisedSegmenterResult.Draw ( self,
eVision.EDrawAdapter | None drawAdapter,
float zoomX,
float zoomY,
float panX )

Draws the segmentation.

The detected segment are drawn with the label color specified in the dataset used for training. The pixel classified as background are transparent.

Parameters
drawAdapterA pointer to an eVision.EDrawAdapter (like the eVision.EWindowsDrawAdapter).
zoomXHorizontal zooming factor. A value greater than 1 means zoom in. By default, true scale is used.
zoomYVertical zooming factor. A value greater than 1 means zoom in. If set to 0, the default value, the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ Draw() [10/10]

None eVision.EasyDeepLearning.ESupervisedSegmenterResult.Draw ( self,
eVision.EDrawAdapter | None drawAdapter,
float zoomX,
float zoomY,
float panX,
float panY )

Draws the segmentation.

The detected segment are drawn with the label color specified in the dataset used for training. The pixel classified as background are transparent.

Parameters
drawAdapterA pointer to an eVision.EDrawAdapter (like the eVision.EWindowsDrawAdapter).
zoomXHorizontal zooming factor. A value greater than 1 means zoom in. By default, true scale is used.
zoomYVertical zooming factor. A value greater than 1 means zoom in. If set to 0, the default value, the horizontal zooming factor is used instead, so as to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ GetBlobs() [1/2]

list[eVision._eVision.EasyDeepLearning.ESupervisedSegmenterBlob] eVision.EasyDeepLearning.ESupervisedSegmenterResult.GetBlobs ( self)

Detected blobs for all labels or for the specified label.

Remarks:

A blob is a contiguous set of pixels detected to be of the same non-background label. As such, the "background" label never has blobs. The set of detected blobs depends on the threshold.

◆ GetBlobs() [2/2]

list[eVision._eVision.EasyDeepLearning.ESupervisedSegmenterBlob] eVision.EasyDeepLearning.ESupervisedSegmenterResult.GetBlobs ( self,
str label )

Detected blobs for all labels or for the specified label.

Remarks:

A blob is a contiguous set of pixels detected to be of the same non-background label. As such, the "background" label never has blobs. The set of detected blobs depends on the threshold.

Parameters
labelLabel

◆ GetLabel()

str eVision.EasyDeepLearning.ESupervisedSegmenterResult.GetLabel ( self,
int labelIndex )

Label at the given index.

Remarks:

The index must be comprised between 0 and eVision.EasyDeepLearning.ESupervisedSegmenterResult.NumLabels - 1. The labels are the one from the supervised segmenter that produced this result.

Parameters
labelIndexIndex of the label

◆ GetLabelColor() [1/2]

eVision.ERGBColor eVision.EasyDeepLearning.ESupervisedSegmenterResult.GetLabelColor ( self,
int i )

Color of a label.

Remarks:

The label color is controlled at the tool level. To change a color in a result, change the label color in the tool.

Parameters
iIndex of the label for which to get the color (between 0 and eVision.EasyDeepLearning.ESupervisedSegmenterResult.NumLabels - 1)

◆ GetLabelColor() [2/2]

eVision.ERGBColor eVision.EasyDeepLearning.ESupervisedSegmenterResult.GetLabelColor ( self,
str label )

Color of a label.

Remarks:

The label color is controlled at the tool level. To change a color in a result, change the label color in the tool.

Parameters
labelLabel for which to get the color

◆ GetNumBlobs() [1/2]

int eVision.EasyDeepLearning.ESupervisedSegmenterResult.GetNumBlobs ( self)

Number of detected blobs for all labels or for the specified label.

Remarks:

A blob is a contiguous set of pixels detected to be of the same non-background label. As such, the "background" label never has blobs.

◆ GetNumBlobs() [2/2]

int eVision.EasyDeepLearning.ESupervisedSegmenterResult.GetNumBlobs ( self,
str label )

Number of detected blobs for all labels or for the specified label.

Remarks:

A blob is a contiguous set of pixels detected to be of the same non-background label. As such, the "background" label never has blobs.

Parameters
labelLabel

◆ GetProbabilityMap()

eVision.EImageBW8 eVision.EasyDeepLearning.ESupervisedSegmenterResult.GetProbabilityMap ( self,
str label )

Probability map for the given label.

The probability values are mapped between 0 and 255.

Parameters
labelLabel

◆ GetRegionForLabel()

eVision.ERegion eVision.EasyDeepLearning.ESupervisedSegmenterResult.GetRegionForLabel ( self,
str label )

Region corresponding to the given label.

Parameters
labelLabel

◆ HasForegroundSegments()

bool eVision.EasyDeepLearning.ESupervisedSegmenterResult.HasForegroundSegments ( self)

Whether the predicted segmentation contains non-background pixels.

◆ HasGroundtruthSegmentation()

bool eVision.EasyDeepLearning.ESupervisedSegmenterResult.HasGroundtruthSegmentation ( self)

Whether the result is associated with a ground truth segmentation map.

◆ IsValid()

bool eVision.EasyDeepLearning.ESupervisedSegmenterResult.IsValid ( self)

Indicates whether the result is valid and ready to be used.

A default constructed eVision.EasyDeepLearning.ESupervisedSegmenterResult is not valid.

◆ RemoveGroundtruthSegmentation()

None eVision.EasyDeepLearning.ESupervisedSegmenterResult.RemoveGroundtruthSegmentation ( self)

Removes any ground truth associated with the result.

◆ ToRegion()

eVision.ERegion eVision.EasyDeepLearning.ESupervisedSegmenterResult.ToRegion ( self)

Returns the region.

Property Documentation

◆ ClassificationThreshold

eVision.EasyDeepLearning.ESupervisedSegmenterResult.ClassificationThreshold = property(_ClassificationThreshold__getter, _ClassificationThreshold__setter)
static

\endcond

Classification threshold for determining whether the image contains blobs with a label different than background.

By default, its value is given by the supervised segmenter that produced this result.

◆ CodedImage

eVision.EasyDeepLearning.ESupervisedSegmenterResult.CodedImage = property(_CodedImage__getter, None)
static

\endcond

Returns the coded image obtained during the segmentation.

◆ ColorizedSegmentation

eVision.EasyDeepLearning.ESupervisedSegmenterResult.ColorizedSegmentation = property(_ColorizedSegmentation__getter, None)
static

\endcond

Colorized version of the segmentation map.

◆ ColorizedSegmentationWithTransparency

eVision.EasyDeepLearning.ESupervisedSegmenterResult.ColorizedSegmentationWithTransparency = property(_ColorizedSegmentationWithTransparency__getter, None)
static

\endcond

Colorized version of the segmentation map with transparency.

◆ Frame

eVision.EasyDeepLearning.ESupervisedSegmenterResult.Frame = property(_Frame__getter, _Frame__setter)
static

\endcond

Gets the frame in which the result was computed.

◆ GroundtruthSegmentationMap

eVision.EasyDeepLearning.ESupervisedSegmenterResult.GroundtruthSegmentationMap = property(_GroundtruthSegmentationMap__getter, _GroundtruthSegmentationMap__setter)
static

\endcond

Ground truth segmentation map.

By default, the ground truth segmentation map is all background.

◆ Height

eVision.EasyDeepLearning.ESupervisedSegmenterResult.Height = property(_Height__getter, None)
static

\endcond

Height of the source image and of the segmentation result.

◆ ImageMetrics

eVision.EasyDeepLearning.ESupervisedSegmenterResult.ImageMetrics = property(_ImageMetrics__getter, None)
static

\endcond

Metrics for the image.

You must set the eVision.EasyDeepLearning.ESupervisedSegmenterResult.GroundtruthSegmentationMap before accessing this field.

◆ NumLabels

eVision.EasyDeepLearning.ESupervisedSegmenterResult.NumLabels = property(_NumLabels__getter, None)
static

\endcond

Number of segmentation labels of the supervised segmenter that produced this result.

◆ Score

eVision.EasyDeepLearning.ESupervisedSegmenterResult.Score = property(_Score__getter, None)
static

\endcond

Score used to determine whether the result contains segments that are not background.

◆ SegmentationMap

eVision.EasyDeepLearning.ESupervisedSegmenterResult.SegmentationMap = property(_SegmentationMap__getter, None)
static

\endcond

Segmentation result.

The segmentation map is expressed in the sensor coordinates even if an EFrame was used during the inference of the model.

◆ Width

eVision.EasyDeepLearning.ESupervisedSegmenterResult.Width = property(_Width__getter, None)
static

\endcond

Width of the source image and of the segmentation result.