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.
list[eVision._eVision.Easy3D.E3DBox] ROI (self)
 Sets/Gets a vector of eVision.Easy3D.E3DBox that defines the regions that should be compared.
 ROI (self, list[eVision._eVision.Easy3D.E3DBox] value)
 Sets/Gets a vector of eVision.Easy3D.E3DBox that defines the regions that should be compared.
list[eVision._eVision.Easy3D.E3DBox] DontCare (self)
 Sets/Gets a vector of eVision.Easy3D.E3DBox that defines the regions that should not be compared.
 DontCare (self, list[eVision._eVision.Easy3D.E3DBox] value)
 Sets/Gets a vector of eVision.Easy3D.E3DBox that defines the regions that should not be compared.
list[eVision._eVision.Easy3D.E3DBox] NoExtraMaterial (self)
 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.
 NoExtraMaterial (self, list[eVision._eVision.Easy3D.E3DBox] value)
 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.
bool EnableAutomaticDecimation (self)
 If True, the given reference is automatically decimated with a resolution depending on the distance threshold to speed-up processing.
 EnableAutomaticDecimation (self, bool value)
 If True, the given reference is automatically decimated with a resolution depending on the distance threshold to speed-up processing.
float AutomaticCropFactor (self)
 Sets/Gets the automatic cropping factor.
 AutomaticCropFactor (self, float value)
 Sets/Gets the automatic cropping factor.
eVision.Easy3D.EAnomalyThresholds AnomalyThresholds (self)
 Gets/Sets the thresholds related to the anomalies detection.
 AnomalyThresholds (self, eVision.Easy3D.EAnomalyThresholds value)
 Gets/Sets the thresholds related to the anomalies detection.
eVision.Easy3D.EAnomalyThresholds AnomalyHysteresis (self)
 Gets/Sets the hysteresis related to the anomalies detection.
 AnomalyHysteresis (self, eVision.Easy3D.EAnomalyThresholds value)
 Gets/Sets the hysteresis related to the anomalies detection.
eVision.Easy3D.EComparisonDistanceMode ComparisonDistanceMode (self)
 Sets/Gets the distance mode for the 3D comparison.
 ComparisonDistanceMode (self, eVision.Easy3D.EComparisonDistanceMode value)
 Sets/Gets the distance mode for the 3D comparison.
eVision.Easy3D.EEdgeCroppingParameters EdgeCroppingParameters (self)
 Gets/Sets the parameters driving the edge cropping.
 EdgeCroppingParameters (self, eVision.Easy3D.EEdgeCroppingParameters value)
 Gets/Sets the parameters driving the edge cropping.
bool EnableAutomaticEdgeCropping (self)
 If True, edges in the reference will be cropped automatically.
 EnableAutomaticEdgeCropping (self, bool value)
 If True, edges in the reference will be cropped automatically.

Protected Member Functions

 _MeshReference__setter (self, eVision.Easy3D.EMesh value)
 Sets the 3D reference model.
 _PointCloudReference__setter (self, eVision.Easy3D.EPointCloud value)
 Sets the 3D reference model.

Properties

 MeshReference
 PointCloudReference

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

◆ _MeshReference__setter()

eVision.Easy3D.E3DComparer._MeshReference__setter ( self,
eVision.Easy3D.EMesh value )
protected

Sets the 3D reference model.

See also eVision.Easy3D.E3DComparer.PointCloudReference.

◆ _PointCloudReference__setter()

eVision.Easy3D.E3DComparer._PointCloudReference__setter ( self,
eVision.Easy3D.EPointCloud value )
protected

Sets the 3D reference model.

See also eVision.Easy3D.E3DComparer.MeshReference.

◆ AnomalyHysteresis() [1/2]

eVision.Easy3D.EAnomalyThresholds eVision.Easy3D.E3DComparer.AnomalyHysteresis ( self)

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.

◆ AnomalyHysteresis() [2/2]

eVision.Easy3D.E3DComparer.AnomalyHysteresis ( self,
eVision.Easy3D.EAnomalyThresholds value )

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

eVision.Easy3D.EAnomalyThresholds eVision.Easy3D.E3DComparer.AnomalyThresholds ( self)

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.

◆ AnomalyThresholds() [2/2]

eVision.Easy3D.E3DComparer.AnomalyThresholds ( self,
eVision.Easy3D.EAnomalyThresholds value )

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

float eVision.Easy3D.E3DComparer.AutomaticCropFactor ( self)

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

◆ AutomaticCropFactor() [2/2]

eVision.Easy3D.E3DComparer.AutomaticCropFactor ( self,
float value )

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

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

◆ ComparisonDistanceMode() [1/2]

eVision.Easy3D.EComparisonDistanceMode eVision.Easy3D.E3DComparer.ComparisonDistanceMode ( self)

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.

◆ ComparisonDistanceMode() [2/2]

eVision.Easy3D.E3DComparer.ComparisonDistanceMode ( self,
eVision.Easy3D.EComparisonDistanceMode value )

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.

◆ ComputesAnomalies()

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

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

◆ DontCare() [1/2]

list[eVision._eVision.Easy3D.E3DBox] eVision.Easy3D.E3DComparer.DontCare ( self)

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.

◆ DontCare() [2/2]

eVision.Easy3D.E3DComparer.DontCare ( self,
list[eVision._eVision.Easy3D.E3DBox] value )

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

eVision.Easy3D.EEdgeCroppingParameters eVision.Easy3D.E3DComparer.EdgeCroppingParameters ( self)

Gets/Sets the parameters driving the edge cropping.

Remarks:

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

◆ EdgeCroppingParameters() [2/2]

eVision.Easy3D.E3DComparer.EdgeCroppingParameters ( self,
eVision.Easy3D.EEdgeCroppingParameters value )

Gets/Sets the parameters driving the edge cropping.

Remarks:

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

◆ EnableAutomaticDecimation() [1/2]

bool eVision.Easy3D.E3DComparer.EnableAutomaticDecimation ( self)

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

◆ EnableAutomaticDecimation() [2/2]

eVision.Easy3D.E3DComparer.EnableAutomaticDecimation ( self,
bool value )

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

bool eVision.Easy3D.E3DComparer.EnableAutomaticEdgeCropping ( self)

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

◆ EnableAutomaticEdgeCropping() [2/2]

eVision.Easy3D.E3DComparer.EnableAutomaticEdgeCropping ( self,
bool value )

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

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

◆ NoExtraMaterial() [1/2]

list[eVision._eVision.Easy3D.E3DBox] eVision.Easy3D.E3DComparer.NoExtraMaterial ( self)

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

◆ NoExtraMaterial() [2/2]

eVision.Easy3D.E3DComparer.NoExtraMaterial ( self,
list[eVision._eVision.Easy3D.E3DBox] value )

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

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

◆ ROI() [1/2]

list[eVision._eVision.Easy3D.E3DBox] eVision.Easy3D.E3DComparer.ROI ( self)

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

By default, the entire reference is considered.

◆ ROI() [2/2]

eVision.Easy3D.E3DComparer.ROI ( self,
list[eVision._eVision.Easy3D.E3DBox] value )

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

By default, the entire reference is considered.

◆ 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

◆ MeshReference

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

◆ PointCloudReference

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