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

Represents a 3D comparison context. More...

Public Member Functions

None __init__ (self)
 Constructs a 3D matching context.
None __init__ (self, eVision.Easy3D.E3DComparer other)
 Constructs a 3D matching context.
None Load (self, str path)
 Loads the eVision.Easy3D.E3DComparer.
None Load (self, eVision.ESerializer|None serializer)
 Loads the eVision.Easy3D.E3DComparer.
None Save (self, str path)
 Saves the eVision.Easy3D.E3DComparer.
None Save (self, eVision.ESerializer|None serializer)
 Saves the eVision.Easy3D.E3DComparer.
None Compare (self, eVision.Easy3D.EPointCloud scan)
 Compares the reference patterns against a scan.
None GetComparisonPointCloud (self, eVision.Easy3D.EPointCloud cloudOut, bool storeDistances, bool storeColors, bool fullModel)
 Gets the eVision.Easy3D.EPointCloud that is used for the comparison.
None GetComparisonPointCloud (self, eVision.Easy3D.EPointCloud cloudOut, bool storeDistances, bool storeColors)
 Gets the eVision.Easy3D.EPointCloud that is used for the comparison.
None GetComparisonPointCloud (self, eVision.Easy3D.EPointCloud cloudOut, bool storeDistances)
 Gets the eVision.Easy3D.EPointCloud that is used for the comparison.
None GetComparisonPointCloud (self, eVision.Easy3D.EPointCloud cloudOut)
 Gets the eVision.Easy3D.EPointCloud that is used for the comparison.
None PrepareReference (self)
 Prepare the reference internal structures.
None ResetAnomalyThresholds (self)
 Sets the anomaly thresholds to their default values (computed automatically from the model size).
list[eVision._eVision.Easy3D.E3DAnomaly] ComputesAnomalies (self)
 Computes the anomalies and returns them as a vector of eVision.Easy3D.E3DAnomaly.

Properties

 MeshReference = property(None, _MeshReference__setter)
 Sets the 3D reference model.
 PointCloudReference = property(None, _PointCloudReference__setter)
 Sets the 3D reference model.
 ROI = property(_ROI__getter, _ROI__setter)
 Sets/Gets a vector of eVision.Easy3D.E3DBox that defines the regions that should be compared.
 DontCare = property(_DontCare__getter, _DontCare__setter)
 Sets/Gets a vector of eVision.Easy3D.E3DBox that defines the regions that should not be compared.
 NoExtraMaterial = property(_NoExtraMaterial__getter, _NoExtraMaterial__setter)
 Sets/Gets a vector of eVision.Easy3D.E3DBox that defines the regions where there should not be points in the scan far from the reference.
 EnableAutomaticDecimation = property(_EnableAutomaticDecimation__getter, _EnableAutomaticDecimation__setter)
 If True, the given reference is automatically decimated with a resolution depending on the distance threshold to speed-up processing.
 AutomaticCropFactor = property(_AutomaticCropFactor__getter, _AutomaticCropFactor__setter)
 Sets/Gets the automatic cropping factor.
 AnomalyThresholds = property(_AnomalyThresholds__getter, _AnomalyThresholds__setter)
 Gets/Sets the thresholds related to the anomalies detection.
 AnomalyHysteresis = property(_AnomalyHysteresis__getter, _AnomalyHysteresis__setter)
 Gets/Sets the hysteresis related to the anomalies detection.
 ComparisonDistanceMode = property(_ComparisonDistanceMode__getter, _ComparisonDistanceMode__setter)
 Sets/Gets the distance mode for the 3D comparison.
 EdgeCroppingParameters = property(_EdgeCroppingParameters__getter, _EdgeCroppingParameters__setter)
 Gets/Sets the parameters driving the edge cropping.
 EnableAutomaticEdgeCropping = property(_EnableAutomaticEdgeCropping__getter, _EnableAutomaticEdgeCropping__setter)
 If True, edges in the reference will be cropped automatically.

Detailed Description

Represents a 3D comparison context.

Remarks:

License(s): Easy3DMatch

Constructor & Destructor Documentation

◆ __init__() [1/2]

None eVision.Easy3D.E3DComparer.__init__ ( self)

Constructs a 3D matching context.

◆ __init__() [2/2]

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

Constructs a 3D matching context.

Parameters
otherAnother eVision.Easy3D.E3DComparer object to be copied in the new eVision.Easy3D.E3DComparer object.

Member Function Documentation

◆ Compare()

None eVision.Easy3D.E3DComparer.Compare ( self,
eVision.Easy3D.EPointCloud scan )

Compares the reference patterns against a scan.

Parameters
scanAn eVision.Easy3D.EPointCloud that represents the scan to compare to the reference.

◆ ComputesAnomalies()

list[eVision._eVision.Easy3D.E3DAnomaly] eVision.Easy3D.E3DComparer.ComputesAnomalies ( self)

Computes the anomalies and returns them as a vector of eVision.Easy3D.E3DAnomaly.

◆ GetComparisonPointCloud() [1/4]

None eVision.Easy3D.E3DComparer.GetComparisonPointCloud ( self,
eVision.Easy3D.EPointCloud cloudOut )

Gets the eVision.Easy3D.EPointCloud that is used for the comparison.

Parameters
cloudOutWhere to store the eVision.Easy3D.EPointCloud.

◆ GetComparisonPointCloud() [2/4]

None eVision.Easy3D.E3DComparer.GetComparisonPointCloud ( self,
eVision.Easy3D.EPointCloud cloudOut,
bool storeDistances )

Gets the eVision.Easy3D.EPointCloud that is used for the comparison.

Parameters
cloudOutWhere to store the eVision.Easy3D.EPointCloud.
storeDistancesIf set to True, the distances computed will be stored in the eVision.Easy3D.EPointCloud. The function eVision.Easy3D.EPointCloud.GetAttributeBuffer can be used with eVision.Easy3D.E3DAttribute.Distance to retrieve the distances.

Default: True

◆ GetComparisonPointCloud() [3/4]

None eVision.Easy3D.E3DComparer.GetComparisonPointCloud ( self,
eVision.Easy3D.EPointCloud cloudOut,
bool storeDistances,
bool storeColors )

Gets the eVision.Easy3D.EPointCloud that is used for the comparison.

Parameters
cloudOutWhere to store the eVision.Easy3D.EPointCloud.
storeDistancesIf set to True, the distances computed will be stored in the eVision.Easy3D.EPointCloud. The function eVision.Easy3D.EPointCloud.GetAttributeBuffer can be used with eVision.Easy3D.E3DAttribute.Distance to retrieve the distances.

Default: True

Parameters
storeColorsIf set to True, the colors related to the distances computed will be stored in the eVision.Easy3D.EPointCloud. The functions eVision.Easy3D.EPointCloud.GetAttributeBuffer can be used with eVision.Easy3D.E3DAttribute.Color to retrieve the distances.

The colors can also be used in the eVision.Easy3D.E3DViewer.

Default: True

◆ GetComparisonPointCloud() [4/4]

None eVision.Easy3D.E3DComparer.GetComparisonPointCloud ( self,
eVision.Easy3D.EPointCloud cloudOut,
bool storeDistances,
bool storeColors,
bool fullModel )

Gets the eVision.Easy3D.EPointCloud that is used for the comparison.

Parameters
cloudOutWhere to store the eVision.Easy3D.EPointCloud.
storeDistancesIf set to True, the distances computed will be stored in the eVision.Easy3D.EPointCloud. The function eVision.Easy3D.EPointCloud.GetAttributeBuffer can be used with eVision.Easy3D.E3DAttribute.Distance to retrieve the distances.

Default: True

Parameters
storeColorsIf set to True, the colors related to the distances computed will be stored in the eVision.Easy3D.EPointCloud. The functions eVision.Easy3D.EPointCloud.GetAttributeBuffer can be used with eVision.Easy3D.E3DAttribute.Color to retrieve the distances.

The colors can also be used in the eVision.Easy3D.E3DViewer.

Default: True

Parameters
fullModelIf set to True, the points that are not inside the ROI (see eVision.Easy3D.E3DComparer.ROI) will also be in the eVision.Easy3D.EPointCloud.

Default: False

◆ Load() [1/2]

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

Loads the eVision.Easy3D.E3DComparer.

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

Parameters
serializerThe serializer.

◆ Load() [2/2]

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

Loads the eVision.Easy3D.E3DComparer.

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

Parameters
pathThe file path.

◆ PrepareReference()

None eVision.Easy3D.E3DComparer.PrepareReference ( self)

Prepare the reference internal structures.

By default, this is done on the first call to eVision.Easy3D.E3DComparer.Compare.

◆ ResetAnomalyThresholds()

None eVision.Easy3D.E3DComparer.ResetAnomalyThresholds ( self)

Sets the anomaly thresholds to their default values (computed automatically from the model size).

◆ Save() [1/2]

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

Saves the eVision.Easy3D.E3DComparer.

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

Parameters
serializerThe serializer.

◆ Save() [2/2]

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

Saves the eVision.Easy3D.E3DComparer.

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

Parameters
pathThe file path.

Property Documentation

◆ AnomalyHysteresis

eVision.Easy3D.E3DComparer.AnomalyHysteresis = property(_AnomalyHysteresis__getter, _AnomalyHysteresis__setter)
static

Gets/Sets the hysteresis related to the anomalies detection.

Remarks:

To be considered as an anomaly, a cluster of points with a distance greater than distanceThreshold must have an area greater than areaThreshold. See eVision.Easy3D.E3DComparer.AnomalyThresholds. In addition, an hysteresis can be specified, such that the cluster will also have to contain a subset of points whose distance is greater than distanceHysteresisThreshold * distanceThreshold and area greater than areaHysteresisThreshold * areaThreshold. See also eVision.Easy3D.E3DComparer.AnomalyThresholds.

◆ AnomalyThresholds

eVision.Easy3D.E3DComparer.AnomalyThresholds = property(_AnomalyThresholds__getter, _AnomalyThresholds__setter)
static

Gets/Sets the thresholds related to the anomalies detection.

Remarks:

To be considered as an anomaly, a cluster of points with a distance greater than distanceThreshold must have an area greater than areaThreshold. See also eVision.Easy3D.E3DComparer.AnomalyHysteresis to more advanced anomaly detection.

If the anomaly thresholds aren't set, they will be computed automatically from the given reference once eVision.Easy3D.E3DComparer.PrepareReference is called. Trying to get the anomaly thresholds before they are set or automatically computed will throw an exception.

◆ AutomaticCropFactor

eVision.Easy3D.E3DComparer.AutomaticCropFactor = property(_AutomaticCropFactor__getter, _AutomaticCropFactor__setter)
static

Sets/Gets the automatic cropping factor.

The factor multiplies the anomaly distance threshold (eVision.Easy3D.E3DComparer.AnomalyThresholds) to obtain the margin for the cropping. If the value is smaller than 0, then no crop is performed before computing the distance.

Default: 1

Remarks:

Note that if the cropping margin is too small, the eVision.Easy3D.E3DPoint of the anomalies will not be visible (with the function eVision.Easy3D.E3DComparer.GetComparisonPointCloud and the parameter pointFromReference = False).

◆ ComparisonDistanceMode

eVision.Easy3D.E3DComparer.ComparisonDistanceMode = property(_ComparisonDistanceMode__getter, _ComparisonDistanceMode__setter)
static

Sets/Gets the distance mode for the 3D comparison.

All values of the enum are not allowed for eVision.Easy3D.E3DComparer.

Default: eVision.Easy3D.EComparisonDistanceMode.Euclidean.

◆ DontCare

eVision.Easy3D.E3DComparer.DontCare = property(_DontCare__getter, _DontCare__setter)
static

Sets/Gets a vector of eVision.Easy3D.E3DBox that defines the regions that should not be compared.

By default, no point of the reference is ignored.

◆ EdgeCroppingParameters

eVision.Easy3D.E3DComparer.EdgeCroppingParameters = property(_EdgeCroppingParameters__getter, _EdgeCroppingParameters__setter)
static

Gets/Sets the parameters driving the edge cropping.

Remarks:

Edge cropping is disabled by default, enable it using eVision.Easy3D.E3DComparer.EnableAutomaticEdgeCropping.

◆ EnableAutomaticDecimation

eVision.Easy3D.E3DComparer.EnableAutomaticDecimation = property(_EnableAutomaticDecimation__getter, _EnableAutomaticDecimation__setter)
static

If True, the given reference is automatically decimated with a resolution depending on the distance threshold to speed-up processing.

If False, all the points of the given reference are used to compute the distance.

Default: True

◆ EnableAutomaticEdgeCropping

eVision.Easy3D.E3DComparer.EnableAutomaticEdgeCropping = property(_EnableAutomaticEdgeCropping__getter, _EnableAutomaticEdgeCropping__setter)
static

If True, edges in the reference will be cropped automatically.

This is useful to avoid false positives that could occur near the edges of the object, in particular when using normals (see eVision.Easy3D.E3DComparer.ComparisonDistanceMode and eVision.Easy3D.EComparisonDistanceMode). To modify the parameters of the cropping, see eVision.Easy3D.E3DComparer.EdgeCroppingParameters.

Default: False

◆ MeshReference

eVision.Easy3D.E3DComparer.MeshReference = property(None, _MeshReference__setter)
static

Sets the 3D reference model.

See also eVision.Easy3D.E3DComparer.PointCloudReference.

◆ NoExtraMaterial

eVision.Easy3D.E3DComparer.NoExtraMaterial = property(_NoExtraMaterial__getter, _NoExtraMaterial__setter)
static

Sets/Gets a vector of eVision.Easy3D.E3DBox that defines the regions where there should not be points in the scan far from the reference.

By default, the points far from the reference are not considered as anomalies (if there also are some other points closer to the reference).

◆ PointCloudReference

eVision.Easy3D.E3DComparer.PointCloudReference = property(None, _PointCloudReference__setter)
static

Sets the 3D reference model.

See also eVision.Easy3D.E3DComparer.MeshReference.

◆ ROI

eVision.Easy3D.E3DComparer.ROI = property(_ROI__getter, _ROI__setter)
static

Sets/Gets a vector of eVision.Easy3D.E3DBox that defines the regions that should be compared.

By default, the entire reference is considered.