eVision C++ API 26.10.0-beta.2.dev
Loading...
Searching...
No Matches
eVision::Easy3D::E3DMatcher Class Reference

Aligns an EPointCloud or EZMap on and compares it with a reference EMesh, EPointCloud or EZMap. More...

#include <eVision/Easy3D/Easy3DMatch/E3DMatcher.h>

Inheritance diagram for eVision::Easy3D::E3DMatcher:
Collaboration diagram for eVision::Easy3D::E3DMatcher:

Public Member Functions

 E3DMatcher ()
 Constructs a 3D matching context.
 E3DMatcher (const eVision::Easy3D::E3DMatcher &other)
 Constructs a 3D matching context.
virtual ~E3DMatcher () throw ()
eVision::Easy3D::E3DMatcher & operator= (const eVision::Easy3D::E3DMatcher &other)
 Assignment operator.
virtual void Load (const std::string &path)
 Loads the E3DMatcher. The given ESerializer must have been created for reading.
virtual void Load (eVision::ESerializer *serializer)
 Loads the E3DMatcher. The given ESerializer must have been created for reading.
virtual void Save (const std::string &path)
 Saves the E3DMatcher. The given ESerializer must have been created for writing.
virtual void Save (eVision::ESerializer *serializer)
 Saves the E3DMatcher. The given ESerializer must have been created for writing.
eVision::Easy3D::E3DMatch Match (const eVision::Easy3D::EZMap &zmap)
 Matches the reference patterns against an EZMap or an EPointCloud.
eVision::Easy3D::E3DMatch Match (const eVision::Easy3D::EPointCloud &cloud, const eVision::Easy3D::E3DPlane &projectionPlane)
 Matches the reference patterns against an EZMap or an EPointCloud.
eVision::Easy3D::E3DMatch Match (const eVision::Easy3D::EPointCloud &cloud, float azimuth, float elevation)
 Matches the reference patterns against an EZMap or an EPointCloud.
void SetComparisonROI (const eVision::ERegion *regionOfInterest)
 Sets/Gets the ERegion of the reference that should be compared. See E3DAligner::RetrieveReferencePosesProjections. By default, all the points of the reference are used for the comparison.
eVision::ERegion GetComparisonROI (int offset) const
 Sets/Gets the ERegion of the reference that should be compared. See E3DAligner::RetrieveReferencePosesProjections. By default, all the points of the reference are used for the comparison.
void SetAllComparisonROI (const std::vector< const eVision::ERegion * > &regionsOfInterest)
 Sets/Gets the ERegion that should be compared for all of the references. A pointer to ERegion per reference pose is needed and they should be given in the corresponding order and should be of the same size than their corresponding reference poses projections. See E3DAligner::RetrieveReferencePosesProjections. By default, all the points of the reference are used for the comparison.
std::vector< eVision::ERegion > GetAllComparisonROI () const
 Sets/Gets the ERegion that should be compared for all of the references. A pointer to ERegion per reference pose is needed and they should be given in the corresponding order and should be of the same size than their corresponding reference poses projections. See E3DAligner::RetrieveReferencePosesProjections. By default, all the points of the reference are used for the comparison.
void ClearComparisonROI ()
 Clears the ERegion that should be compared for all of the references. See also E3DMatcher::SetAllComparisonROI and E3DMatcher::SetComparisonROI.
void SetComparisonNoExtraMaterial (const eVision::ERegion *noExtraMaterial)
 Sets/Gets the ERegion that should not have extra material in the scan. See E3DAligner::RetrieveReferencePosesProjections. By default, all the points of the reference are used for the comparison.
eVision::ERegion GetComparisonNoExtraMaterial (int offset) const
 Sets/Gets the ERegion that should not have extra material in the scan. See E3DAligner::RetrieveReferencePosesProjections. By default, all the points of the reference are used for the comparison.
void SetAllComparisonNoExtraMaterial (const std::vector< const eVision::ERegion * > &noExtraMaterial)
 Sets/Gets the ERegion that should not have extra material in the scan. A pointer to ERegion per reference pose is needed and they should be given in the corresponding order and should be of the same size than their corresponding reference poses projection. See E3DAligner::RetrieveReferencePosesProjections. By default, the points in the scan far from the reference are not considered as anomalies (except if there are missing points in the scan nearby).
std::vector< eVision::ERegion > GetAllComparisonNoExtraMaterial () const
 Sets/Gets the ERegion that should not have extra material in the scan. A pointer to ERegion per reference pose is needed and they should be given in the corresponding order and should be of the same size than their corresponding reference poses projection. See E3DAligner::RetrieveReferencePosesProjections. By default, the points in the scan far from the reference are not considered as anomalies (except if there are missing points in the scan nearby).
void ClearComparisonNoExtraMaterial ()
 Clears the ERegion that should not have extra material in the scan. See also E3DMatcher::SetAllComparisonNoExtraMaterial and E3DMatcher::SetComparisonNoExtraMaterial.
void SetComparisonDistanceMode (eVision::Easy3D::EComparisonDistanceMode mode)
 Sets/Gets the distance mode for the 3D comparison.
eVision::Easy3D::EComparisonDistanceMode GetComparisonDistanceMode () const
 Sets/Gets the distance mode for the 3D comparison.
void SetEnableMissingPointAsAnomaly (bool state)
 If True, the points that are not present in the scan (but are present in the reference), are considered as anomalies. If False, only points that are present in the scan can be considered as anomalies.
bool GetEnableMissingPointAsAnomaly () const
 If True, the points that are not present in the scan (but are present in the reference), are considered as anomalies. If False, only points that are present in the scan can be considered as anomalies.
void SetEnableAutomaticDecimation (bool state)
 If True, the given cloud or ZMap is automatically decimated with a resolution depending on the distance threshold to speed-up processing. If False, all the points of the given cloud or ZMap are used to compute the distance.
bool GetEnableAutomaticDecimation () const
 If True, the given cloud or ZMap is automatically decimated with a resolution depending on the distance threshold to speed-up processing. If False, all the points of the given cloud or ZMap are used to compute the distance.
void SetAutomaticCropFactor (float factor)
 Sets/Gets the automatic cropping factor. The factor multiplies the anomaly distance threshold (E3DMatcher::SetAnomalyThresholds) to obtain the margin for the cropping. If the value is smaller than 0, then no crop is performed before computing the distance.
float GetAutomaticCropFactor () const
 Sets/Gets the automatic cropping factor. The factor multiplies the anomaly distance threshold (E3DMatcher::SetAnomalyThresholds) to obtain the margin for the cropping. If the value is smaller than 0, then no crop is performed before computing the distance.
void PrepareReference ()
 Prepare the reference internal structures. By default, this is done on the first call to E3DMatcher::Match.
void GetComparisonPointCloud (eVision::Easy3D::EPointCloud &comparisonCloud, bool storeDistances, bool storeColors, bool pointFromReference, bool fullModel) const
 Gets the EPointCloud on which anomalies are detected.
void GetComparisonPointCloud (eVision::Easy3D::EPointCloud &comparisonCloud, bool storeDistances, bool storeColors, bool pointFromReference) const
 Gets the EPointCloud on which anomalies are detected.
void GetComparisonPointCloud (eVision::Easy3D::EPointCloud &comparisonCloud, bool storeDistances, bool storeColors) const
 Gets the EPointCloud on which anomalies are detected.
void GetComparisonPointCloud (eVision::Easy3D::EPointCloud &comparisonCloud, bool storeDistances) const
 Gets the EPointCloud on which anomalies are detected.
void GetComparisonPointCloud (eVision::Easy3D::EPointCloud &comparisonCloud) const
 Gets the EPointCloud on which anomalies are detected.
void SetAnomalyThresholds (eVision::Easy3D::EAnomalyThresholds thesholds)
 Gets/Sets the thresholds related to the anomalies detection.
eVision::Easy3D::EAnomalyThresholds GetAnomalyThresholds () const
 Gets/Sets the thresholds related to the anomalies detection.
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 (float &distanceThreshold, float &areaThreshold) const
 Gets the thresholds related to the anomalies detection.
void SetAnomalyHysteresis (eVision::Easy3D::EAnomalyThresholds hysteresisThesholds)
 Gets/Sets the hysteresis related to the anomalies detection.
eVision::Easy3D::EAnomalyThresholds GetAnomalyHysteresis () const
 Gets/Sets the hysteresis related to the anomalies detection.
void SetAnomalyHysteresis (float distanceHysteresisThreshold, float areaHysteresisThreshold)
 Sets the hysteresis related to the anomalies detection.
void GetAnomalyHysteresis (float &distanceHysteresisThreshold, float &areaHysteresisThreshold) const
 Gets the hysteresis related to the anomalies detection.
void SetEdgeCroppingParameters (eVision::Easy3D::EEdgeCroppingParameters parameters)
 Gets/Sets the parameters driving the edge cropping.
eVision::Easy3D::EEdgeCroppingParameters GetEdgeCroppingParameters () const
 Gets/Sets the parameters driving the edge cropping.
void SetEdgeCroppingParameters (uint32_t numberNeighbors, float curvatureThreshold)
 Sets the parameters driving the edge cropping.
void GetEdgeCroppingParameters (uint32_t &numberNeighbors, float &curvatureThreshold) const
 Gets the parameters driving the edge cropping.
void SetEnableAutomaticEdgeCropping (bool state)
 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 E3DMatcher::SetComparisonDistanceMode and EComparisonDistanceMode). To modify the parameters of the cropping, see E3DMatcher::SetEdgeCroppingParameters.
bool GetEnableAutomaticEdgeCropping () const
 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 E3DMatcher::SetComparisonDistanceMode and EComparisonDistanceMode). To modify the parameters of the cropping, see E3DMatcher::SetEdgeCroppingParameters.
 E3DMatcher (CppWrapperInternal::InternalConstructor)
Public Member Functions inherited from eVision::Easy3D::E3DAligner
 E3DAligner ()
 Constructs a 3D Aligner.
 E3DAligner (const eVision::Easy3D::E3DAligner &other)
 Constructs a 3D Aligner.
virtual ~E3DAligner () throw ()
eVision::Easy3D::E3DAligner & operator= (const eVision::Easy3D::E3DAligner &other)
 Assignment operator.
void SetReference (const eVision::Easy3D::EMesh &mesh, const eVision::Easy3D::E3DPlane &plane)
 Sets the 3D reference model that is used to create reference patterns. It may be a CAD of the object as an EMesh with reference plane(s) on which they must be projected to roughly correspond to the face visible in the scans. In that case, when a scan re-projection plane is set (E3DAligner::SetScanReprojectionPlane, E3DAligner::SetFlatScan), the reference plane(s) set by this method should correspond to the scan's re-projection plane. It may also be a golden scan represented by an EZMap or an EPointCloud with reference plane indicating on which direction it must be projected.
void SetReference (const eVision::Easy3D::EMesh &mesh, float azimuth, float elevation)
 Sets the 3D reference model that is used to create reference patterns. It may be a CAD of the object as an EMesh with reference plane(s) on which they must be projected to roughly correspond to the face visible in the scans. In that case, when a scan re-projection plane is set (E3DAligner::SetScanReprojectionPlane, E3DAligner::SetFlatScan), the reference plane(s) set by this method should correspond to the scan's re-projection plane. It may also be a golden scan represented by an EZMap or an EPointCloud with reference plane indicating on which direction it must be projected.
void SetReference (const eVision::Easy3D::EMesh &mesh, const std::vector< eVision::Easy3D::E3DPlane > &planes)
 Sets the 3D reference model that is used to create reference patterns. It may be a CAD of the object as an EMesh with reference plane(s) on which they must be projected to roughly correspond to the face visible in the scans. In that case, when a scan re-projection plane is set (E3DAligner::SetScanReprojectionPlane, E3DAligner::SetFlatScan), the reference plane(s) set by this method should correspond to the scan's re-projection plane. It may also be a golden scan represented by an EZMap or an EPointCloud with reference plane indicating on which direction it must be projected.
void SetReference (const eVision::Easy3D::EMesh &mesh, const std::vector< float > &azimuths, const std::vector< float > &elevations)
 Sets the 3D reference model that is used to create reference patterns. It may be a CAD of the object as an EMesh with reference plane(s) on which they must be projected to roughly correspond to the face visible in the scans. In that case, when a scan re-projection plane is set (E3DAligner::SetScanReprojectionPlane, E3DAligner::SetFlatScan), the reference plane(s) set by this method should correspond to the scan's re-projection plane. It may also be a golden scan represented by an EZMap or an EPointCloud with reference plane indicating on which direction it must be projected.
void SetReference (const eVision::Easy3D::EZMap &zmap)
 Sets the 3D reference model that is used to create reference patterns. It may be a CAD of the object as an EMesh with reference plane(s) on which they must be projected to roughly correspond to the face visible in the scans. In that case, when a scan re-projection plane is set (E3DAligner::SetScanReprojectionPlane, E3DAligner::SetFlatScan), the reference plane(s) set by this method should correspond to the scan's re-projection plane. It may also be a golden scan represented by an EZMap or an EPointCloud with reference plane indicating on which direction it must be projected.
void SetReference (const eVision::Easy3D::EPointCloud &cloud, const eVision::Easy3D::E3DPlane &plane)
 Sets the 3D reference model that is used to create reference patterns. It may be a CAD of the object as an EMesh with reference plane(s) on which they must be projected to roughly correspond to the face visible in the scans. In that case, when a scan re-projection plane is set (E3DAligner::SetScanReprojectionPlane, E3DAligner::SetFlatScan), the reference plane(s) set by this method should correspond to the scan's re-projection plane. It may also be a golden scan represented by an EZMap or an EPointCloud with reference plane indicating on which direction it must be projected.
void SetReference (const eVision::Easy3D::EPointCloud &cloud, float azimuth, float elevation)
 Sets the 3D reference model that is used to create reference patterns. It may be a CAD of the object as an EMesh with reference plane(s) on which they must be projected to roughly correspond to the face visible in the scans. In that case, when a scan re-projection plane is set (E3DAligner::SetScanReprojectionPlane, E3DAligner::SetFlatScan), the reference plane(s) set by this method should correspond to the scan's re-projection plane. It may also be a golden scan represented by an EZMap or an EPointCloud with reference plane indicating on which direction it must be projected.
void SetScanReprojectionPlane (const eVision::Easy3D::E3DPlane &plane)
 Sets/Gets the plane on which the model lays. This is used to re-project the scans before trying to find the position of the object within them. The E3DPlane should lay slightly below/above (depending on the orientation of the normal) the real plane, so that all points of the real plane are reprojected in the new ZMap.
eVision::Easy3D::E3DPlane GetScanReprojectionPlane () const
 Sets/Gets the plane on which the model lays. This is used to re-project the scans before trying to find the position of the object within them. The E3DPlane should lay slightly below/above (depending on the orientation of the normal) the real plane, so that all points of the real plane are reprojected in the new ZMap.
void SetFlatScan (const eVision::Easy3D::EZMap &scan)
 Uses a flat scan of the setup to compute the plane on which the object lays. This helps computing alignment when the sensor does not lay on top of the objects.
void SetFlatScan (const eVision::Easy3D::EZMap &scan, bool objectAbovePlane)
 Uses a flat scan of the setup to compute the plane on which the object lays. This helps computing alignment when the sensor does not lay on top of the objects.
void SetFlatScan (const eVision::Easy3D::EPointCloud &cloud)
 Uses a flat scan of the setup to compute the plane on which the object lays. This helps computing alignment when the sensor does not lay on top of the objects.
void SetFlatScan (const eVision::Easy3D::EPointCloud &cloud, bool objectAbovePlane)
 Uses a flat scan of the setup to compute the plane on which the object lays. This helps computing alignment when the sensor does not lay on top of the objects.
void ClearReprojectionPlane ()
 Clears re-projection plane set with E3DAligner::SetScanReprojectionPlane or E3DAligner::SetFlatScan.
bool IsReprojectionPlaneSet () const
 Returns whether a re-projection plane was set with E3DAligner::SetScanReprojectionPlane or E3DAligner::SetFlatScan or not.
void RetrieveReferencePosesProjections (std::vector< eVision::Easy3D::EZMap8 > &referencePosesProjections) const
 Retrieves the reference patterns of the E3DAligner in the form of a vector of EZMap8. The corresponding reference poses vector can be retrieved with E3DAligner::RetrieveReferencePoses.
void RetrieveReferencePoses (std::vector< eVision::Easy3D::E3DPlane > &referencePoses) const
 Retrieves the reference poses of the E3DAligner in the form of a vector of E3DPlane. The corresponding reference patterns vector can be retrieved with E3DAligner::RetrieveReferencePosesProjections.
eVision::Easy3D::E3DAlignment Align (const eVision::Easy3D::EZMap &zmap) const
 Aligns an EZMap or EPointCloud on the reference model.
eVision::Easy3D::E3DAlignment Align (const eVision::Easy3D::EPointCloud &cloud, const eVision::Easy3D::E3DPlane &projectionPlane) const
 Aligns an EZMap or EPointCloud on the reference model.
eVision::Easy3D::E3DAlignment Align (const eVision::Easy3D::EPointCloud &cloud, float azimuth, float elevation) const
 Aligns an EZMap or EPointCloud on the reference model.
 E3DAligner (CppWrapperInternal::InternalConstructor)

Additional Inherited Members

Static Public Member Functions inherited from eVision::Easy3D::E3DAligner
static void compute3DPositionFrom2DAligning (const eVision::Easy3D::EZMap8 &refZMap, const eVision::Easy3D::EZMap8 &scanZmap, eVision::Easy3D::E3DTransformMatrix &modelToScanTransform, float angle, const eVision::EPoint &modelCenter, const eVision::EPoint &scanCenter)
 computes transformation between the point clouds from the alignment on the ZMaps
Public Attributes inherited from eVision::Easy3D::E3DAligner
CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

Aligns an EPointCloud or EZMap on and compares it with a reference EMesh, EPointCloud or EZMap.

License(s): Easy3DMatch

Constructor & Destructor Documentation

◆ E3DMatcher() [1/3]

eVision::Easy3D::E3DMatcher::E3DMatcher ( )

Constructs a 3D matching context.

◆ E3DMatcher() [2/3]

eVision::Easy3D::E3DMatcher::E3DMatcher ( const eVision::Easy3D::E3DMatcher & other)

Constructs a 3D matching context.

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

◆ ~E3DMatcher()

eVision::Easy3D::E3DMatcher::~E3DMatcher ( )
throw ( )
virtual

◆ E3DMatcher() [3/3]

eVision::Easy3D::E3DMatcher::E3DMatcher ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ ClearComparisonNoExtraMaterial()

void eVision::Easy3D::E3DMatcher::ClearComparisonNoExtraMaterial ( )

Clears the ERegion that should not have extra material in the scan. See also E3DMatcher::SetAllComparisonNoExtraMaterial and E3DMatcher::SetComparisonNoExtraMaterial.

◆ ClearComparisonROI()

void eVision::Easy3D::E3DMatcher::ClearComparisonROI ( )

Clears the ERegion that should be compared for all of the references. See also E3DMatcher::SetAllComparisonROI and E3DMatcher::SetComparisonROI.

◆ GetAllComparisonNoExtraMaterial()

std::vector< eVision::ERegion > eVision::Easy3D::E3DMatcher::GetAllComparisonNoExtraMaterial ( ) const

Sets/Gets the ERegion that should not have extra material in the scan. A pointer to ERegion per reference pose is needed and they should be given in the corresponding order and should be of the same size than their corresponding reference poses projection. See E3DAligner::RetrieveReferencePosesProjections. By default, the points in the scan far from the reference are not considered as anomalies (except if there are missing points in the scan nearby).

◆ GetAllComparisonROI()

std::vector< eVision::ERegion > eVision::Easy3D::E3DMatcher::GetAllComparisonROI ( ) const

Sets/Gets the ERegion that should be compared for all of the references. A pointer to ERegion per reference pose is needed and they should be given in the corresponding order and should be of the same size than their corresponding reference poses projections. See E3DAligner::RetrieveReferencePosesProjections. By default, all the points of the reference are used for the comparison.

◆ GetAnomalyHysteresis() [1/2]

eVision::Easy3D::EAnomalyThresholds eVision::Easy3D::E3DMatcher::GetAnomalyHysteresis ( ) const

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 E3DMatcher::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 E3DMatcher::SetAnomalyThresholds.

◆ GetAnomalyHysteresis() [2/2]

void eVision::Easy3D::E3DMatcher::GetAnomalyHysteresis ( float & distanceHysteresisThreshold,
float & areaHysteresisThreshold ) const

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 E3DMatcher::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 E3DMatcher::SetAnomalyThresholds.

Deprecated

Use E3DMatcher::SetAnomalyHysteresis instead.

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

◆ GetAnomalyThresholds() [1/2]

eVision::Easy3D::EAnomalyThresholds eVision::Easy3D::E3DMatcher::GetAnomalyThresholds ( ) const

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 E3DMatcher::SetAnomalyHysteresis to more advanced anomaly detection.

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

◆ GetAnomalyThresholds() [2/2]

void eVision::Easy3D::E3DMatcher::GetAnomalyThresholds ( float & distanceThreshold,
float & areaThreshold ) const

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 E3DMatcher::SetAnomalyHysteresis to more advanced anomaly detection.

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

Deprecated

Use E3DMatcher::SetAnomalyThresholds instead.

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

◆ GetAutomaticCropFactor()

float eVision::Easy3D::E3DMatcher::GetAutomaticCropFactor ( ) const

Sets/Gets the automatic cropping factor. The factor multiplies the anomaly distance threshold (E3DMatcher::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 E3DMatcher::GetComparisonPointCloud and the parameter pointFromReference = False). Moreover, if the E3DMatcher::SetEnableMissingPointAsAnomaly is set to False, the anomalies will not be detected.

◆ GetComparisonDistanceMode()

eVision::Easy3D::EComparisonDistanceMode eVision::Easy3D::E3DMatcher::GetComparisonDistanceMode ( ) const

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

Default: EComparisonDistanceMode::EComparisonDistanceMode_Euclidean.

◆ GetComparisonNoExtraMaterial()

eVision::ERegion eVision::Easy3D::E3DMatcher::GetComparisonNoExtraMaterial ( int offset) const

Sets/Gets the ERegion that should not have extra material in the scan. See E3DAligner::RetrieveReferencePosesProjections. By default, all the points of the reference are used for the comparison.

Parameters
offsetoffset of the ERegion to get back.

This method is a shortcut of E3DMatcher::SetAllComparisonNoExtraMaterial when you only want to set/get one reference pose.

◆ GetComparisonPointCloud() [1/5]

void eVision::Easy3D::E3DMatcher::GetComparisonPointCloud ( eVision::Easy3D::EPointCloud & comparisonCloud) const

Gets the EPointCloud on which anomalies are detected.

Parameters
comparisonCloudThe EPointCloud in which to copy the data.

◆ GetComparisonPointCloud() [2/5]

void eVision::Easy3D::E3DMatcher::GetComparisonPointCloud ( eVision::Easy3D::EPointCloud & comparisonCloud,
bool storeDistances ) const

Gets the EPointCloud on which anomalies are detected.

Parameters
comparisonCloudThe EPointCloud in which to copy the data.
storeDistancesIf set to True, the distances computed will be stored in the EPointCloud.

Default: True

◆ GetComparisonPointCloud() [3/5]

void eVision::Easy3D::E3DMatcher::GetComparisonPointCloud ( eVision::Easy3D::EPointCloud & comparisonCloud,
bool storeDistances,
bool storeColors ) const

Gets the EPointCloud on which anomalies are detected.

Parameters
comparisonCloudThe EPointCloud in which to copy the data.
storeDistancesIf set to True, the distances computed will be stored in the EPointCloud.

Default: True

Parameters
storeColorsIf set to True, the colors related to the distances computed will be stored in the EPointCloud.

Default: True

◆ GetComparisonPointCloud() [4/5]

void eVision::Easy3D::E3DMatcher::GetComparisonPointCloud ( eVision::Easy3D::EPointCloud & comparisonCloud,
bool storeDistances,
bool storeColors,
bool pointFromReference ) const

Gets the EPointCloud on which anomalies are detected.

Parameters
comparisonCloudThe EPointCloud in which to copy the data.
storeDistancesIf set to True, the distances computed will be stored in the EPointCloud.

Default: True

Parameters
storeColorsIf set to True, the colors related to the distances computed will be stored in the EPointCloud.

Default: True

Parameters
pointFromReferenceIf set to True, the points from the reference will be stored in comparisonCloud. Otherwise, it will be the points from the scan. If E3DMatcher::SetComparisonDistanceMode is set to EComparisonDistanceMode::EComparisonDistanceMode_Normals_Advanced, result always contains points from the scan.

Default: False

◆ GetComparisonPointCloud() [5/5]

void eVision::Easy3D::E3DMatcher::GetComparisonPointCloud ( eVision::Easy3D::EPointCloud & comparisonCloud,
bool storeDistances,
bool storeColors,
bool pointFromReference,
bool fullModel ) const

Gets the EPointCloud on which anomalies are detected.

Parameters
comparisonCloudThe EPointCloud in which to copy the data.
storeDistancesIf set to True, the distances computed will be stored in the EPointCloud.

Default: True

Parameters
storeColorsIf set to True, the colors related to the distances computed will be stored in the EPointCloud.

Default: True

Parameters
pointFromReferenceIf set to True, the points from the reference will be stored in comparisonCloud. Otherwise, it will be the points from the scan. If E3DMatcher::SetComparisonDistanceMode is set to EComparisonDistanceMode::EComparisonDistanceMode_Normals_Advanced, result always contains points from the scan.

Default: False

Parameters
fullModelIf set to True, the points that are not inside the ROI will also be in the EPointCloud. Default: False

◆ GetComparisonROI()

eVision::ERegion eVision::Easy3D::E3DMatcher::GetComparisonROI ( int offset) const

Sets/Gets the ERegion of the reference that should be compared. See E3DAligner::RetrieveReferencePosesProjections. By default, all the points of the reference are used for the comparison.

Parameters
offsetoffset of the ERegion to get back.

This method is a shortcut of E3DMatcher::SetAllComparisonROI when you only want to set/get one reference pose.

◆ GetEdgeCroppingParameters() [1/2]

eVision::Easy3D::EEdgeCroppingParameters eVision::Easy3D::E3DMatcher::GetEdgeCroppingParameters ( ) const

Gets/Sets the parameters driving the edge cropping.

Edge cropping is disabled by default, enable it using E3DMatcher::SetEnableAutomaticEdgeCropping.

◆ GetEdgeCroppingParameters() [2/2]

void eVision::Easy3D::E3DMatcher::GetEdgeCroppingParameters ( uint32_t & numberNeighbors,
float & curvatureThreshold ) const

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 E3DMatcher::SetEnableAutomaticEdgeCropping.

Deprecated

Use E3DMatcher::SetEdgeCroppingParameters instead.

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

◆ GetEnableAutomaticDecimation()

bool eVision::Easy3D::E3DMatcher::GetEnableAutomaticDecimation ( ) const

If True, the given cloud or ZMap is automatically decimated with a resolution depending on the distance threshold to speed-up processing. If False, all the points of the given cloud or ZMap are used to compute the distance.

Default: True

◆ GetEnableAutomaticEdgeCropping()

bool eVision::Easy3D::E3DMatcher::GetEnableAutomaticEdgeCropping ( ) const

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

Default: False

◆ GetEnableMissingPointAsAnomaly()

bool eVision::Easy3D::E3DMatcher::GetEnableMissingPointAsAnomaly ( ) const

If True, the points that are not present in the scan (but are present in the reference), are considered as anomalies. If False, only points that are present in the scan can be considered as anomalies.

Default: True

Setting the value to False can be interesting when for example there are different shadow effects on the reference and on the scan or if there are illumination issues in the scan.

◆ Load() [1/2]

void eVision::Easy3D::E3DMatcher::Load ( const std::string & path)
virtual

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

Parameters
pathThe file path.

Reimplemented from eVision::Easy3D::E3DAligner.

◆ Load() [2/2]

void eVision::Easy3D::E3DMatcher::Load ( eVision::ESerializer * serializer)
virtual

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

Parameters
serializerThe serializer.

Reimplemented from eVision::Easy3D::E3DAligner.

◆ Match() [1/3]

eVision::Easy3D::E3DMatch eVision::Easy3D::E3DMatcher::Match ( const eVision::Easy3D::EPointCloud & cloud,
const eVision::Easy3D::E3DPlane & projectionPlane )

Matches the reference patterns against an EZMap or an EPointCloud.

Parameters
cloudThe EPointCloud that will be aligned and compared with the reference.
projectionPlaneThe plane on which the cloud is orthographically projected for alignment.

When specifying azimuth and elevation, only the normal of the projection plane is specified. The distance from origin of the E3DPlane will be computed from the points cloud, so that all points of the cloud are visible. This might not be wanted if there are points in the cloud that are useless for the process (e.g. if we see other objects far below the model). This is also a bit slower as the plane's distance is recomputed on each scan.

◆ Match() [2/3]

eVision::Easy3D::E3DMatch eVision::Easy3D::E3DMatcher::Match ( const eVision::Easy3D::EPointCloud & cloud,
float azimuth,
float elevation )

Matches the reference patterns against an EZMap or an EPointCloud.

Parameters
cloudThe EPointCloud that will be aligned and compared with the reference.
azimuthThe azimuth angle of the normal of the projection plane in Easy::SetAngleUnit. Azimuth angles are oriented trigonometrically around the z axis. The x axis corresponds to an azimuth of 0 degrees.
elevationThe elevation angle of the normal of the projection plane in Easy::SetAngleUnit. Elevation angles represent how close the normal is to the z = 0 plane.

When specifying azimuth and elevation, only the normal of the projection plane is specified. The distance from origin of the E3DPlane will be computed from the points cloud, so that all points of the cloud are visible. This might not be wanted if there are points in the cloud that are useless for the process (e.g. if we see other objects far below the model). This is also a bit slower as the plane's distance is recomputed on each scan.

◆ Match() [3/3]

eVision::Easy3D::E3DMatch eVision::Easy3D::E3DMatcher::Match ( const eVision::Easy3D::EZMap & zmap)

Matches the reference patterns against an EZMap or an EPointCloud.

Parameters
zmapThe EZMap that will be aligned and compared with the reference.

When specifying azimuth and elevation, only the normal of the projection plane is specified. The distance from origin of the E3DPlane will be computed from the points cloud, so that all points of the cloud are visible. This might not be wanted if there are points in the cloud that are useless for the process (e.g. if we see other objects far below the model). This is also a bit slower as the plane's distance is recomputed on each scan.

◆ operator=()

eVision::Easy3D::E3DMatcher & eVision::Easy3D::E3DMatcher::operator= ( const eVision::Easy3D::E3DMatcher & other)

Assignment operator.

Parameters
otherThe E3DMatcher object that should be copied.

◆ PrepareReference()

void eVision::Easy3D::E3DMatcher::PrepareReference ( )

Prepare the reference internal structures. By default, this is done on the first call to E3DMatcher::Match.

◆ ResetAnomalyThresholds()

void eVision::Easy3D::E3DMatcher::ResetAnomalyThresholds ( )

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

◆ Save() [1/2]

void eVision::Easy3D::E3DMatcher::Save ( const std::string & path)
virtual

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

Parameters
pathThe file path.

Reimplemented from eVision::Easy3D::E3DAligner.

◆ Save() [2/2]

void eVision::Easy3D::E3DMatcher::Save ( eVision::ESerializer * serializer)
virtual

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

Parameters
serializerThe serializer.

Reimplemented from eVision::Easy3D::E3DAligner.

◆ SetAllComparisonNoExtraMaterial()

void eVision::Easy3D::E3DMatcher::SetAllComparisonNoExtraMaterial ( const std::vector< const eVision::ERegion * > & noExtraMaterial)

Sets/Gets the ERegion that should not have extra material in the scan. A pointer to ERegion per reference pose is needed and they should be given in the corresponding order and should be of the same size than their corresponding reference poses projection. See E3DAligner::RetrieveReferencePosesProjections. By default, the points in the scan far from the reference are not considered as anomalies (except if there are missing points in the scan nearby).

Parameters
noExtraMaterialvector of ERegion defining the areas on which we will check no data is missing in the scan with every reference pose.

◆ SetAllComparisonROI()

void eVision::Easy3D::E3DMatcher::SetAllComparisonROI ( const std::vector< const eVision::ERegion * > & regionsOfInterest)

Sets/Gets the ERegion that should be compared for all of the references. A pointer to ERegion per reference pose is needed and they should be given in the corresponding order and should be of the same size than their corresponding reference poses projections. See E3DAligner::RetrieveReferencePosesProjections. By default, all the points of the reference are used for the comparison.

Parameters
regionsOfInterestvector of ERegion defining the areas that will be used for comparison with every reference pose.

◆ SetAnomalyHysteresis() [1/2]

void eVision::Easy3D::E3DMatcher::SetAnomalyHysteresis ( eVision::Easy3D::EAnomalyThresholds hysteresisThesholds)

Gets/Sets the hysteresis related to the anomalies detection.

Parameters
hysteresisThesholdsThe distance and area hysteresis thresholds. Distance threshold must be greater than or equal to 1 and defaults to 1. Area threshold must be smaller than or equal to 1 and defaults to 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 E3DMatcher::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 E3DMatcher::SetAnomalyThresholds.

◆ SetAnomalyHysteresis() [2/2]

void eVision::Easy3D::E3DMatcher::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 E3DMatcher::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 E3DMatcher::SetAnomalyThresholds.

Deprecated

Use E3DMatcher::SetAnomalyHysteresis instead.

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

◆ SetAnomalyThresholds() [1/2]

void eVision::Easy3D::E3DMatcher::SetAnomalyThresholds ( eVision::Easy3D::EAnomalyThresholds thesholds)

Gets/Sets the thresholds related to the anomalies detection.

Parameters
thesholdsThe distance and area thresholds. Both 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 E3DMatcher::SetAnomalyHysteresis to more advanced anomaly detection.

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

◆ SetAnomalyThresholds() [2/2]

void eVision::Easy3D::E3DMatcher::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 E3DMatcher::SetAnomalyHysteresis to more advanced anomaly detection.

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

Deprecated

Use E3DMatcher::SetAnomalyThresholds instead.

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

◆ SetAutomaticCropFactor()

void eVision::Easy3D::E3DMatcher::SetAutomaticCropFactor ( float factor)

Sets/Gets the automatic cropping factor. The factor multiplies the anomaly distance threshold (E3DMatcher::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 E3DMatcher::GetComparisonPointCloud and the parameter pointFromReference = False). Moreover, if the E3DMatcher::SetEnableMissingPointAsAnomaly is set to False, the anomalies will not be detected.

◆ SetComparisonDistanceMode()

void eVision::Easy3D::E3DMatcher::SetComparisonDistanceMode ( eVision::Easy3D::EComparisonDistanceMode mode)

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

Default: EComparisonDistanceMode::EComparisonDistanceMode_Euclidean.

◆ SetComparisonNoExtraMaterial()

void eVision::Easy3D::E3DMatcher::SetComparisonNoExtraMaterial ( const eVision::ERegion * noExtraMaterial)

Sets/Gets the ERegion that should not have extra material in the scan. See E3DAligner::RetrieveReferencePosesProjections. By default, all the points of the reference are used for the comparison.

Parameters
noExtraMaterialA pointer to ERegion defining the area on which we will check no data is missing in the scan. This param is a shortcut to avoid building a vector of size 1.

This method is a shortcut of E3DMatcher::SetAllComparisonNoExtraMaterial when you only want to set/get one reference pose.

◆ SetComparisonROI()

void eVision::Easy3D::E3DMatcher::SetComparisonROI ( const eVision::ERegion * regionOfInterest)

Sets/Gets the ERegion of the reference that should be compared. See E3DAligner::RetrieveReferencePosesProjections. By default, all the points of the reference are used for the comparison.

Parameters
regionOfInterestA pointer to ERegion defining the area that will be used for comparison with the reference pose. This param is a shortcut to avoid building a vector of size 1.

This method is a shortcut of E3DMatcher::SetAllComparisonROI when you only want to set/get one reference pose.

◆ SetEdgeCroppingParameters() [1/2]

void eVision::Easy3D::E3DMatcher::SetEdgeCroppingParameters ( eVision::Easy3D::EEdgeCroppingParameters parameters)

Gets/Sets the parameters driving the edge cropping.

Parameters
parametersThe number of neighbors that we will use to compute the local curvature and a threshold on that curvature. The bigger the number of neighbors, the thicker the cropping will be. This number must be bigger than 10 and defaults to 100. A point whose curvature is above the threshold is cropped. The threshold must be between 0 and 1 and defaults to 0.15

Edge cropping is disabled by default, enable it using E3DMatcher::SetEnableAutomaticEdgeCropping.

◆ SetEdgeCroppingParameters() [2/2]

void eVision::Easy3D::E3DMatcher::SetEdgeCroppingParameters ( uint32_t 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 E3DMatcher::SetEnableAutomaticEdgeCropping.

Deprecated

Use E3DMatcher::SetEdgeCroppingParameters instead.

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

◆ SetEnableAutomaticDecimation()

void eVision::Easy3D::E3DMatcher::SetEnableAutomaticDecimation ( bool state)

If True, the given cloud or ZMap is automatically decimated with a resolution depending on the distance threshold to speed-up processing. If False, all the points of the given cloud or ZMap are used to compute the distance.

Default: True

◆ SetEnableAutomaticEdgeCropping()

void eVision::Easy3D::E3DMatcher::SetEnableAutomaticEdgeCropping ( bool state)

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

Default: False

◆ SetEnableMissingPointAsAnomaly()

void eVision::Easy3D::E3DMatcher::SetEnableMissingPointAsAnomaly ( bool state)

If True, the points that are not present in the scan (but are present in the reference), are considered as anomalies. If False, only points that are present in the scan can be considered as anomalies.

Default: True

Setting the value to False can be interesting when for example there are different shadow effects on the reference and on the scan or if there are illumination issues in the scan.