eVision Python API
Loading...
Searching...
No Matches
eVision.Easy3D.E3DObjectExtractor Class Reference

eVision.Easy3D.E3DObjectExtractor is used to extract 3D objects from a ZMap. More...

Public Member Functions

None __init__ (self)
 Constructs an eVision.Easy3D.E3DObjectExtractor with default (invalid) values.
None __init__ (self, eVision.Easy3D.E3DObjectExtractor other)
 Copy constructor for eVision.Easy3D.E3DObjectExtractor.
None Load (self, str path)
 Load the eVision.Easy3D.E3DObjectExtractor.
None Load (self, eVision.ESerializer|None serializer)
 Load the eVision.Easy3D.E3DObjectExtractor.
None Save (self, str path)
 Save the eVision.Easy3D.E3DObjectExtractor.
None Save (self, eVision.ESerializer|None serializer)
 Save the eVision.Easy3D.E3DObjectExtractor.
None SetComputeFeature (self, eVision.Easy3D.E3DObjectFeature feature, bool enable)
 Sets true if the feature should computed by the extractor, false otherwise.
None UnsetAllComputeFeatures (self)
 Disables all features to be computed by the extractor.
None SetAllComputeFeatures (self)
 Enables all features to be computed by the extractor.
bool GetComputeFeature (self, eVision.Easy3D.E3DObjectFeature feature)
 Returns true or false depending if the feature should be computed by the extractor.
int Extract (self, eVision.Easy3D.EZMap8 zMap)
 Processes the ZMap and extracts a list of 3D objects matching the criteria.
int Extract (self, eVision.Easy3D.EZMap8 zMap, eVision.ERegion region)
 Processes the ZMap and extracts a list of 3D objects matching the criteria.
int Extract (self, eVision.Easy3D.EZMap16 zMap)
 Processes the ZMap and extracts a list of 3D objects matching the criteria.
int Extract (self, eVision.Easy3D.EZMap16 zMap, eVision.ERegion region)
 Processes the ZMap and extracts a list of 3D objects matching the criteria.
int Extract (self, eVision.Easy3D.EZMap32f zMap)
 Processes the ZMap and extracts a list of 3D objects matching the criteria.
int Extract (self, eVision.Easy3D.EZMap32f zMap, eVision.ERegion region)
 Processes the ZMap and extracts a list of 3D objects matching the criteria.
int Extract (self, eVision.Easy3D.EZMap|None zMap)
 Processes the ZMap and extracts a list of 3D objects matching the criteria.
int Extract (self, eVision.Easy3D.EZMap|None zMap, eVision.ERegion region)
 Processes the ZMap and extracts a list of 3D objects matching the criteria.
None Draw (self, eVision.EDrawAdapter|None graphicContext, eVision.Easy3D.E3DObjectFeature feature, eVision.ERGBColor color, float zoomX, float zoomY, float panX, float panY)
 Draws the specified feature of all extracted objects in the given graphic context.
None Draw (self, eVision.EDrawAdapter|None graphicContext, eVision.Easy3D.E3DObjectFeature feature, eVision.ERGBColor color, float zoomX, float zoomY, float panX)
 Draws the specified feature of all extracted objects in the given graphic context.
None Draw (self, eVision.EDrawAdapter|None graphicContext, eVision.Easy3D.E3DObjectFeature feature, eVision.ERGBColor color, float zoomX, float zoomY)
 Draws the specified feature of all extracted objects in the given graphic context.
None Draw (self, eVision.EDrawAdapter|None graphicContext, eVision.Easy3D.E3DObjectFeature feature, eVision.ERGBColor color, float zoomX)
 Draws the specified feature of all extracted objects in the given graphic context.
None Draw (self, eVision.EDrawAdapter|None graphicContext, eVision.Easy3D.E3DObjectFeature feature, eVision.ERGBColor color)
 Draws the specified feature of all extracted objects in the given graphic context.
None Draw (self, eVision.EDrawAdapter|None graphicContext, eVision.Easy3D.E3DObjectFeature feature)
 Draws the specified feature of all extracted objects in the given graphic context.
None AddToMesh (self, eVision.Easy3D.E3DObjectFeature feature, eVision.Easy3D.EMesh mesh)
 For all extracted objects, adds a 3D representation (in the form of a list of triangles) of the given feature to the given mesh.

Properties

 LengthRange = property(_LengthRange__getter, _LengthRange__setter)
 The extraction object length range in metric units.
 WidthRange = property(_WidthRange__getter, _WidthRange__setter)
 The extraction object width range in metric units.
 LocalHeightRange = property(_LocalHeightRange__getter, _LocalHeightRange__setter)
 The extraction object local height range in metric units.
 ReferenceHeightRange = property(_ReferenceHeightRange__getter, _ReferenceHeightRange__setter)
 The extraction object reference height range in metric units.
 AspectRatioRange = property(_AspectRatioRange__getter, _AspectRatioRange__setter)
 The extraction 2D aspect ratio range.
 OrientationRange = property(_OrientationRange__getter, _OrientationRange__setter)
 The allowed angle range of the oriented 2D rectangle region.
 LocalTiltRange = property(_LocalTiltRange__getter, _LocalTiltRange__setter)
 The allowed angle range of the object local tilt.
 ReferenceTiltRange = property(_ReferenceTiltRange__getter, _ReferenceTiltRange__setter)
 The allowed angle range of the object reference tilt.
 AreaRange = property(_AreaRange__getter, _AreaRange__setter)
 The allowed area range for the objects.
 VolumeRange = property(_VolumeRange__getter, _VolumeRange__setter)
 The allowed volume range for the objects.
 OverlappedObject = property(_OverlappedObject__getter, _OverlappedObject__setter)
 Enable or disable the extraction of overlapped objects.
 OverlappedAreaRatio = property(_OverlappedAreaRatio__getter, _OverlappedAreaRatio__setter)
 Set or Get the object area ratio applicable when the overlapped mode is enabled.
 OverlappedHeightDifference = property(_OverlappedHeightDifference__getter, _OverlappedHeightDifference__setter)
 Set or Get the object height difference applicable when the overlapped mode is enabled.
 ExtractionSensitivity = property(_ExtractionSensitivity__getter, _ExtractionSensitivity__setter)
 Set or Get the extraction sensitivity.
 ContourReinforce = property(_ContourReinforce__getter, _ContourReinforce__setter)
 When contour reinforcement is enable, a filter is applied to the input image to detect and enhance the frontiers between objects.
 Objects = property(_Objects__getter, None)
 Returns the list of extracted objects.
 ObjectsMask = property(_ObjectsMask__getter, None)
 Gets the eVision.ERegion composed of all the objects ZMap pixels.
 BackgroundMask = property(_BackgroundMask__getter, None)
 Gets the eVision.ERegion composed of background ZMap pixels (where there is not object).

Detailed Description

eVision.Easy3D.E3DObjectExtractor is used to extract 3D objects from a ZMap.

Remarks:

License(s): Easy3DObject

Constructor & Destructor Documentation

◆ __init__() [1/2]

None eVision.Easy3D.E3DObjectExtractor.__init__ ( self)

Constructs an eVision.Easy3D.E3DObjectExtractor with default (invalid) values.

◆ __init__() [2/2]

None eVision.Easy3D.E3DObjectExtractor.__init__ ( self,
eVision.Easy3D.E3DObjectExtractor other )

Copy constructor for eVision.Easy3D.E3DObjectExtractor.

Parameters
otherThe other eVision.Easy3D.E3DObjectExtractor that we will copy into this one.

Member Function Documentation

◆ AddToMesh()

None eVision.Easy3D.E3DObjectExtractor.AddToMesh ( self,
eVision.Easy3D.E3DObjectFeature feature,
eVision.Easy3D.EMesh mesh )

For all extracted objects, adds a 3D representation (in the form of a list of triangles) of the given feature to the given mesh.

If the feature is not defined for the eVision.Easy3D.E3DObject, this method has no effect.

Parameters
featureThe feature to draw, only 3D features are supported.
meshThe mesh to add the graphics for.

◆ Draw() [1/6]

None eVision.Easy3D.E3DObjectExtractor.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.Easy3D.E3DObjectFeature feature )

Draws the specified feature of all extracted objects in the given graphic context.

If the feature is not defined for the eVision.Easy3D.E3DObject, this method has no effect.

Remarks:

Drawing is done in the device context associated to the desired window.

Parameters
graphicContextGraphic context on which to draw.
featureThe feature to draw.

◆ Draw() [2/6]

None eVision.Easy3D.E3DObjectExtractor.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.Easy3D.E3DObjectFeature feature,
eVision.ERGBColor color )

Draws the specified feature of all extracted objects in the given graphic context.

If the feature is not defined for the eVision.Easy3D.E3DObject, this method has no effect.

Remarks:

Drawing is done in the device context associated to the desired window.

Parameters
graphicContextGraphic context on which to draw.
featureThe feature to draw.
colorThe color in which to draw the feature (optional).

◆ Draw() [3/6]

None eVision.Easy3D.E3DObjectExtractor.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.Easy3D.E3DObjectFeature feature,
eVision.ERGBColor color,
float zoomX )

Draws the specified feature of all extracted objects in the given graphic context.

If the feature is not defined for the eVision.Easy3D.E3DObject, this method has no effect.

Remarks:

Drawing is done in the device context associated to the desired window.

Parameters
graphicContextGraphic context on which to draw.
featureThe feature to draw.
colorThe color in which to draw the feature (optional).
zoomXHorizontal zooming factor. By default, true scale is used.

◆ Draw() [4/6]

None eVision.Easy3D.E3DObjectExtractor.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.Easy3D.E3DObjectFeature feature,
eVision.ERGBColor color,
float zoomX,
float zoomY )

Draws the specified feature of all extracted objects in the given graphic context.

If the feature is not defined for the eVision.Easy3D.E3DObject, this method has no effect.

Remarks:

Drawing is done in the device context associated to the desired window.

Parameters
graphicContextGraphic context on which to draw.
featureThe feature to draw.
colorThe color in which to draw the feature (optional).
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), the horizontal zooming factor is used instead, so as to provide isotropic zooming.

◆ Draw() [5/6]

None eVision.Easy3D.E3DObjectExtractor.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.Easy3D.E3DObjectFeature feature,
eVision.ERGBColor color,
float zoomX,
float zoomY,
float panX )

Draws the specified feature of all extracted objects in the given graphic context.

If the feature is not defined for the eVision.Easy3D.E3DObject, this method has no effect.

Remarks:

Drawing is done in the device context associated to the desired window.

Parameters
graphicContextGraphic context on which to draw.
featureThe feature to draw.
colorThe color in which to draw the feature (optional).
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), 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/6]

None eVision.Easy3D.E3DObjectExtractor.Draw ( self,
eVision.EDrawAdapter | None graphicContext,
eVision.Easy3D.E3DObjectFeature feature,
eVision.ERGBColor color,
float zoomX,
float zoomY,
float panX,
float panY )

Draws the specified feature of all extracted objects in the given graphic context.

If the feature is not defined for the eVision.Easy3D.E3DObject, this method has no effect.

Remarks:

Drawing is done in the device context associated to the desired window.

Parameters
graphicContextGraphic context on which to draw.
featureThe feature to draw.
colorThe color in which to draw the feature (optional).
zoomXHorizontal zooming factor. By default, true scale is used.
zoomYVertical zooming factor. If set to 0 (default), 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.

◆ Extract() [1/8]

int eVision.Easy3D.E3DObjectExtractor.Extract ( self,
eVision.Easy3D.EZMap16 zMap )

Processes the ZMap and extracts a list of 3D objects matching the criteria.

Returns the number of extracted objects.

Parameters
zMapThe source ZMap.

◆ Extract() [2/8]

int eVision.Easy3D.E3DObjectExtractor.Extract ( self,
eVision.Easy3D.EZMap16 zMap,
eVision.ERegion region )

Processes the ZMap and extracts a list of 3D objects matching the criteria.

Returns the number of extracted objects.

Parameters
zMapThe source ZMap.
regionThe region of interest, only pixels inside the given region are considered for object extraction.

◆ Extract() [3/8]

int eVision.Easy3D.E3DObjectExtractor.Extract ( self,
eVision.Easy3D.EZMap32f zMap )

Processes the ZMap and extracts a list of 3D objects matching the criteria.

Returns the number of extracted objects.

Parameters
zMapThe source ZMap.

◆ Extract() [4/8]

int eVision.Easy3D.E3DObjectExtractor.Extract ( self,
eVision.Easy3D.EZMap32f zMap,
eVision.ERegion region )

Processes the ZMap and extracts a list of 3D objects matching the criteria.

Returns the number of extracted objects.

Parameters
zMapThe source ZMap.
regionThe region of interest, only pixels inside the given region are considered for object extraction.

◆ Extract() [5/8]

int eVision.Easy3D.E3DObjectExtractor.Extract ( self,
eVision.Easy3D.EZMap8 zMap )

Processes the ZMap and extracts a list of 3D objects matching the criteria.

Returns the number of extracted objects.

Parameters
zMapThe source ZMap.

◆ Extract() [6/8]

int eVision.Easy3D.E3DObjectExtractor.Extract ( self,
eVision.Easy3D.EZMap8 zMap,
eVision.ERegion region )

Processes the ZMap and extracts a list of 3D objects matching the criteria.

Returns the number of extracted objects.

Parameters
zMapThe source ZMap.
regionThe region of interest, only pixels inside the given region are considered for object extraction.

◆ Extract() [7/8]

int eVision.Easy3D.E3DObjectExtractor.Extract ( self,
eVision.Easy3D.EZMap | None zMap )

Processes the ZMap and extracts a list of 3D objects matching the criteria.

Returns the number of extracted objects.

Parameters
zMapThe source ZMap.

◆ Extract() [8/8]

int eVision.Easy3D.E3DObjectExtractor.Extract ( self,
eVision.Easy3D.EZMap | None zMap,
eVision.ERegion region )

Processes the ZMap and extracts a list of 3D objects matching the criteria.

Returns the number of extracted objects.

Parameters
zMapThe source ZMap.
regionThe region of interest, only pixels inside the given region are considered for object extraction.

◆ GetComputeFeature()

bool eVision.Easy3D.E3DObjectExtractor.GetComputeFeature ( self,
eVision.Easy3D.E3DObjectFeature feature )

Returns true or false depending if the feature should be computed by the extractor.

Parameters
featureThe feature that is computed or not.

◆ Load() [1/2]

None eVision.Easy3D.E3DObjectExtractor.Load ( self,
eVision.ESerializer | None serializer )

Load the eVision.Easy3D.E3DObjectExtractor.

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

Parameters
serializerThe serializer.

◆ Load() [2/2]

None eVision.Easy3D.E3DObjectExtractor.Load ( self,
str path )

Load the eVision.Easy3D.E3DObjectExtractor.

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

Parameters
pathThe file path.

◆ Save() [1/2]

None eVision.Easy3D.E3DObjectExtractor.Save ( self,
eVision.ESerializer | None serializer )

Save the eVision.Easy3D.E3DObjectExtractor.

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

Parameters
serializerThe eVision.ESerializer object that is written to.

◆ Save() [2/2]

None eVision.Easy3D.E3DObjectExtractor.Save ( self,
str path )

Save the eVision.Easy3D.E3DObjectExtractor.

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

Parameters
pathThe file path.

◆ SetAllComputeFeatures()

None eVision.Easy3D.E3DObjectExtractor.SetAllComputeFeatures ( self)

Enables all features to be computed by the extractor.

◆ SetComputeFeature()

None eVision.Easy3D.E3DObjectExtractor.SetComputeFeature ( self,
eVision.Easy3D.E3DObjectFeature feature,
bool enable )

Sets true if the feature should computed by the extractor, false otherwise.

Parameters
featureA feature from eVision.Easy3D.E3DObjectFeature.
enableA bool to choose whether to enable or disable a feature.

◆ UnsetAllComputeFeatures()

None eVision.Easy3D.E3DObjectExtractor.UnsetAllComputeFeatures ( self)

Disables all features to be computed by the extractor.

Property Documentation

◆ AreaRange

eVision.Easy3D.E3DObjectExtractor.AreaRange = property(_AreaRange__getter, _AreaRange__setter)
static

The allowed area range for the objects.

Area is expressed in the metric coordinate system. E.g, if the ZMap space is in mm, the area is in mm2.

◆ AspectRatioRange

eVision.Easy3D.E3DObjectExtractor.AspectRatioRange = property(_AspectRatioRange__getter, _AspectRatioRange__setter)
static

The extraction 2D aspect ratio range.

The aspect ratio is the smallest dimension divided by the largest dimension, its value is always between 0 and 1. The smaller the ratio, the more elongated the object is. A value of 1 means a perfectly square object (length=width).

◆ BackgroundMask

eVision.Easy3D.E3DObjectExtractor.BackgroundMask = property(_BackgroundMask__getter, None)
static

Gets the eVision.ERegion composed of background ZMap pixels (where there is not object).

◆ ContourReinforce

eVision.Easy3D.E3DObjectExtractor.ContourReinforce = property(_ContourReinforce__getter, _ContourReinforce__setter)
static

When contour reinforcement is enable, a filter is applied to the input image to detect and enhance the frontiers between objects.

That option is interesting when objects to extract are in contact. The default state is false (OFF).

◆ ExtractionSensitivity

eVision.Easy3D.E3DObjectExtractor.ExtractionSensitivity = property(_ExtractionSensitivity__getter, _ExtractionSensitivity__setter)
static

Set or Get the extraction sensitivity.

The sensitivity ranges from 0 (minimum sensitivity) to 1 (maximum sensitivity). With high sensitivity, the library tries to extract object that are mixed with their surrounding. Low sensitivity values tend to ignore faint objects. The default sensitivity value is 0.6.

◆ LengthRange

eVision.Easy3D.E3DObjectExtractor.LengthRange = property(_LengthRange__getter, _LengthRange__setter)
static

The extraction object length range in metric units.

Length is the largest dimension of the object, expressed the ZMap coordinate system.

◆ LocalHeightRange

eVision.Easy3D.E3DObjectExtractor.LocalHeightRange = property(_LocalHeightRange__getter, _LocalHeightRange__setter)
static

The extraction object local height range in metric units.

Local height is the dimension of the object along the normal of the base plane. For a height based on the ZMap origin, use eVision.Easy3D.E3DObjectExtractor.LocalHeightRange.

◆ LocalTiltRange

eVision.Easy3D.E3DObjectExtractor.LocalTiltRange = property(_LocalTiltRange__getter, _LocalTiltRange__setter)
static

The allowed angle range of the object local tilt.

This is the angle between the base plane and the object plane. A value of 0 means that the object top surface is parallel to its base. Valid values are between 0 and +90 degrees (or 0 and Pi/2 if angle unit is radians).

◆ Objects

eVision.Easy3D.E3DObjectExtractor.Objects = property(_Objects__getter, None)
static

Returns the list of extracted objects.

The objects are sorted from smallest area to largest area.

◆ ObjectsMask

eVision.Easy3D.E3DObjectExtractor.ObjectsMask = property(_ObjectsMask__getter, None)
static

Gets the eVision.ERegion composed of all the objects ZMap pixels.

◆ OrientationRange

eVision.Easy3D.E3DObjectExtractor.OrientationRange = property(_OrientationRange__getter, _OrientationRange__setter)
static

The allowed angle range of the oriented 2D rectangle region.

This is the angle of the longest axis (the length of the object), in counter clockwise direction, from the horizontal axis. Valid values are between -90 and +90 degrees (or -Pi/2 and Pi/2 if angle unit is radians).

◆ OverlappedAreaRatio

eVision.Easy3D.E3DObjectExtractor.OverlappedAreaRatio = property(_OverlappedAreaRatio__getter, _OverlappedAreaRatio__setter)
static

Set or Get the object area ratio applicable when the overlapped mode is enabled.

The area ratio defines the minimum area difference between 2 extracted objects that overlap. E.g with a value of 4, the top object must have an area at least 4 times smaller than the bottom object (or the bottom object must have an area at least 4 times bigger than the top object).

Remarks:

See eVision.Easy3D.E3DObjectExtractor.OverlappedObject

◆ OverlappedHeightDifference

eVision.Easy3D.E3DObjectExtractor.OverlappedHeightDifference = property(_OverlappedHeightDifference__getter, _OverlappedHeightDifference__setter)
static

Set or Get the object height difference applicable when the overlapped mode is enabled.

That value defines the minimum height difference between 2 overlapped objects.

Remarks:

See eVision.Easy3D.E3DObjectExtractor.OverlappedObject

◆ OverlappedObject

eVision.Easy3D.E3DObjectExtractor.OverlappedObject = property(_OverlappedObject__getter, _OverlappedObject__setter)
static

Enable or disable the extraction of overlapped objects.

Remarks:

See eVision.Easy3D.E3DObjectExtractor.OverlappedAreaRatio and eVision.Easy3D.E3DObjectExtractor.OverlappedHeightDifference

◆ ReferenceHeightRange

eVision.Easy3D.E3DObjectExtractor.ReferenceHeightRange = property(_ReferenceHeightRange__getter, _ReferenceHeightRange__setter)
static

The extraction object reference height range in metric units.

Reference height is the dimension of the object along the ZMap Z axis from ZMap origin. For a height based on the object base plane, use eVision.Easy3D.E3DObjectExtractor.ReferenceHeightRange.

◆ ReferenceTiltRange

eVision.Easy3D.E3DObjectExtractor.ReferenceTiltRange = property(_ReferenceTiltRange__getter, _ReferenceTiltRange__setter)
static

The allowed angle range of the object reference tilt.

This is the angle between the object plane and the ZMap Z Axis. A value of 0 means that the object top surface is parallel to the ZMap XY plane. Valid values are between 0 and +90 degrees (or 0 and Pi/2 if angle unit is radians).

◆ VolumeRange

eVision.Easy3D.E3DObjectExtractor.VolumeRange = property(_VolumeRange__getter, _VolumeRange__setter)
static

The allowed volume range for the objects.

Volume is expressed in the metric coordinate system. E.g, if the ZMap space is in mm, the volume is in mm3.

◆ WidthRange

eVision.Easy3D.E3DObjectExtractor.WidthRange = property(_WidthRange__getter, _WidthRange__setter)
static

The extraction object width range in metric units.

Width is the smallest dimension of the object, expressed the ZMap coordinate system.