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

Aligns an EPointCloud or EZMap on a reference EMesh, EPointCloud or EZMap. More...

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

Public Member Functions

 E3DAligner ()
 Constructs a 3D Aligner.
 E3DAligner (eVision.Easy3D.E3DAligner other)
 Constructs a 3D Aligner.
virtual void Load (string path)
 Loads the E3DAligner. The given ESerializer must have been created for reading.
virtual void Load (eVision.ESerializer serializer)
 Loads the E3DAligner. The given ESerializer must have been created for reading.
virtual void Save (string path)
 Saves the E3DAligner. The given ESerializer must have been created for writing.
virtual void Save (eVision.ESerializer serializer)
 Saves the E3DAligner. The given ESerializer must have been created for writing.
void SetReference (eVision.Easy3D.EMesh mesh, 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.ScanReprojectionPlane, 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 (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.ScanReprojectionPlane, 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 (eVision.Easy3D.EMesh mesh, 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.ScanReprojectionPlane, 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 (eVision.Easy3D.EMesh mesh, float[] azimuths, 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.ScanReprojectionPlane, 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 (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.ScanReprojectionPlane, 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 (eVision.Easy3D.EPointCloud cloud, 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.ScanReprojectionPlane, 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 (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.ScanReprojectionPlane, 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 SetFlatScan (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 (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 (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 (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.ScanReprojectionPlane or E3DAligner.SetFlatScan.
bool IsReprojectionPlaneSet ()
 Returns whether a re-projection plane was set with E3DAligner.ScanReprojectionPlane or E3DAligner.SetFlatScan or not.
void RetrieveReferencePosesProjections (out eVision.Easy3D.EZMap8[] referencePosesProjections)
 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 (out eVision.Easy3D.E3DPlane[] referencePoses)
 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 (eVision.Easy3D.EZMap zmap)
 Aligns an EZMap or EPointCloud on the reference model.
eVision.Easy3D.E3DAlignment Align (eVision.Easy3D.EPointCloud cloud, eVision.Easy3D.E3DPlane projectionPlane)
 Aligns an EZMap or EPointCloud on the reference model.
eVision.Easy3D.E3DAlignment Align (eVision.Easy3D.EPointCloud cloud, float azimuth, float elevation)
 Aligns an EZMap or EPointCloud on the reference model.

Static Public Member Functions

static void compute3DPositionFrom2DAligning (eVision.Easy3D.EZMap8 refZMap, eVision.Easy3D.EZMap8 scanZmap, eVision.Easy3D.E3DTransformMatrix modelToScanTransform, float angle, eVision.EPoint modelCenter, eVision.EPoint scanCenter)
 computes transformation between the point clouds from the alignment on the ZMaps

Properties

eVision.Easy3D.E3DPlane ScanReprojectionPlane [get, set]
 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.

Detailed Description

Aligns an EPointCloud or EZMap on a reference EMesh, EPointCloud or EZMap.

License(s): Easy3DMatch

Constructor & Destructor Documentation

◆ E3DAligner() [1/2]

eVision.Easy3D.E3DAligner.E3DAligner ( )

Constructs a 3D Aligner.

◆ E3DAligner() [2/2]

eVision.Easy3D.E3DAligner.E3DAligner ( eVision.Easy3D.E3DAligner other)

Constructs a 3D Aligner.

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

Member Function Documentation

◆ Align() [1/3]

eVision.Easy3D.E3DAlignment eVision.Easy3D.E3DAligner.Align ( eVision.Easy3D.EPointCloud cloud,
eVision.Easy3D.E3DPlane projectionPlane )

Aligns an EZMap or EPointCloud on the reference model.

Parameters
cloudThe EPointCloud to align on the reference
projectionPlaneThe E3DPlane on which the cloud is orthographically projected.

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.

◆ Align() [2/3]

eVision.Easy3D.E3DAlignment eVision.Easy3D.E3DAligner.Align ( eVision.Easy3D.EPointCloud cloud,
float azimuth,
float elevation )

Aligns an EZMap or EPointCloud on the reference model.

Parameters
cloudThe EPointCloud to align on the reference
azimuthThe azimuth angle of the normal of the projection plane in Easy.AngleUnit. 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.AngleUnit. 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.

◆ Align() [3/3]

eVision.Easy3D.E3DAlignment eVision.Easy3D.E3DAligner.Align ( eVision.Easy3D.EZMap zmap)

Aligns an EZMap or EPointCloud on the reference model.

Parameters
zmapThe EZMap to align

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.

◆ ClearReprojectionPlane()

void eVision.Easy3D.E3DAligner.ClearReprojectionPlane ( )

Clears re-projection plane set with E3DAligner.ScanReprojectionPlane or E3DAligner.SetFlatScan.

◆ compute3DPositionFrom2DAligning()

void eVision.Easy3D.E3DAligner.compute3DPositionFrom2DAligning ( eVision.Easy3D.EZMap8 refZMap,
eVision.Easy3D.EZMap8 scanZmap,
eVision.Easy3D.E3DTransformMatrix modelToScanTransform,
float angle,
eVision.EPoint modelCenter,
eVision.EPoint scanCenter )
static

computes transformation between the point clouds from the alignment on the ZMaps

◆ IsReprojectionPlaneSet()

bool eVision.Easy3D.E3DAligner.IsReprojectionPlaneSet ( )

Returns whether a re-projection plane was set with E3DAligner.ScanReprojectionPlane or E3DAligner.SetFlatScan or not.

◆ Load() [1/2]

virtual void eVision.Easy3D.E3DAligner.Load ( eVision.ESerializer serializer)
virtual

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

Parameters
serializerThe serializer.

Reimplemented in eVision.Easy3D.E3DMatcher.

◆ Load() [2/2]

virtual void eVision.Easy3D.E3DAligner.Load ( string path)
virtual

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

Parameters
pathThe file path.

Reimplemented in eVision.Easy3D.E3DMatcher.

◆ RetrieveReferencePoses()

void eVision.Easy3D.E3DAligner.RetrieveReferencePoses ( out eVision.Easy3D.E3DPlane[] referencePoses)

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.

Parameters
referencePosesThe vector that will be filled with copies of the reference poses

◆ RetrieveReferencePosesProjections()

void eVision.Easy3D.E3DAligner.RetrieveReferencePosesProjections ( out eVision.Easy3D.EZMap8[] referencePosesProjections)

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.

Parameters
referencePosesProjectionsThe vector that will be filled with copies of the reference poses projections

◆ Save() [1/2]

virtual void eVision.Easy3D.E3DAligner.Save ( eVision.ESerializer serializer)
virtual

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

Parameters
serializerThe serializer.

Reimplemented in eVision.Easy3D.E3DMatcher.

◆ Save() [2/2]

virtual void eVision.Easy3D.E3DAligner.Save ( string path)
virtual

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

Parameters
pathThe file path.

Reimplemented in eVision.Easy3D.E3DMatcher.

◆ SetFlatScan() [1/4]

void eVision.Easy3D.E3DAligner.SetFlatScan ( 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.

Parameters
cloudThe EPointCloud representing a scan of the setup when no object lays on it.

When the sensor is not directly on top of the object, setting the plane improves the results, you can also give the plane coordinates directly, see E3DAligner.ScanReprojectionPlane. When the reference is a EMesh, the corresponding reference plane should match the re-projection plane.

◆ SetFlatScan() [2/4]

void eVision.Easy3D.E3DAligner.SetFlatScan ( 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.

Parameters
cloudThe EPointCloud representing a scan of the setup when no object lays on it.
objectAbovePlaneWhether the object to align lays above or below the plane of the scan. To project the object, we must not only know the plane but also if we must project the points above or below it. The object is said to lay above the plane, if, for a given (x, y), z(object) > z(plane).

Default: true

When the sensor is not directly on top of the object, setting the plane improves the results, you can also give the plane coordinates directly, see E3DAligner.ScanReprojectionPlane. When the reference is a EMesh, the corresponding reference plane should match the re-projection plane.

◆ SetFlatScan() [3/4]

void eVision.Easy3D.E3DAligner.SetFlatScan ( 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.

Parameters
scanThe EZMap representing a scan of the setup when no object lays on it.

When the sensor is not directly on top of the object, setting the plane improves the results, you can also give the plane coordinates directly, see E3DAligner.ScanReprojectionPlane. When the reference is a EMesh, the corresponding reference plane should match the re-projection plane.

◆ SetFlatScan() [4/4]

void eVision.Easy3D.E3DAligner.SetFlatScan ( 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.

Parameters
scanThe EZMap representing a scan of the setup when no object lays on it.
objectAbovePlaneWhether the object to align lays above or below the plane of the scan. To project the object, we must not only know the plane but also if we must project the points above or below it. The object is said to lay above the plane, if, for a given (x, y), z(object) > z(plane).

Default: true

When the sensor is not directly on top of the object, setting the plane improves the results, you can also give the plane coordinates directly, see E3DAligner.ScanReprojectionPlane. When the reference is a EMesh, the corresponding reference plane should match the re-projection plane.

◆ SetReference() [1/7]

void eVision.Easy3D.E3DAligner.SetReference ( eVision.Easy3D.EMesh mesh,
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.ScanReprojectionPlane, 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.

Parameters
meshThe EMesh object that represents the 3D reference model.
planeThe plane onto which the model is projected orthographically (all points below the plane are discarded).

◆ SetReference() [2/7]

void eVision.Easy3D.E3DAligner.SetReference ( eVision.Easy3D.EMesh mesh,
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.ScanReprojectionPlane, 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.

Parameters
meshThe EMesh object that represents the 3D reference model.
planesvector of planes

◆ SetReference() [3/7]

void eVision.Easy3D.E3DAligner.SetReference ( 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.ScanReprojectionPlane, 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.

Parameters
meshThe EMesh object that represents the 3D reference model.
azimuthThe azimuth angle of the normal of the reference plane in Easy.AngleUnit. 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 reference plane in Easy.AngleUnit. Elevation angles represent how close the normal is to the z = 0 plane.

◆ SetReference() [4/7]

void eVision.Easy3D.E3DAligner.SetReference ( eVision.Easy3D.EMesh mesh,
float[] azimuths,
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.ScanReprojectionPlane, 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.

Parameters
meshThe EMesh object that represents the 3D reference model.
azimuthsvector of azimuths
elevationsvector of elevations

◆ SetReference() [5/7]

void eVision.Easy3D.E3DAligner.SetReference ( eVision.Easy3D.EPointCloud cloud,
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.ScanReprojectionPlane, 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.

Parameters
cloudThe EPointCloud object that represents a reference golden scan. The scan should only contain the object to align (the plane on which the points lay should be removed).
planeThe plane onto which the model is projected orthographically (all points below the plane are discarded).

◆ SetReference() [6/7]

void eVision.Easy3D.E3DAligner.SetReference ( 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.ScanReprojectionPlane, 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.

Parameters
cloudThe EPointCloud object that represents a reference golden scan. The scan should only contain the object to align (the plane on which the points lay should be removed).
azimuthThe azimuth angle of the normal of the reference plane in Easy.AngleUnit. 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 reference plane in Easy.AngleUnit. Elevation angles represent how close the normal is to the z = 0 plane.

◆ SetReference() [7/7]

void eVision.Easy3D.E3DAligner.SetReference ( 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.ScanReprojectionPlane, 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.

Parameters
zmapThe EZMap object that represents a reference golden scan. The scan should only contain the object to align (the plane on which the points lay should be removed).

Property Documentation

◆ ScanReprojectionPlane

eVision.Easy3D.E3DPlane eVision.Easy3D.E3DAligner.ScanReprojectionPlane
getset

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.

When the sensor is not directly on top of the object, setting the re-projection plane will improve results, you can also give a flat scan on which the normal of the plane is identified automatically, see E3DAligner.SetFlatScan. When the reference is a EMesh, the corresponding reference plane should match the re-projection plane.