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.
eVision.EImageBW16 SegmentationMap (self)
 Segmentation result.
eVision.ECodedImage2 CodedImage (self)
 Returns the coded image obtained during the segmentation.
eVision.EFrame Frame (self)
 Gets the frame in which the result was computed.
 Frame (self, eVision.EFrame value)
 Gets the frame in which the result was computed.
eVision.EImageC24 ColorizedSegmentation (self)
 Colorized version of the segmentation map.
eVision.EImageC24A ColorizedSegmentationWithTransparency (self)
 Colorized version of the segmentation map with transparency.
eVision.EasyDeepLearning.ESupervisedSegmenterMetrics ImageMetrics (self)
 Metrics for the image.
eVision.EImageBW16 GroundtruthSegmentationMap (self)
 Ground truth segmentation map.
 GroundtruthSegmentationMap (self, eVision.EImageBW16 value)
 Ground truth segmentation map.
int NumLabels (self)
 Number of segmentation labels of the supervised segmenter that produced this result.
float Score (self)
 Score used to determine whether the result contains segments that are not background.
float ClassificationThreshold (self)
 Classification threshold for determining whether the image contains blobs with a label different than background.
 ClassificationThreshold (self, float value)
 Classification threshold for determining whether the image contains blobs with a label different than background.
int Width (self)
 Width of the source image and of the segmentation result.
int Height (self)
 Height of the source image and of the segmentation result.

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() [1/2]

float eVision.EasyDeepLearning.ESupervisedSegmenterResult.ClassificationThreshold ( self)

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() [2/2]

eVision.EasyDeepLearning.ESupervisedSegmenterResult.ClassificationThreshold ( self,
float value )

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.ECodedImage2 eVision.EasyDeepLearning.ESupervisedSegmenterResult.CodedImage ( self)

Returns the coded image obtained during the segmentation.

◆ ColorizedSegmentation()

eVision.EImageC24 eVision.EasyDeepLearning.ESupervisedSegmenterResult.ColorizedSegmentation ( self)

Colorized version of the segmentation map.

◆ ColorizedSegmentationWithTransparency()

eVision.EImageC24A eVision.EasyDeepLearning.ESupervisedSegmenterResult.ColorizedSegmentationWithTransparency ( self)

Colorized version of the segmentation map with transparency.

◆ 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.

◆ Frame() [1/2]

eVision.EFrame eVision.EasyDeepLearning.ESupervisedSegmenterResult.Frame ( self)

Gets the frame in which the result was computed.

◆ Frame() [2/2]

eVision.EasyDeepLearning.ESupervisedSegmenterResult.Frame ( self,
eVision.EFrame value )

Gets the frame in which the result was computed.

◆ 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

◆ GroundtruthSegmentationMap() [1/2]

eVision.EImageBW16 eVision.EasyDeepLearning.ESupervisedSegmenterResult.GroundtruthSegmentationMap ( self)

Ground truth segmentation map.

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

◆ GroundtruthSegmentationMap() [2/2]

eVision.EasyDeepLearning.ESupervisedSegmenterResult.GroundtruthSegmentationMap ( self,
eVision.EImageBW16 value )

Ground truth segmentation map.

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

◆ 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.

◆ Height()

int eVision.EasyDeepLearning.ESupervisedSegmenterResult.Height ( self)

Height of the source image and of the segmentation result.

◆ ImageMetrics()

eVision.EasyDeepLearning.ESupervisedSegmenterMetrics eVision.EasyDeepLearning.ESupervisedSegmenterResult.ImageMetrics ( self)

Metrics for the image.

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

◆ 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.

◆ NumLabels()

int eVision.EasyDeepLearning.ESupervisedSegmenterResult.NumLabels ( self)

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

◆ RemoveGroundtruthSegmentation()

None eVision.EasyDeepLearning.ESupervisedSegmenterResult.RemoveGroundtruthSegmentation ( self)

Removes any ground truth associated with the result.

◆ Score()

float eVision.EasyDeepLearning.ESupervisedSegmenterResult.Score ( self)

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

◆ SegmentationMap()

eVision.EImageBW16 eVision.EasyDeepLearning.ESupervisedSegmenterResult.SegmentationMap ( self)

Segmentation result.

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

◆ ToRegion()

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

Returns the region.

◆ Width()

int eVision.EasyDeepLearning.ESupervisedSegmenterResult.Width ( self)

Width of the source image and of the segmentation result.