Aligns an EPointCloud or EZMap on a reference EMesh, EPointCloud or EZMap. More...
#include <eVision/Easy3D/Easy3DMatch/E3DAligner.h>
Public Member Functions | |
| 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. | |
| virtual void | Load (const std::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 (const std::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 (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) | |
Static Public Member Functions | |
| 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 | |
| CppWrapperInternal::WrappedClass | wrappedClass_ |
Aligns an EPointCloud or EZMap on a reference EMesh, EPointCloud or EZMap.
License(s): Easy3DMatch
| eVision::Easy3D::E3DAligner::E3DAligner | ( | ) |
Constructs a 3D Aligner.
| eVision::Easy3D::E3DAligner::E3DAligner | ( | const eVision::Easy3D::E3DAligner & | other | ) |
Constructs a 3D Aligner.
| other | Another E3DAligner object to be copied in the new E3DAligner object. |
|
virtual | ||||||||||||
| eVision::Easy3D::E3DAligner::E3DAligner | ( | CppWrapperInternal::InternalConstructor | ) |
| eVision::Easy3D::E3DAlignment eVision::Easy3D::E3DAligner::Align | ( | const eVision::Easy3D::EPointCloud & | cloud, |
| const eVision::Easy3D::E3DPlane & | projectionPlane ) const |
Aligns an EZMap or EPointCloud on the reference model.
| cloud | The EPointCloud to align on the reference |
| projectionPlane | The 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.
| eVision::Easy3D::E3DAlignment eVision::Easy3D::E3DAligner::Align | ( | const eVision::Easy3D::EPointCloud & | cloud, |
| float | azimuth, | ||
| float | elevation ) const |
Aligns an EZMap or EPointCloud on the reference model.
| cloud | The EPointCloud to align on the reference |
| azimuth | The 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. |
| elevation | The 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.
| eVision::Easy3D::E3DAlignment eVision::Easy3D::E3DAligner::Align | ( | const eVision::Easy3D::EZMap & | zmap | ) | const |
Aligns an EZMap or EPointCloud on the reference model.
| zmap | The 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.
| void eVision::Easy3D::E3DAligner::ClearReprojectionPlane | ( | ) |
Clears re-projection plane set with E3DAligner::SetScanReprojectionPlane or E3DAligner::SetFlatScan.
|
static |
computes transformation between the point clouds from the alignment on the ZMaps
| eVision::Easy3D::E3DPlane eVision::Easy3D::E3DAligner::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.
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.
| bool eVision::Easy3D::E3DAligner::IsReprojectionPlaneSet | ( | ) | const |
Returns whether a re-projection plane was set with E3DAligner::SetScanReprojectionPlane or E3DAligner::SetFlatScan or not.
|
virtual |
Loads the E3DAligner. The given ESerializer must have been created for reading.
| path | The file path. |
Reimplemented in eVision::Easy3D::E3DMatcher.
|
virtual |
Loads the E3DAligner. The given ESerializer must have been created for reading.
| serializer | The serializer. |
Reimplemented in eVision::Easy3D::E3DMatcher.
| eVision::Easy3D::E3DAligner & eVision::Easy3D::E3DAligner::operator= | ( | const eVision::Easy3D::E3DAligner & | other | ) |
Assignment operator.
| other | The E3DAligner object that should be assigned. |
| void eVision::Easy3D::E3DAligner::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.
| referencePoses | The vector that will be filled with copies of the reference poses |
| void eVision::Easy3D::E3DAligner::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.
| referencePosesProjections | The vector that will be filled with copies of the reference poses projections |
|
virtual |
Saves the E3DAligner. The given ESerializer must have been created for writing.
| path | The file path. |
Reimplemented in eVision::Easy3D::E3DMatcher.
|
virtual |
Saves the E3DAligner. The given ESerializer must have been created for writing.
| serializer | The serializer. |
Reimplemented in eVision::Easy3D::E3DMatcher.
| void eVision::Easy3D::E3DAligner::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.
| cloud | The 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::SetScanReprojectionPlane. When the reference is a EMesh, the corresponding reference plane should match the re-projection plane.
| void eVision::Easy3D::E3DAligner::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.
| cloud | The EPointCloud representing a scan of the setup when no object lays on it. |
| objectAbovePlane | Whether 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::SetScanReprojectionPlane. When the reference is a EMesh, the corresponding reference plane should match the re-projection plane.
| void eVision::Easy3D::E3DAligner::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.
| scan | The 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::SetScanReprojectionPlane. When the reference is a EMesh, the corresponding reference plane should match the re-projection plane.
| void eVision::Easy3D::E3DAligner::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.
| scan | The EZMap representing a scan of the setup when no object lays on it. |
| objectAbovePlane | Whether 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::SetScanReprojectionPlane. When the reference is a EMesh, the corresponding reference plane should match the re-projection plane.
| void eVision::Easy3D::E3DAligner::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.
| mesh | The EMesh object that represents the 3D reference model. |
| plane | The plane onto which the model is projected orthographically (all points below the plane are discarded). |
| void eVision::Easy3D::E3DAligner::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.
| mesh | The EMesh object that represents the 3D reference model. |
| planes | vector of planes |
| void eVision::Easy3D::E3DAligner::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.
| mesh | The EMesh object that represents the 3D reference model. |
| azimuths | vector of azimuths |
| elevations | vector of elevations |
| void eVision::Easy3D::E3DAligner::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.
| mesh | The EMesh object that represents the 3D reference model. |
| azimuth | The azimuth angle of the normal of the reference plane in Easy::SetAngleUnit. Azimuth angles are oriented trigonometrically around the z axis. The x axis corresponds to an azimuth of 0 degrees. |
| elevation | The elevation angle of the normal of the reference plane in Easy::SetAngleUnit. Elevation angles represent how close the normal is to the z = 0 plane. |
| void eVision::Easy3D::E3DAligner::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.
| cloud | The 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). |
| plane | The plane onto which the model is projected orthographically (all points below the plane are discarded). |
| void eVision::Easy3D::E3DAligner::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.
| cloud | The 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). |
| azimuth | The azimuth angle of the normal of the reference plane in Easy::SetAngleUnit. Azimuth angles are oriented trigonometrically around the z axis. The x axis corresponds to an azimuth of 0 degrees. |
| elevation | The elevation angle of the normal of the reference plane in Easy::SetAngleUnit. Elevation angles represent how close the normal is to the z = 0 plane. |
| void eVision::Easy3D::E3DAligner::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.
| zmap | The 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). |
| void eVision::Easy3D::E3DAligner::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.
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.
| CppWrapperInternal::WrappedClass eVision::Easy3D::E3DAligner::wrappedClass_ |