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

Represents a 3D comparison context. More...

Inheritance diagram for eVision.Easy3D.E3DComparer:
Collaboration diagram for eVision.Easy3D.E3DComparer:

Public Member Functions

 E3DComparer ()
 Constructs a 3D matching context.
 E3DComparer (eVision.Easy3D.E3DComparer other)
 Constructs a 3D matching context.
void Load (string path)
 Loads the E3DComparer. The given ESerializer must have been created for reading.
void Load (eVision.ESerializer serializer)
 Loads the E3DComparer. The given ESerializer must have been created for reading.
void Save (string path)
 Saves the E3DComparer. The given ESerializer must have been created for writing.
void Save (eVision.ESerializer serializer)
 Saves the E3DComparer. The given ESerializer must have been created for writing.
void Compare (eVision.Easy3D.EPointCloud scan)
 Compares the reference patterns against a scan.
void GetComparisonPointCloud (eVision.Easy3D.EPointCloud cloudOut, bool storeDistances, bool storeColors, bool fullModel)
 Gets the EPointCloud that is used for the comparison.
void GetComparisonPointCloud (eVision.Easy3D.EPointCloud cloudOut, bool storeDistances, bool storeColors)
 Gets the EPointCloud that is used for the comparison.
void GetComparisonPointCloud (eVision.Easy3D.EPointCloud cloudOut, bool storeDistances)
 Gets the EPointCloud that is used for the comparison.
void GetComparisonPointCloud (eVision.Easy3D.EPointCloud cloudOut)
 Gets the EPointCloud that is used for the comparison.
void PrepareReference ()
 Prepare the reference internal structures. By default, this is done on the first call to E3DComparer.Compare.
void ResetAnomalyThresholds ()
 Sets the anomaly thresholds to their default values (computed automatically from the model size).
void SetAnomalyThresholds (float distanceThreshold, float areaThreshold)
 Sets the thresholds related to the anomalies detection.
void GetAnomalyThresholds (out float distanceThreshold, out float areaThreshold)
 Gets the thresholds related to the anomalies detection.
void SetAnomalyHysteresis (float distanceHysteresisThreshold, float areaHysteresisThreshold)
 Sets the hysteresis related to the anomalies detection.
void GetAnomalyHysteresis (out float distanceHysteresisThreshold, out float areaHysteresisThreshold)
 Gets the hysteresis related to the anomalies detection.
eVision.Easy3D.E3DAnomaly[] ComputesAnomalies ()
 Computes the anomalies and returns them as a vector of E3DAnomaly.
void SetEdgeCroppingParameters (uint numberNeighbors, float curvatureThreshold)
 Sets the parameters driving the edge cropping.
void GetEdgeCroppingParameters (out uint numberNeighbors, out float curvatureThreshold)
 Gets the parameters driving the edge cropping.

Properties

eVision.Easy3D.EMesh MeshReference [set]
 Sets the 3D reference model. See also E3DComparer.PointCloudReference.
eVision.Easy3D.EPointCloud PointCloudReference [set]
 Sets the 3D reference model. See also E3DComparer.MeshReference.
eVision.Easy3D.E3DBox[] ROI [get, set]
 Sets/Gets a vector of E3DBox that defines the regions that should be compared. By default, the entire reference is considered.
eVision.Easy3D.E3DBox[] DontCare [get, set]
 Sets/Gets a vector of E3DBox that defines the regions that should not be compared. By default, no point of the reference is ignored.
eVision.Easy3D.E3DBox[] NoExtraMaterial [get, set]
 Sets/Gets a vector of 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).
bool EnableAutomaticDecimation [get, set]
 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.
float AutomaticCropFactor [get, set]
 Sets/Gets the automatic cropping factor. The factor multiplies the anomaly distance threshold (E3DComparer.SetAnomalyThresholds) to obtain the margin for the cropping. If the value is smaller than 0, then no crop is performed before computing the distance.
eVision.Easy3D.EAnomalyThresholds AnomalyThresholds [get, set]
 Gets/Sets the thresholds related to the anomalies detection.
eVision.Easy3D.EAnomalyThresholds AnomalyHysteresis [get, set]
 Gets/Sets the hysteresis related to the anomalies detection.
eVision.Easy3D.EComparisonDistanceMode ComparisonDistanceMode [get, set]
 Sets/Gets the distance mode for the 3D comparison. All values of the enum are not allowed for E3DComparer.
eVision.Easy3D.EEdgeCroppingParameters EdgeCroppingParameters [get, set]
 Gets/Sets the parameters driving the edge cropping.
bool EnableAutomaticEdgeCropping [get, set]
 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 E3DComparer.ComparisonDistanceMode and EComparisonDistanceMode). To modify the parameters of the cropping, see E3DComparer.SetEdgeCroppingParameters.

Detailed Description

Represents a 3D comparison context.

License(s): Easy3DMatch

Constructor & Destructor Documentation

◆ E3DComparer() [1/2]

eVision.Easy3D.E3DComparer.E3DComparer ( )

Constructs a 3D matching context.

◆ E3DComparer() [2/2]

eVision.Easy3D.E3DComparer.E3DComparer ( eVision.Easy3D.E3DComparer other)

Constructs a 3D matching context.

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

Member Function Documentation

◆ Compare()

void eVision.Easy3D.E3DComparer.Compare ( eVision.Easy3D.EPointCloud scan)

Compares the reference patterns against a scan.

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

◆ ComputesAnomalies()

eVision.Easy3D.E3DAnomaly[] eVision.Easy3D.E3DComparer.ComputesAnomalies ( )

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

◆ GetAnomalyHysteresis()

void eVision.Easy3D.E3DComparer.GetAnomalyHysteresis ( out float distanceHysteresisThreshold,
out float areaHysteresisThreshold )

Gets the hysteresis related to the anomalies detection.

Parameters
distanceHysteresisThresholdThe distance hysteresis threshold. Must be greater than or equal to 1. Default: 1
areaHysteresisThresholdThe area hysteresis threshold. Must be smaller than or equal to 1. Default: 1.

To be considered as an anomaly, a cluster of points with a distance greater than distanceThreshold must have an area greater than areaThreshold. See E3DComparer.SetAnomalyThresholds. 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 E3DComparer.SetAnomalyThresholds.

Deprecated

Use E3DComparer.AnomalyHysteresis instead.

Deprecated in version 24.6. Scheduled to be removed in version 27.6.

◆ GetAnomalyThresholds()

void eVision.Easy3D.E3DComparer.GetAnomalyThresholds ( out float distanceThreshold,
out float areaThreshold )

Gets the thresholds related to the anomalies detection.

Parameters
distanceThresholdThe distance threshold.
areaThresholdThe area threshold.

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 E3DComparer.AnomalyHysteresis to more advanced anomaly detection.

Trying to get the anomaly thresholds before they are set or automatically computed will throw an exception.

Deprecated

Use E3DComparer.AnomalyThresholds instead.

Deprecated in version 24.6. Scheduled to be removed in version 27.6.

◆ GetComparisonPointCloud() [1/4]

void eVision.Easy3D.E3DComparer.GetComparisonPointCloud ( eVision.Easy3D.EPointCloud cloudOut)

Gets the EPointCloud that is used for the comparison.

Parameters
cloudOutWhere to store the EPointCloud.

◆ GetComparisonPointCloud() [2/4]

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

Gets the EPointCloud that is used for the comparison.

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

Default: True

◆ GetComparisonPointCloud() [3/4]

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

Gets the EPointCloud that is used for the comparison.

Parameters
cloudOutWhere to store the EPointCloud.
storeDistancesIf set to True, the distances computed will be stored in the EPointCloud. The function EPointCloud.GetAttributeBuffer can be used with E3DAttribute.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 EPointCloud. The functions EPointCloud.GetAttributeBuffer can be used with E3DAttribute.E3DAttribute_Color to retrieve the distances.

The colors can also be used in the E3DViewer.

Default: True

◆ GetComparisonPointCloud() [4/4]

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

Gets the EPointCloud that is used for the comparison.

Parameters
cloudOutWhere to store the EPointCloud.
storeDistancesIf set to True, the distances computed will be stored in the EPointCloud. The function EPointCloud.GetAttributeBuffer can be used with E3DAttribute.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 EPointCloud. The functions EPointCloud.GetAttributeBuffer can be used with E3DAttribute.E3DAttribute_Color to retrieve the distances.

The colors can also be used in the E3DViewer.

Default: True

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

Default: False

◆ GetEdgeCroppingParameters()

void eVision.Easy3D.E3DComparer.GetEdgeCroppingParameters ( out uint numberNeighbors,
out float curvatureThreshold )

Gets the parameters driving the edge cropping.

Parameters
numberNeighborsThe number of neighbors that we will use to compute the local curvature. The bigger this parameter, the thicker the cropping will be. This number must be bigger than 10. Default: 100
curvatureThresholdThe curvature value above which a point is cropped (must be between 0 and 1). Default: 0.15

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

Deprecated

Use E3DComparer.EdgeCroppingParameters instead.

Deprecated in version 24.6. Scheduled to be removed in version 27.6.

◆ Load() [1/2]

void eVision.Easy3D.E3DComparer.Load ( eVision.ESerializer serializer)

Loads the E3DComparer. The given ESerializer must have been created for reading.

Parameters
serializerThe serializer.

◆ Load() [2/2]

void eVision.Easy3D.E3DComparer.Load ( string path)

Loads the E3DComparer. The given ESerializer must have been created for reading.

Parameters
pathThe file path.

◆ PrepareReference()

void eVision.Easy3D.E3DComparer.PrepareReference ( )

Prepare the reference internal structures. By default, this is done on the first call to E3DComparer.Compare.

◆ ResetAnomalyThresholds()

void eVision.Easy3D.E3DComparer.ResetAnomalyThresholds ( )

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

◆ Save() [1/2]

void eVision.Easy3D.E3DComparer.Save ( eVision.ESerializer serializer)

Saves the E3DComparer. The given ESerializer must have been created for writing.

Parameters
serializerThe serializer.

◆ Save() [2/2]

void eVision.Easy3D.E3DComparer.Save ( string path)

Saves the E3DComparer. The given ESerializer must have been created for writing.

Parameters
pathThe file path.

◆ SetAnomalyHysteresis()

void eVision.Easy3D.E3DComparer.SetAnomalyHysteresis ( float distanceHysteresisThreshold,
float areaHysteresisThreshold )

Sets the hysteresis related to the anomalies detection.

Parameters
distanceHysteresisThresholdThe distance hysteresis threshold. Must be greater than or equal to 1. Default: 1
areaHysteresisThresholdThe area hysteresis threshold. Must be smaller than or equal to 1. Default: 1.

To be considered as an anomaly, a cluster of points with a distance greater than distanceThreshold must have an area greater than areaThreshold. See E3DComparer.SetAnomalyThresholds. 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 E3DComparer.AnomalyThresholds.

Deprecated

Use E3DComparer.AnomalyHysteresis instead.

Deprecated in version 24.6. Scheduled to be removed in version 27.6.

◆ SetAnomalyThresholds()

void eVision.Easy3D.E3DComparer.SetAnomalyThresholds ( float distanceThreshold,
float areaThreshold )

Sets the thresholds related to the anomalies detection.

Parameters
distanceThresholdThe distance threshold. Must be > 0.
areaThresholdThe area threshold. Must be > 0.

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 E3DComparer.AnomalyHysteresis to more advanced anomaly detection.

If the anomaly thresholds aren't set, they will be computed automatically from the given reference once E3DComparer.PrepareReference is called.

Deprecated

Use E3DComparer.AnomalyThresholds instead.

Deprecated in version 24.6. Scheduled to be removed in version 27.6.

◆ SetEdgeCroppingParameters()

void eVision.Easy3D.E3DComparer.SetEdgeCroppingParameters ( uint numberNeighbors,
float curvatureThreshold )

Sets the parameters driving the edge cropping.

Parameters
numberNeighborsThe number of neighbors that we will use to compute the local curvature. The bigger this parameter, the thicker the cropping will be. This number must be bigger than 10. Default: 100
curvatureThresholdThe curvature value above which a point is cropped (must be between 0 and 1). Default: 0.15

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

Deprecated

Use E3DComparer.EdgeCroppingParameters instead.

Deprecated in version 24.6. Scheduled to be removed in version 27.6.

Property Documentation

◆ AnomalyHysteresis

eVision.Easy3D.EAnomalyThresholds eVision.Easy3D.E3DComparer.AnomalyHysteresis
getset

Gets/Sets the hysteresis related to the anomalies detection.

To be considered as an anomaly, a cluster of points with a distance greater than distanceThreshold must have an area greater than areaThreshold. See E3DComparer.SetAnomalyThresholds. 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 E3DComparer.AnomalyThresholds.

◆ AnomalyThresholds

eVision.Easy3D.EAnomalyThresholds eVision.Easy3D.E3DComparer.AnomalyThresholds
getset

Gets/Sets the thresholds related to the anomalies detection.

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 E3DComparer.AnomalyHysteresis to more advanced anomaly detection.

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

◆ AutomaticCropFactor

float eVision.Easy3D.E3DComparer.AutomaticCropFactor
getset

Sets/Gets the automatic cropping factor. The factor multiplies the anomaly distance threshold (E3DComparer.SetAnomalyThresholds) 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

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

◆ ComparisonDistanceMode

eVision.Easy3D.EComparisonDistanceMode eVision.Easy3D.E3DComparer.ComparisonDistanceMode
getset

Sets/Gets the distance mode for the 3D comparison. All values of the enum are not allowed for E3DComparer.

Default: EComparisonDistanceMode.EComparisonDistanceMode_Euclidean.

◆ DontCare

eVision.Easy3D.E3DBox [] eVision.Easy3D.E3DComparer.DontCare
getset

Sets/Gets a vector of E3DBox that defines the regions that should not be compared. By default, no point of the reference is ignored.

◆ EdgeCroppingParameters

eVision.Easy3D.EEdgeCroppingParameters eVision.Easy3D.E3DComparer.EdgeCroppingParameters
getset

Gets/Sets the parameters driving the edge cropping.

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

◆ EnableAutomaticDecimation

bool eVision.Easy3D.E3DComparer.EnableAutomaticDecimation
getset

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

bool eVision.Easy3D.E3DComparer.EnableAutomaticEdgeCropping
getset

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 E3DComparer.ComparisonDistanceMode and EComparisonDistanceMode). To modify the parameters of the cropping, see E3DComparer.SetEdgeCroppingParameters.

Default: False

◆ MeshReference

eVision.Easy3D.EMesh eVision.Easy3D.E3DComparer.MeshReference
set

Sets the 3D reference model. See also E3DComparer.PointCloudReference.

◆ NoExtraMaterial

eVision.Easy3D.E3DBox [] eVision.Easy3D.E3DComparer.NoExtraMaterial
getset

Sets/Gets a vector of 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.EPointCloud eVision.Easy3D.E3DComparer.PointCloudReference
set

Sets the 3D reference model. See also E3DComparer.MeshReference.

◆ ROI

eVision.Easy3D.E3DBox [] eVision.Easy3D.E3DComparer.ROI
getset

Sets/Gets a vector of E3DBox that defines the regions that should be compared. By default, the entire reference is considered.