A eVision.Easy3D.EPlaneFinder object is used to search an eVision.Easy3D.E3DPlane in an eVision.Easy3D.EPointCloud. More...
Public Member Functions | |
| None | __init__ (self, float maxDeviation, float pcExpectedInCloud) |
| Creates an eVision.Easy3D.EPlaneFinder object. | |
| None | __init__ (self, float maxDeviation) |
| Creates an eVision.Easy3D.EPlaneFinder object. | |
| None | __init__ (self, float maxDeviation, eVision.EFloatRange pcExpectedInCloudRange) |
| Creates an eVision.Easy3D.EPlaneFinder object. | |
| None | __init__ (self, eVision.Easy3D.EPlaneFinder other) |
| Creates an eVision.Easy3D.EPlaneFinder object. | |
| None | EnableDecimator (self) |
| Enables the default decimation which reduces the input point cloud by drawing points randomly. | |
| None | DisableDecimator (self) |
| Disables the default decimation. | |
| bool | IsDecimatorEnabled (self) |
| Returns true if the default decimator is enabled (enabled by default). | |
| None | UnsetNormal (self) |
| Unsets the normal vector definition. | |
| None | SetNormal (self, eVision.Easy3D.E3DPoint normal) |
| Sets the expected normal direction and the tolerance around it. | |
| None | SetNormal (self, eVision.Easy3D.E3DPoint normal, float angleTolerance) |
| Sets the expected normal direction and the tolerance around it. | |
| None | SetNormal (self, float nx, float ny, float nz) |
| Sets the expected normal direction and the tolerance around it. | |
| None | SetNormal (self, float nx, float ny, float nz, float angleTolerance) |
| Sets the expected normal direction and the tolerance around it. | |
| None | SetNormal (self, eVision.Easy3D.E3DPlane referencePlane) |
| Sets the expected normal direction and the tolerance around it. | |
| None | SetNormal (self, eVision.Easy3D.E3DPlane referencePlane, float angleTolerance) |
| Sets the expected normal direction and the tolerance around it. | |
| eVision.Easy3D.E3DPoint | GetNormal (self) |
| Returns the expected normal direction (that has been set by eVision.Easy3D.EPlaneFinder.SetNormal). | |
| bool | IsNormalSet (self) |
| Returns true if the expected normal direction has been set (not set by default). | |
| None | UnsetPoints (self) |
| Unsets the 1 or 2 points that the plane is constrained to contain. | |
| None | SetTwoPoints (self, eVision.Easy3D.E3DPoint point1, eVision.Easy3D.E3DPoint point2) |
| Sets two points that the plane will be constrained to contain. | |
| eVision.Easy3D.E3DPoint | GetPoint (self, bool first) |
| Returns an eVision.Easy3D.E3DPoint the plane is constrained to contain (that has been set by eVision.Easy3D.EPlaneFinder.OnePoint or eVision.Easy3D.EPlaneFinder.SetTwoPoints). | |
| float | Find (self, eVision.Easy3D.EPointCloud pointCloud, eVision.Easy3D.E3DPlane foundPlane) |
| Searches the biggest plane in the supplied eVision.Easy3D.EPointCloud. | |
| float | Find (self, eVision.Easy3D.EPointCloud pointCloud, eVision.Easy3D.E3DPlane foundPlane, eVision.Easy3D.EPointCloud inliers) |
| Searches the biggest plane in the supplied eVision.Easy3D.EPointCloud. | |
| float | Find (self, eVision.Easy3D.EPointCloud pointCloud, eVision.Easy3D.E3DPlane foundPlane, eVision.Easy3D.EPointCloud inliers, eVision.Easy3D.EPointCloud outliers) |
| Searches the biggest plane in the supplied eVision.Easy3D.EPointCloud. | |
| None | Load (self, str path) |
| Loads the plane finder configuration. | |
| None | Load (self, eVision.ESerializer|None serializer) |
| Loads the plane finder configuration. | |
| None | Save (self, str path) |
| Saves the plane finder configuration. | |
| None | Save (self, eVision.ESerializer|None serializer) |
| Saves the plane finder configuration. | |
| bool | IsSeedSet (self) |
| Returns true if the seed was set to a custom value. | |
| None | UnsetSeed (self) |
| Reset seed to its default state of being randomly initialized. | |
| float | MaxDeviation (self) |
| Sets/gets the maximum distance of an inlier to the plane. | |
| MaxDeviation (self, float value) | |
| Sets/gets the maximum distance of an inlier to the plane. | |
| int | NumberOfPointsAfterDecimation (self) |
| Sets/gets the number of points surviving the decimation. | |
| NumberOfPointsAfterDecimation (self, int value) | |
| Sets/gets the number of points surviving the decimation. | |
| float | ExpectedCloudInliersRatio (self) |
| Sets/gets the expected ratio of inliers in the eVision.Easy3D.EPointCloud. | |
| ExpectedCloudInliersRatio (self, float value) | |
| Sets/gets the expected ratio of inliers in the eVision.Easy3D.EPointCloud. | |
| eVision.EFloatRange | ExpectedCloudInliersRatioRange (self) |
| Sets/gets the expected ratio of inliers in the eVision.Easy3D.EPointCloud. | |
| ExpectedCloudInliersRatioRange (self, eVision.EFloatRange value) | |
| Sets/gets the expected ratio of inliers in the eVision.Easy3D.EPointCloud. | |
| float | NormalTolerance (self) |
| Returns the angle tolerance around the expected normal (that has been set by eVision.Easy3D.EPlaneFinder.SetNormal). | |
| int | NumberOfPointsSet (self) |
| Returns the number of points set (this will be either 0, 1 or 2). | |
| int | Seed (self) |
| Returns the seed (that has been set by eVision.Easy3D.EPlaneFinder.Seed). | |
| Seed (self, int value) | |
| Returns the seed (that has been set by eVision.Easy3D.EPlaneFinder.Seed). | |
Protected Member Functions | |
| _OnePoint__setter (self, eVision.Easy3D.E3DPoint value) | |
| Sets one point that the plane will be constrained to contain. | |
Properties | |
| OnePoint | |
A eVision.Easy3D.EPlaneFinder object is used to search an eVision.Easy3D.E3DPlane in an eVision.Easy3D.EPointCloud.
The algorithm searches the largest plane in terms of number of "inliers". A point is an "inlier" when its distance to the plane is smaller than a specified threshold (parameter "maximum distance"). Another parameter specifies the expected ratio of inliers over the total number of points in the point cloud (by default, this is set to 0.3).
For more control, you can also set the expected ratio of inliers as a range, when a single number is given the behavior is equivalent to a range (number/2, number). The method Find throws an error if it cannot achieve a proportion of inliers better than the min of the range. It stops as soon as the max of the range is achieved.
Reducing the size of the range increases speed. A decimation is applied by default to accelerate the search. Furthermore, the expected normal to the plane and/or up to two points contained in the plane may be specified.
The method eVision.Easy3D.EPlaneFinder.Find processes an eVision.Easy3D.EPointCloud object and returns an eVision.Easy3D.E3DPlane object when a sufficiently good plane is found in the input point cloud. The returned plane is the result of fitting an eVision.Easy3D.EPlaneFitter on the inliers.
Remarks:
License(s): Easy3D
| None eVision.Easy3D.EPlaneFinder.__init__ | ( | self, | |
| float | maxDeviation, | ||
| float | pcExpectedInCloud ) |
Creates an eVision.Easy3D.EPlaneFinder object.
| maxDeviation | Maximum distance of an inlier to the plane. This value has to be strictly positive. |
| pcExpectedInCloud | This is an estimation of the ratio of inliers in the point cloud. The algorithm stops as soon as a pointCloud with at least pcExpectedInCloud inliers is found. It throws an error if the best plane has less than pcExpectedInCloud/2 inliers. |
This optional parameter has a default value of 0.3.
| None eVision.Easy3D.EPlaneFinder.__init__ | ( | self, | |
| float | maxDeviation ) |
Creates an eVision.Easy3D.EPlaneFinder object.
| maxDeviation | Maximum distance of an inlier to the plane. This value has to be strictly positive. |
| None eVision.Easy3D.EPlaneFinder.__init__ | ( | self, | |
| float | maxDeviation, | ||
| eVision.EFloatRange | pcExpectedInCloudRange ) |
Creates an eVision.Easy3D.EPlaneFinder object.
| maxDeviation | Maximum distance of an inlier to the plane. This value has to be strictly positive. |
| pcExpectedInCloudRange | This is an estimation of the ratio of inliers in the point cloud as a range within ]0, 1[. The algorithm throws an error if the best plane has less than inliersProportion.min inliers. The algorithm stops as soon as a model with inliersProportion.max is found. |
Increasing inliersProportion.min can increase speed but at the risk of missing the plane. Decreasing the max of the range can increase speed but at the risk of finding a bad plane.
| None eVision.Easy3D.EPlaneFinder.__init__ | ( | self, | |
| eVision.Easy3D.EPlaneFinder | other ) |
Creates an eVision.Easy3D.EPlaneFinder object.
| other | The eVision.Easy3D.EPlaneFinder object that should be copied. |
|
protected |
Sets one point that the plane will be constrained to contain.
Remarks:
To set 2 points, use the function SetTwoPoints. If two points were previously set, the second one will be removed by this function.
| None eVision.Easy3D.EPlaneFinder.DisableDecimator | ( | self | ) |
Disables the default decimation.
The decimation should be disabled when the input point cloud is already decimated.
| None eVision.Easy3D.EPlaneFinder.EnableDecimator | ( | self | ) |
Enables the default decimation which reduces the input point cloud by drawing points randomly.
This decimation is enabled by default. The decimation accelerates the search.
| float eVision.Easy3D.EPlaneFinder.ExpectedCloudInliersRatio | ( | self | ) |
Sets/gets the expected ratio of inliers in the eVision.Easy3D.EPointCloud.
Remarks:
This setter/getter is used to access the max of the range, its behavior is the same as SetExpectedCloudInliersRatioRange(EFloatRange(pcExpectedInCloud/2, pcExpectedInCloud)) and GetExpectedCloudInliersRatioRange().GetUpperBound()
| eVision.Easy3D.EPlaneFinder.ExpectedCloudInliersRatio | ( | self, | |
| float | value ) |
Sets/gets the expected ratio of inliers in the eVision.Easy3D.EPointCloud.
Remarks:
This setter/getter is used to access the max of the range, its behavior is the same as SetExpectedCloudInliersRatioRange(EFloatRange(pcExpectedInCloud/2, pcExpectedInCloud)) and GetExpectedCloudInliersRatioRange().GetUpperBound()
| eVision.EFloatRange eVision.Easy3D.EPlaneFinder.ExpectedCloudInliersRatioRange | ( | self | ) |
Sets/gets the expected ratio of inliers in the eVision.Easy3D.EPointCloud.
Remarks:
This is an estimation of the ratio of inliers in the point cloud as a range within ]0, 1[.
If pcExpectedInCloudRange.min is too small, we risk missing the plane. The algorithm throws an error if the best plane has less than pcExpectedInCloudRange.min inliers. The algorithm stops as soon as a model with pcExpectedInCloudRange.max is found.
Increasing pcExpectedInCloudRange.min can increase speed. Decreasing pcExpectedInCloudRange.max can increase speed.
| eVision.Easy3D.EPlaneFinder.ExpectedCloudInliersRatioRange | ( | self, | |
| eVision.EFloatRange | value ) |
Sets/gets the expected ratio of inliers in the eVision.Easy3D.EPointCloud.
Remarks:
This is an estimation of the ratio of inliers in the point cloud as a range within ]0, 1[.
If pcExpectedInCloudRange.min is too small, we risk missing the plane. The algorithm throws an error if the best plane has less than pcExpectedInCloudRange.min inliers. The algorithm stops as soon as a model with pcExpectedInCloudRange.max is found.
Increasing pcExpectedInCloudRange.min can increase speed. Decreasing pcExpectedInCloudRange.max can increase speed.
| float eVision.Easy3D.EPlaneFinder.Find | ( | self, | |
| eVision.Easy3D.EPointCloud | pointCloud, | ||
| eVision.Easy3D.E3DPlane | foundPlane ) |
Searches the biggest plane in the supplied eVision.Easy3D.EPointCloud.
If a sufficiently good plane is not found, an exception is thrown.
Remarks:
The normal vector of the fitted plane is always oriented towards the positive Z axis, see eVision.Easy3D.E3DPlaneNormalOrientation.PosZ.
| pointCloud | The input point cloud in which the plane should be searched (need at least 3 points) |
| foundPlane | An E3DPlane that will contain the plane found |
| float eVision.Easy3D.EPlaneFinder.Find | ( | self, | |
| eVision.Easy3D.EPointCloud | pointCloud, | ||
| eVision.Easy3D.E3DPlane | foundPlane, | ||
| eVision.Easy3D.EPointCloud | inliers ) |
Searches the biggest plane in the supplied eVision.Easy3D.EPointCloud.
If a sufficiently good plane is not found, an exception is thrown.
Remarks:
The normal vector of the fitted plane is always oriented towards the positive Z axis, see eVision.Easy3D.E3DPlaneNormalOrientation.PosZ.
| pointCloud | The input point cloud in which the plane should be searched (need at least 3 points) |
| foundPlane | An E3DPlane that will contain the plane found |
| inliers | A pointcloud that will contain the inliers of the plane |
| float eVision.Easy3D.EPlaneFinder.Find | ( | self, | |
| eVision.Easy3D.EPointCloud | pointCloud, | ||
| eVision.Easy3D.E3DPlane | foundPlane, | ||
| eVision.Easy3D.EPointCloud | inliers, | ||
| eVision.Easy3D.EPointCloud | outliers ) |
Searches the biggest plane in the supplied eVision.Easy3D.EPointCloud.
If a sufficiently good plane is not found, an exception is thrown.
Remarks:
The normal vector of the fitted plane is always oriented towards the positive Z axis, see eVision.Easy3D.E3DPlaneNormalOrientation.PosZ.
| pointCloud | The input point cloud in which the plane should be searched (need at least 3 points) |
| foundPlane | An E3DPlane that will contain the plane found |
| inliers | A pointcloud that will contain the inliers of the plane |
| outliers | A pointcloud that will contain the outliers of the plane |
| eVision.Easy3D.E3DPoint eVision.Easy3D.EPlaneFinder.GetNormal | ( | self | ) |
Returns the expected normal direction (that has been set by eVision.Easy3D.EPlaneFinder.SetNormal).
| eVision.Easy3D.E3DPoint eVision.Easy3D.EPlaneFinder.GetPoint | ( | self, | |
| bool | first ) |
Returns an eVision.Easy3D.E3DPoint the plane is constrained to contain (that has been set by eVision.Easy3D.EPlaneFinder.OnePoint or eVision.Easy3D.EPlaneFinder.SetTwoPoints).
| first | True if you want to get the first point and false if you want the second instead. |
| bool eVision.Easy3D.EPlaneFinder.IsDecimatorEnabled | ( | self | ) |
Returns true if the default decimator is enabled (enabled by default).
| bool eVision.Easy3D.EPlaneFinder.IsNormalSet | ( | self | ) |
Returns true if the expected normal direction has been set (not set by default).
| bool eVision.Easy3D.EPlaneFinder.IsSeedSet | ( | self | ) |
Returns true if the seed was set to a custom value.
Always returns true.
Deprecated in version 24.6. Scheduled to be removed in version 27.6.
| None eVision.Easy3D.EPlaneFinder.Load | ( | self, | |
| eVision.ESerializer | None | serializer ) |
Loads the plane finder configuration.
The given ESerializer must have been created for reading.
| serializer | The serializer. |
| None eVision.Easy3D.EPlaneFinder.Load | ( | self, | |
| str | path ) |
Loads the plane finder configuration.
The given ESerializer must have been created for reading.
| path | The file path. |
| float eVision.Easy3D.EPlaneFinder.MaxDeviation | ( | self | ) |
Sets/gets the maximum distance of an inlier to the plane.
| eVision.Easy3D.EPlaneFinder.MaxDeviation | ( | self, | |
| float | value ) |
Sets/gets the maximum distance of an inlier to the plane.
| float eVision.Easy3D.EPlaneFinder.NormalTolerance | ( | self | ) |
Returns the angle tolerance around the expected normal (that has been set by eVision.Easy3D.EPlaneFinder.SetNormal).
| int eVision.Easy3D.EPlaneFinder.NumberOfPointsAfterDecimation | ( | self | ) |
Sets/gets the number of points surviving the decimation.
Using the setter enables the decimation if it wasn't already. if numberOfPointsAfterDecimation is bigger than the point cloud size, no decimation occurs.
| eVision.Easy3D.EPlaneFinder.NumberOfPointsAfterDecimation | ( | self, | |
| int | value ) |
Sets/gets the number of points surviving the decimation.
Using the setter enables the decimation if it wasn't already. if numberOfPointsAfterDecimation is bigger than the point cloud size, no decimation occurs.
| int eVision.Easy3D.EPlaneFinder.NumberOfPointsSet | ( | self | ) |
Returns the number of points set (this will be either 0, 1 or 2).
| None eVision.Easy3D.EPlaneFinder.Save | ( | self, | |
| eVision.ESerializer | None | serializer ) |
Saves the plane finder configuration.
The given ESerializer must have been created for writing.
| serializer | The eVision.ESerializer object that is written to. |
| None eVision.Easy3D.EPlaneFinder.Save | ( | self, | |
| str | path ) |
Saves the plane finder configuration.
The given ESerializer must have been created for writing.
| path | The file path. |
| int eVision.Easy3D.EPlaneFinder.Seed | ( | self | ) |
Returns the seed (that has been set by eVision.Easy3D.EPlaneFinder.Seed).
Users shouldn't have to get the seed.
Deprecated in version 24.6. Scheduled to be removed in version 27.6.
| eVision.Easy3D.EPlaneFinder.Seed | ( | self, | |
| int | value ) |
Returns the seed (that has been set by eVision.Easy3D.EPlaneFinder.Seed).
Users shouldn't have to get the seed.
Deprecated in version 24.6. Scheduled to be removed in version 27.6.
| None eVision.Easy3D.EPlaneFinder.SetNormal | ( | self, | |
| eVision.Easy3D.E3DPlane | referencePlane ) |
Sets the expected normal direction and the tolerance around it.
These values are used to limit the scope of the plane search.
If the angular tolerance is not specified, a default value of 5 degrees is assumed. If the tolerance is specified, the value should be strictly positive and correspond to less than 90 degrees.
| referencePlane | The reference plane specifies the expected perpendicular direction. |
| None eVision.Easy3D.EPlaneFinder.SetNormal | ( | self, | |
| eVision.Easy3D.E3DPlane | referencePlane, | ||
| float | angleTolerance ) |
Sets the expected normal direction and the tolerance around it.
These values are used to limit the scope of the plane search.
If the angular tolerance is not specified, a default value of 5 degrees is assumed. If the tolerance is specified, the value should be strictly positive and correspond to less than 90 degrees.
| referencePlane | The reference plane specifies the expected perpendicular direction. |
| angleTolerance | The angle tolerance is the maximum angular deviation around the expected normal (strictly positive and smaller than 90 degrees). It's set to 5 degrees by default. |
| None eVision.Easy3D.EPlaneFinder.SetNormal | ( | self, | |
| eVision.Easy3D.E3DPoint | normal ) |
Sets the expected normal direction and the tolerance around it.
These values are used to limit the scope of the plane search.
If the angular tolerance is not specified, a default value of 5 degrees is assumed. If the tolerance is specified, the value should be strictly positive and correspond to less than 90 degrees.
| normal | The normal vector specifies the expected perpendicular direction of the plane. |
| None eVision.Easy3D.EPlaneFinder.SetNormal | ( | self, | |
| eVision.Easy3D.E3DPoint | normal, | ||
| float | angleTolerance ) |
Sets the expected normal direction and the tolerance around it.
These values are used to limit the scope of the plane search.
If the angular tolerance is not specified, a default value of 5 degrees is assumed. If the tolerance is specified, the value should be strictly positive and correspond to less than 90 degrees.
| normal | The normal vector specifies the expected perpendicular direction of the plane. |
| angleTolerance | The angle tolerance is the maximum angular deviation around the expected normal (strictly positive and smaller than 90 degrees). It's set to 5 degrees by default. |
| None eVision.Easy3D.EPlaneFinder.SetNormal | ( | self, | |
| float | nx, | ||
| float | ny, | ||
| float | nz ) |
Sets the expected normal direction and the tolerance around it.
These values are used to limit the scope of the plane search.
If the angular tolerance is not specified, a default value of 5 degrees is assumed. If the tolerance is specified, the value should be strictly positive and correspond to less than 90 degrees.
| nx | The x component of the normal vector. |
| ny | The y component of the normal vector. |
| nz | The z component of the normal vector. |
| None eVision.Easy3D.EPlaneFinder.SetNormal | ( | self, | |
| float | nx, | ||
| float | ny, | ||
| float | nz, | ||
| float | angleTolerance ) |
Sets the expected normal direction and the tolerance around it.
These values are used to limit the scope of the plane search.
If the angular tolerance is not specified, a default value of 5 degrees is assumed. If the tolerance is specified, the value should be strictly positive and correspond to less than 90 degrees.
| nx | The x component of the normal vector. |
| ny | The y component of the normal vector. |
| nz | The z component of the normal vector. |
| angleTolerance | The angle tolerance is the maximum angular deviation around the expected normal (strictly positive and smaller than 90 degrees). It's set to 5 degrees by default. |
| None eVision.Easy3D.EPlaneFinder.SetTwoPoints | ( | self, | |
| eVision.Easy3D.E3DPoint | point1, | ||
| eVision.Easy3D.E3DPoint | point2 ) |
Sets two points that the plane will be constrained to contain.
Remarks:
To set 1 point, use the function SetOnePoint
| point1 | The first point. |
| point2 | The second point. |
| None eVision.Easy3D.EPlaneFinder.UnsetNormal | ( | self | ) |
Unsets the normal vector definition.
| None eVision.Easy3D.EPlaneFinder.UnsetPoints | ( | self | ) |
Unsets the 1 or 2 points that the plane is constrained to contain.
| None eVision.Easy3D.EPlaneFinder.UnsetSeed | ( | self | ) |
Reset seed to its default state of being randomly initialized.
This function doesn't have any effect.
Deprecated in version 24.6. Scheduled to be removed in version 27.6.
|
static |