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

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

Detailed Description

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

Constructor & Destructor Documentation

◆ __init__() [1/4]

None eVision.Easy3D.EPlaneFinder.__init__ ( self,
float maxDeviation,
float pcExpectedInCloud )

Creates an eVision.Easy3D.EPlaneFinder object.

Parameters
maxDeviationMaximum distance of an inlier to the plane. This value has to be strictly positive.
pcExpectedInCloudThis 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.

◆ __init__() [2/4]

None eVision.Easy3D.EPlaneFinder.__init__ ( self,
float maxDeviation )

Creates an eVision.Easy3D.EPlaneFinder object.

Parameters
maxDeviationMaximum distance of an inlier to the plane. This value has to be strictly positive.

◆ __init__() [3/4]

None eVision.Easy3D.EPlaneFinder.__init__ ( self,
float maxDeviation,
eVision.EFloatRange pcExpectedInCloudRange )

Creates an eVision.Easy3D.EPlaneFinder object.

Parameters
maxDeviationMaximum distance of an inlier to the plane. This value has to be strictly positive.
pcExpectedInCloudRangeThis 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.

◆ __init__() [4/4]

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

Creates an eVision.Easy3D.EPlaneFinder object.

Parameters
otherThe eVision.Easy3D.EPlaneFinder object that should be copied.

Member Function Documentation

◆ _OnePoint__setter()

eVision.Easy3D.EPlaneFinder._OnePoint__setter ( self,
eVision.Easy3D.E3DPoint value )
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.

◆ DisableDecimator()

None eVision.Easy3D.EPlaneFinder.DisableDecimator ( self)

Disables the default decimation.

The decimation should be disabled when the input point cloud is already decimated.

◆ EnableDecimator()

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.

◆ ExpectedCloudInliersRatio() [1/2]

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

◆ ExpectedCloudInliersRatio() [2/2]

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

◆ ExpectedCloudInliersRatioRange() [1/2]

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.

◆ ExpectedCloudInliersRatioRange() [2/2]

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.

◆ Find() [1/3]

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.

Parameters
pointCloudThe input point cloud in which the plane should be searched (need at least 3 points)
foundPlaneAn E3DPlane that will contain the plane found

◆ Find() [2/3]

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.

Parameters
pointCloudThe input point cloud in which the plane should be searched (need at least 3 points)
foundPlaneAn E3DPlane that will contain the plane found
inliersA pointcloud that will contain the inliers of the plane

◆ Find() [3/3]

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.

Parameters
pointCloudThe input point cloud in which the plane should be searched (need at least 3 points)
foundPlaneAn E3DPlane that will contain the plane found
inliersA pointcloud that will contain the inliers of the plane
outliersA pointcloud that will contain the outliers of the plane

◆ GetNormal()

eVision.Easy3D.E3DPoint eVision.Easy3D.EPlaneFinder.GetNormal ( self)

Returns the expected normal direction (that has been set by eVision.Easy3D.EPlaneFinder.SetNormal).

◆ GetPoint()

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).

Parameters
firstTrue if you want to get the first point and false if you want the second instead.

◆ IsDecimatorEnabled()

bool eVision.Easy3D.EPlaneFinder.IsDecimatorEnabled ( self)

Returns true if the default decimator is enabled (enabled by default).

◆ IsNormalSet()

bool eVision.Easy3D.EPlaneFinder.IsNormalSet ( self)

Returns true if the expected normal direction has been set (not set by default).

◆ IsSeedSet()

bool eVision.Easy3D.EPlaneFinder.IsSeedSet ( self)

Returns true if the seed was set to a custom value.

Deprecated

Always returns true.

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

◆ Load() [1/2]

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

Loads the plane finder configuration.

The given ESerializer must have been created for reading.

Parameters
serializerThe serializer.

◆ Load() [2/2]

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

Loads the plane finder configuration.

The given ESerializer must have been created for reading.

Parameters
pathThe file path.

◆ MaxDeviation() [1/2]

float eVision.Easy3D.EPlaneFinder.MaxDeviation ( self)

Sets/gets the maximum distance of an inlier to the plane.

◆ MaxDeviation() [2/2]

eVision.Easy3D.EPlaneFinder.MaxDeviation ( self,
float value )

Sets/gets the maximum distance of an inlier to the plane.

◆ NormalTolerance()

float eVision.Easy3D.EPlaneFinder.NormalTolerance ( self)

Returns the angle tolerance around the expected normal (that has been set by eVision.Easy3D.EPlaneFinder.SetNormal).

◆ NumberOfPointsAfterDecimation() [1/2]

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.

◆ NumberOfPointsAfterDecimation() [2/2]

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.

◆ NumberOfPointsSet()

int eVision.Easy3D.EPlaneFinder.NumberOfPointsSet ( self)

Returns the number of points set (this will be either 0, 1 or 2).

◆ Save() [1/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.

Parameters
serializerThe eVision.ESerializer object that is written to.

◆ Save() [2/2]

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

Saves the plane finder configuration.

The given ESerializer must have been created for writing.

Parameters
pathThe file path.

◆ Seed() [1/2]

int eVision.Easy3D.EPlaneFinder.Seed ( self)

Returns the seed (that has been set by eVision.Easy3D.EPlaneFinder.Seed).

Deprecated

Users shouldn't have to get the seed.

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

◆ Seed() [2/2]

eVision.Easy3D.EPlaneFinder.Seed ( self,
int value )

Returns the seed (that has been set by eVision.Easy3D.EPlaneFinder.Seed).

Deprecated

Users shouldn't have to get the seed.

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

◆ SetNormal() [1/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.

Parameters
referencePlaneThe reference plane specifies the expected perpendicular direction.

◆ SetNormal() [2/6]

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.

Parameters
referencePlaneThe reference plane specifies the expected perpendicular direction.
angleToleranceThe 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.

◆ SetNormal() [3/6]

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.

Parameters
normalThe normal vector specifies the expected perpendicular direction of the plane.

◆ SetNormal() [4/6]

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.

Parameters
normalThe normal vector specifies the expected perpendicular direction of the plane.
angleToleranceThe 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.

◆ SetNormal() [5/6]

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.

Parameters
nxThe x component of the normal vector.
nyThe y component of the normal vector.
nzThe z component of the normal vector.

◆ SetNormal() [6/6]

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.

Parameters
nxThe x component of the normal vector.
nyThe y component of the normal vector.
nzThe z component of the normal vector.
angleToleranceThe 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.

◆ SetTwoPoints()

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

Parameters
point1The first point.
point2The second point.

◆ UnsetNormal()

None eVision.Easy3D.EPlaneFinder.UnsetNormal ( self)

Unsets the normal vector definition.

◆ UnsetPoints()

None eVision.Easy3D.EPlaneFinder.UnsetPoints ( self)

Unsets the 1 or 2 points that the plane is constrained to contain.

◆ UnsetSeed()

None eVision.Easy3D.EPlaneFinder.UnsetSeed ( self)

Reset seed to its default state of being randomly initialized.

Deprecated

This function doesn't have any effect.

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

Property Documentation

◆ OnePoint

eVision.Easy3D.EPlaneFinder.OnePoint
static
Initial value:
= property(None, _OnePoint__setter, None,
)