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

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

Inheritance diagram for eVision.Easy3D.E3DAligner:

Public Member Functions

None __init__ (self)
 Constructs a 3D Aligner.
None __init__ (self, eVision.Easy3D.E3DAligner other)
 Constructs a 3D Aligner.
None Load (self, str path)
 Loads the eVision.Easy3D.E3DAligner.
None Load (self, eVision.ESerializer|None serializer)
 Loads the eVision.Easy3D.E3DAligner.
None Save (self, str path)
 Saves the eVision.Easy3D.E3DAligner.
None Save (self, eVision.ESerializer|None serializer)
 Saves the eVision.Easy3D.E3DAligner.
None SetReference (self, eVision.Easy3D.EMesh mesh, eVision.Easy3D.E3DPlane plane)
 Sets the 3D reference model that is used to create reference patterns.
None SetReference (self, eVision.Easy3D.EMesh mesh, float azimuth, float elevation)
 Sets the 3D reference model that is used to create reference patterns.
None SetReference (self, eVision.Easy3D.EMesh mesh, list[eVision._eVision.Easy3D.E3DPlane] planes)
 Sets the 3D reference model that is used to create reference patterns.
None SetReference (self, eVision.Easy3D.EMesh mesh, list[float] azimuths, list[float] elevations)
 Sets the 3D reference model that is used to create reference patterns.
None SetReference (self, eVision.Easy3D.EZMap zmap)
 Sets the 3D reference model that is used to create reference patterns.
None SetReference (self, eVision.Easy3D.EPointCloud cloud, eVision.Easy3D.E3DPlane plane)
 Sets the 3D reference model that is used to create reference patterns.
None SetReference (self, eVision.Easy3D.EPointCloud cloud, float azimuth, float elevation)
 Sets the 3D reference model that is used to create reference patterns.
None SetFlatScan (self, eVision.Easy3D.EZMap scan)
 Uses a flat scan of the setup to compute the plane on which the object lays.
None SetFlatScan (self, eVision.Easy3D.EZMap scan, bool objectAbovePlane)
 Uses a flat scan of the setup to compute the plane on which the object lays.
None SetFlatScan (self, eVision.Easy3D.EPointCloud cloud)
 Uses a flat scan of the setup to compute the plane on which the object lays.
None SetFlatScan (self, eVision.Easy3D.EPointCloud cloud, bool objectAbovePlane)
 Uses a flat scan of the setup to compute the plane on which the object lays.
None ClearReprojectionPlane (self)
 Clears re-projection plane set with eVision.Easy3D.E3DAligner.ScanReprojectionPlane or eVision.Easy3D.E3DAligner.SetFlatScan.
bool IsReprojectionPlaneSet (self)
 Returns whether a re-projection plane was set with eVision.Easy3D.E3DAligner.ScanReprojectionPlane or eVision.Easy3D.E3DAligner.SetFlatScan or not.
None RetrieveReferencePosesProjections (self, list[eVision._eVision.Easy3D.EZMap8] referencePosesProjections)
 Retrieves the reference patterns of the eVision.Easy3D.E3DAligner in the form of a vector of eVision.Easy3D.EZMap8.
None RetrieveReferencePoses (self, list[eVision._eVision.Easy3D.E3DPlane] referencePoses)
 Retrieves the reference poses of the eVision.Easy3D.E3DAligner in the form of a vector of eVision.Easy3D.E3DPlane.
eVision.Easy3D.E3DAlignment Align (self, eVision.Easy3D.EZMap zmap)
 Aligns an eVision.Easy3D.EZMap or eVision.Easy3D.EPointCloud on the reference model.
eVision.Easy3D.E3DAlignment Align (self, eVision.Easy3D.EPointCloud cloud, eVision.Easy3D.E3DPlane projectionPlane)
 Aligns an eVision.Easy3D.EZMap or eVision.Easy3D.EPointCloud on the reference model.
eVision.Easy3D.E3DAlignment Align (self, eVision.Easy3D.EPointCloud cloud, float azimuth, float elevation)
 Aligns an eVision.Easy3D.EZMap or eVision.Easy3D.EPointCloud on the reference model.
eVision.Easy3D.E3DPlane ScanReprojectionPlane (self)
 Sets/Gets the plane on which the model lays.
 ScanReprojectionPlane (self, eVision.Easy3D.E3DPlane value)
 Sets/Gets the plane on which the model lays.

Static Public Member Functions

None 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

Detailed Description

Constructor & Destructor Documentation

◆ __init__() [1/2]

None eVision.Easy3D.E3DAligner.__init__ ( self)

Constructs a 3D Aligner.

◆ __init__() [2/2]

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

Constructs a 3D Aligner.

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

Member Function Documentation

◆ Align() [1/3]

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

Aligns an eVision.Easy3D.EZMap or eVision.Easy3D.EPointCloud on the reference model.

Remarks:

When specifying azimuth and elevation, only the normal of the projection plane is specified. The distance from origin of the eVision.Easy3D.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.

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

◆ Align() [2/3]

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

Aligns an eVision.Easy3D.EZMap or eVision.Easy3D.EPointCloud on the reference model.

Remarks:

When specifying azimuth and elevation, only the normal of the projection plane is specified. The distance from origin of the eVision.Easy3D.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.

Parameters
cloudThe eVision.Easy3D.EPointCloud to align on the reference
azimuthThe azimuth angle of the normal of the projection plane in eVision.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 eVision.Easy.SetAngleUnit. Elevation angles represent how close the normal is to the z = 0 plane.

◆ Align() [3/3]

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

Aligns an eVision.Easy3D.EZMap or eVision.Easy3D.EPointCloud on the reference model.

Remarks:

When specifying azimuth and elevation, only the normal of the projection plane is specified. The distance from origin of the eVision.Easy3D.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.

Parameters
zmapThe eVision.Easy3D.EZMap to align

◆ ClearReprojectionPlane()

None eVision.Easy3D.E3DAligner.ClearReprojectionPlane ( self)

◆ compute3DPositionFrom2DAligning()

None 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 ( self)

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

◆ Load() [1/2]

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

Loads the eVision.Easy3D.E3DAligner.

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

Parameters
serializerThe serializer.

Reimplemented in eVision.Easy3D.E3DMatcher, and eVision.Easy3D.E3DMatcher.

◆ Load() [2/2]

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

Loads the eVision.Easy3D.E3DAligner.

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

Parameters
pathThe file path.

Reimplemented in eVision.Easy3D.E3DMatcher, and eVision.Easy3D.E3DMatcher.

◆ RetrieveReferencePoses()

None eVision.Easy3D.E3DAligner.RetrieveReferencePoses ( self,
list[eVision._eVision.Easy3D.E3DPlane] referencePoses )

Retrieves the reference poses of the eVision.Easy3D.E3DAligner in the form of a vector of eVision.Easy3D.E3DPlane.

The corresponding reference patterns vector can be retrieved with eVision.Easy3D.E3DAligner.RetrieveReferencePosesProjections.

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

◆ RetrieveReferencePosesProjections()

None eVision.Easy3D.E3DAligner.RetrieveReferencePosesProjections ( self,
list[eVision._eVision.Easy3D.EZMap8] referencePosesProjections )

Retrieves the reference patterns of the eVision.Easy3D.E3DAligner in the form of a vector of eVision.Easy3D.EZMap8.

The corresponding reference poses vector can be retrieved with eVision.Easy3D.E3DAligner.RetrieveReferencePoses.

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

◆ Save() [1/2]

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

Saves the eVision.Easy3D.E3DAligner.

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

Parameters
serializerThe serializer.

Reimplemented in eVision.Easy3D.E3DMatcher, and eVision.Easy3D.E3DMatcher.

◆ Save() [2/2]

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

Saves the eVision.Easy3D.E3DAligner.

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

Parameters
pathThe file path.

Reimplemented in eVision.Easy3D.E3DMatcher, and eVision.Easy3D.E3DMatcher.

◆ ScanReprojectionPlane() [1/2]

eVision.Easy3D.E3DPlane eVision.Easy3D.E3DAligner.ScanReprojectionPlane ( self)

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 eVision.Easy3D.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.

Remarks:

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 eVision.Easy3D.E3DAligner.SetFlatScan. When the reference is a eVision.Easy3D.EMesh, the corresponding reference plane should match the re-projection plane.

◆ ScanReprojectionPlane() [2/2]

eVision.Easy3D.E3DAligner.ScanReprojectionPlane ( self,
eVision.Easy3D.E3DPlane value )

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 eVision.Easy3D.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.

Remarks:

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 eVision.Easy3D.E3DAligner.SetFlatScan. When the reference is a eVision.Easy3D.EMesh, the corresponding reference plane should match the re-projection plane.

◆ SetFlatScan() [1/4]

None eVision.Easy3D.E3DAligner.SetFlatScan ( self,
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.

Remarks:

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 eVision.Easy3D.E3DAligner.ScanReprojectionPlane. When the reference is a eVision.Easy3D.EMesh, the corresponding reference plane should match the re-projection plane.

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

◆ SetFlatScan() [2/4]

None eVision.Easy3D.E3DAligner.SetFlatScan ( self,
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.

Remarks:

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 eVision.Easy3D.E3DAligner.ScanReprojectionPlane. When the reference is a eVision.Easy3D.EMesh, the corresponding reference plane should match the re-projection plane.

Parameters
cloudThe eVision.Easy3D.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

◆ SetFlatScan() [3/4]

None eVision.Easy3D.E3DAligner.SetFlatScan ( self,
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.

Remarks:

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 eVision.Easy3D.E3DAligner.ScanReprojectionPlane. When the reference is a eVision.Easy3D.EMesh, the corresponding reference plane should match the re-projection plane.

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

◆ SetFlatScan() [4/4]

None eVision.Easy3D.E3DAligner.SetFlatScan ( self,
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.

Remarks:

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 eVision.Easy3D.E3DAligner.ScanReprojectionPlane. When the reference is a eVision.Easy3D.EMesh, the corresponding reference plane should match the re-projection plane.

Parameters
scanThe eVision.Easy3D.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

◆ SetReference() [1/7]

None eVision.Easy3D.E3DAligner.SetReference ( self,
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 eVision.Easy3D.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 (eVision.Easy3D.E3DAligner.ScanReprojectionPlane, eVision.Easy3D.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 eVision.Easy3D.EZMap or an eVision.Easy3D.EPointCloud with reference plane indicating on which direction it must be projected.

Remarks:

Parameters
meshThe eVision.Easy3D.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]

None eVision.Easy3D.E3DAligner.SetReference ( self,
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 eVision.Easy3D.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 (eVision.Easy3D.E3DAligner.ScanReprojectionPlane, eVision.Easy3D.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 eVision.Easy3D.EZMap or an eVision.Easy3D.EPointCloud with reference plane indicating on which direction it must be projected.

Remarks:

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

◆ SetReference() [3/7]

None eVision.Easy3D.E3DAligner.SetReference ( self,
eVision.Easy3D.EMesh mesh,
list[eVision._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 eVision.Easy3D.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 (eVision.Easy3D.E3DAligner.ScanReprojectionPlane, eVision.Easy3D.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 eVision.Easy3D.EZMap or an eVision.Easy3D.EPointCloud with reference plane indicating on which direction it must be projected.

Remarks:

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

◆ SetReference() [4/7]

None eVision.Easy3D.E3DAligner.SetReference ( self,
eVision.Easy3D.EMesh mesh,
list[float] azimuths,
list[float] elevations )

Sets the 3D reference model that is used to create reference patterns.

It may be a CAD of the object as an eVision.Easy3D.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 (eVision.Easy3D.E3DAligner.ScanReprojectionPlane, eVision.Easy3D.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 eVision.Easy3D.EZMap or an eVision.Easy3D.EPointCloud with reference plane indicating on which direction it must be projected.

Remarks:

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

◆ SetReference() [5/7]

None eVision.Easy3D.E3DAligner.SetReference ( self,
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 eVision.Easy3D.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 (eVision.Easy3D.E3DAligner.ScanReprojectionPlane, eVision.Easy3D.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 eVision.Easy3D.EZMap or an eVision.Easy3D.EPointCloud with reference plane indicating on which direction it must be projected.

Remarks:

Parameters
cloudThe eVision.Easy3D.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]

None eVision.Easy3D.E3DAligner.SetReference ( self,
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 eVision.Easy3D.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 (eVision.Easy3D.E3DAligner.ScanReprojectionPlane, eVision.Easy3D.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 eVision.Easy3D.EZMap or an eVision.Easy3D.EPointCloud with reference plane indicating on which direction it must be projected.

Remarks:

Parameters
cloudThe eVision.Easy3D.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 eVision.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 reference plane in eVision.Easy.SetAngleUnit. Elevation angles represent how close the normal is to the z = 0 plane.

◆ SetReference() [7/7]

None eVision.Easy3D.E3DAligner.SetReference ( self,
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 eVision.Easy3D.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 (eVision.Easy3D.E3DAligner.ScanReprojectionPlane, eVision.Easy3D.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 eVision.Easy3D.EZMap or an eVision.Easy3D.EPointCloud with reference plane indicating on which direction it must be projected.

Remarks:

Parameters
zmapThe eVision.Easy3D.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).