View Source Evision.Octree (Evision v1.0.0-rc.0)
Summary
Functions
Reset all octree parameter.
Variant 1:
Create an Octree from the PointCloud data with the specific maxDepth
Variant 1:
Create an Octree from the PointCloud data with the specific maxDepth
Variant 1:
Create an Octree from the PointCloud data with the specific resolution
Variant 1:
Create an Octree from the PointCloud data with the specific resolution
Delete a given point from the Octree.
empty
restore point cloud data from Octree.
restore point cloud data from Octree.
Insert a point data with color to a OctreeNode.
Insert a point data with color to a OctreeNode.
Determine whether the point is within the space range of the specific cube.
K Nearest Neighbor Search in Octree.
K Nearest Neighbor Search in Octree.
Radius Nearest Neighbor Search in Octree.
Radius Nearest Neighbor Search in Octree.
Types
@type t() :: %Evision.Octree{ref: reference()}
Type that represents an Octree struct.
ref.
reference()The underlying erlang resource variable.
Functions
@spec clear(Keyword.t()) :: any() | {:error, String.t()}
@spec clear(t()) :: t() | {:error, String.t()}
Reset all octree parameter.
Positional Arguments
self:
Evision.Octree.t()Clear all the nodes of the octree and initialize the parameters.
Python prototype (for reference only):
clear() -> None
@spec createWithDepth(integer(), Evision.Mat.maybe_mat_in()) :: t() | {:error, String.t()}
@spec createWithDepth(integer(), number()) :: t() | {:error, String.t()}
Variant 1:
Create an Octree from the PointCloud data with the specific maxDepth
Positional Arguments
maxDepth:
integer().Max depth of the octree
pointCloud:
Evision.Mat.point cloud data, should be 3-channel float array
Keyword Arguments
colors:
Evision.Mat.color attribute of point cloud in the same 3-channel float format
Return
- retval:
Evision.Octree.t()
Has overloading in C++
@return resulting Octree
Python prototype (for reference only):
createWithDepth(maxDepth, pointCloud[, colors]) -> retvalVariant 2:
Creates an empty Octree with given maximum depth
Positional Arguments
maxDepth:
integer().The max depth of the Octree
size:
double.bounding box size for the Octree
Keyword Arguments
origin:
Point3f.Initial center coordinate
withColors:
bool.Whether to keep per-point colors or not
Return
- retval:
Evision.Octree.t()
Has overloading in C++
@return resulting Octree
Python prototype (for reference only):
createWithDepth(maxDepth, size[, origin[, withColors]]) -> retval
@spec createWithDepth( integer(), Evision.Mat.maybe_mat_in(), [{:colors, term()}] | nil ) :: t() | {:error, String.t()}
@spec createWithDepth(integer(), number(), [origin: term(), withColors: term()] | nil) :: t() | {:error, String.t()}
Variant 1:
Create an Octree from the PointCloud data with the specific maxDepth
Positional Arguments
maxDepth:
integer().Max depth of the octree
pointCloud:
Evision.Mat.point cloud data, should be 3-channel float array
Keyword Arguments
colors:
Evision.Mat.color attribute of point cloud in the same 3-channel float format
Return
- retval:
Evision.Octree.t()
Has overloading in C++
@return resulting Octree
Python prototype (for reference only):
createWithDepth(maxDepth, pointCloud[, colors]) -> retvalVariant 2:
Creates an empty Octree with given maximum depth
Positional Arguments
maxDepth:
integer().The max depth of the Octree
size:
double.bounding box size for the Octree
Keyword Arguments
origin:
Point3f.Initial center coordinate
withColors:
bool.Whether to keep per-point colors or not
Return
- retval:
Evision.Octree.t()
Has overloading in C++
@return resulting Octree
Python prototype (for reference only):
createWithDepth(maxDepth, size[, origin[, withColors]]) -> retval
@spec createWithResolution(number(), Evision.Mat.maybe_mat_in()) :: t() | {:error, String.t()}
@spec createWithResolution(number(), number()) :: t() | {:error, String.t()}
Variant 1:
Create an Octree from the PointCloud data with the specific resolution
Positional Arguments
resolution:
double.The size of the octree leaf node
pointCloud:
Evision.Mat.point cloud data, should be 3-channel float array
Keyword Arguments
colors:
Evision.Mat.color attribute of point cloud in the same 3-channel float format
Return
- retval:
Evision.Octree.t()
Has overloading in C++
@return resulting octree
Python prototype (for reference only):
createWithResolution(resolution, pointCloud[, colors]) -> retvalVariant 2:
Creates an empty Octree with given resolution
Positional Arguments
resolution:
double.The size of the octree leaf node
size:
double.bounding box size for the Octree
Keyword Arguments
origin:
Point3f.Initial center coordinate
withColors:
bool.Whether to keep per-point colors or not
Return
- retval:
Evision.Octree.t()
Has overloading in C++
@return resulting Octree
Python prototype (for reference only):
createWithResolution(resolution, size[, origin[, withColors]]) -> retval
@spec createWithResolution( number(), Evision.Mat.maybe_mat_in(), [{:colors, term()}] | nil ) :: t() | {:error, String.t()}
@spec createWithResolution( number(), number(), [origin: term(), withColors: term()] | nil ) :: t() | {:error, String.t()}
Variant 1:
Create an Octree from the PointCloud data with the specific resolution
Positional Arguments
resolution:
double.The size of the octree leaf node
pointCloud:
Evision.Mat.point cloud data, should be 3-channel float array
Keyword Arguments
colors:
Evision.Mat.color attribute of point cloud in the same 3-channel float format
Return
- retval:
Evision.Octree.t()
Has overloading in C++
@return resulting octree
Python prototype (for reference only):
createWithResolution(resolution, pointCloud[, colors]) -> retvalVariant 2:
Creates an empty Octree with given resolution
Positional Arguments
resolution:
double.The size of the octree leaf node
size:
double.bounding box size for the Octree
Keyword Arguments
origin:
Point3f.Initial center coordinate
withColors:
bool.Whether to keep per-point colors or not
Return
- retval:
Evision.Octree.t()
Has overloading in C++
@return resulting Octree
Python prototype (for reference only):
createWithResolution(resolution, size[, origin[, withColors]]) -> retval
Delete a given point from the Octree.
Positional Arguments
self:
Evision.Octree.t()point:
Point3f.The point coordinates, comparison is epsilon-based
Return
- retval:
bool
Delete the corresponding element from the pointList in the corresponding leaf node. If the leaf node does not contain other points after deletion, this node will be deleted. In the same way, its parent node may also be deleted if its last child is deleted. @return return ture if the point is deleted successfully.
Python prototype (for reference only):
deletePoint(point) -> retval
@spec empty(Keyword.t()) :: any() | {:error, String.t()}
@spec empty(t()) :: boolean() | {:error, String.t()}
empty
Positional Arguments
- self:
Evision.Octree.t()
Return
- retval:
bool
Python prototype (for reference only):
empty() -> retval
@spec getPointCloudByOctree(Keyword.t()) :: any() | {:error, String.t()}
@spec getPointCloudByOctree(t()) :: {Evision.Mat.t(), Evision.Mat.t()} | {:error, String.t()}
restore point cloud data from Octree.
Positional Arguments
- self:
Evision.Octree.t()
Return
restoredPointCloud:
Evision.Mat.t().The output point cloud data, can be replaced by noArray() if not needed
restoredColor:
Evision.Mat.t().The color attribute of point cloud data, can be omitted if not needed
Restore the point cloud data from existing octree. The points in same leaf node will be seen as the same point. This point is the center of the leaf node. If the resolution is small, it will work as a downSampling function.
Python prototype (for reference only):
getPointCloudByOctree([, restoredPointCloud[, restoredColor]]) -> restoredPointCloud, restoredColor
@spec getPointCloudByOctree(t(), [{atom(), term()}, ...] | nil) :: {Evision.Mat.t(), Evision.Mat.t()} | {:error, String.t()}
restore point cloud data from Octree.
Positional Arguments
- self:
Evision.Octree.t()
Return
restoredPointCloud:
Evision.Mat.t().The output point cloud data, can be replaced by noArray() if not needed
restoredColor:
Evision.Mat.t().The color attribute of point cloud data, can be omitted if not needed
Restore the point cloud data from existing octree. The points in same leaf node will be seen as the same point. This point is the center of the leaf node. If the resolution is small, it will work as a downSampling function.
Python prototype (for reference only):
getPointCloudByOctree([, restoredPointCloud[, restoredColor]]) -> restoredPointCloud, restoredColor
Insert a point data with color to a OctreeNode.
Positional Arguments
self:
Evision.Octree.t()point:
Point3f.The point data in Point3f format.
Keyword Arguments
color:
Point3f.The color attribute of point in Point3f format.
Return
- retval:
bool
Has overloading in C++
@return Returns whether the insertion is successful.
Python prototype (for reference only):
insertPoint(point[, color]) -> retval
@spec insertPoint(t(), {number(), number(), number()}, [{:color, term()}] | nil) :: boolean() | {:error, String.t()}
Insert a point data with color to a OctreeNode.
Positional Arguments
self:
Evision.Octree.t()point:
Point3f.The point data in Point3f format.
Keyword Arguments
color:
Point3f.The color attribute of point in Point3f format.
Return
- retval:
bool
Has overloading in C++
@return Returns whether the insertion is successful.
Python prototype (for reference only):
insertPoint(point[, color]) -> retval
Determine whether the point is within the space range of the specific cube.
Positional Arguments
self:
Evision.Octree.t()point:
Point3f.The point coordinates.
Return
- retval:
bool
@return If point is in bound, return ture. Otherwise, false.
Python prototype (for reference only):
isPointInBound(point) -> retval
@spec knnsearch(t(), {number(), number(), number()}, integer()) :: {Evision.Mat.t(), Evision.Mat.t(), Evision.Mat.t()} | {:error, String.t()}
K Nearest Neighbor Search in Octree.
Positional Arguments
self:
Evision.Octree.t()query:
Point3f.Query point.
k:
integer().amount of nearest neighbors to find
Return
points:
Evision.Mat.t().Point output. Contains K points in 3-float format, arranged in order of distance from near to far, can be replaced by noArray() if not needed
colors:
Evision.Mat.t().Color output. Contains colors corresponding to points in pointSet, can be replaced by noArray() if not needed
squareDists:
Evision.Mat.t().Dist output. Contains K squared distance in floats, arranged in order of distance from near to far, can be replaced by noArray() if not needed
Has overloading in C++
Find the K nearest neighbors to the query point.
Python prototype (for reference only):
KNNSearch(query, K[, points[, colors[, squareDists]]]) -> points, colors, squareDists
@spec knnsearch( t(), {number(), number(), number()}, integer(), [{atom(), term()}, ...] | nil ) :: {Evision.Mat.t(), Evision.Mat.t(), Evision.Mat.t()} | {:error, String.t()}
K Nearest Neighbor Search in Octree.
Positional Arguments
self:
Evision.Octree.t()query:
Point3f.Query point.
k:
integer().amount of nearest neighbors to find
Return
points:
Evision.Mat.t().Point output. Contains K points in 3-float format, arranged in order of distance from near to far, can be replaced by noArray() if not needed
colors:
Evision.Mat.t().Color output. Contains colors corresponding to points in pointSet, can be replaced by noArray() if not needed
squareDists:
Evision.Mat.t().Dist output. Contains K squared distance in floats, arranged in order of distance from near to far, can be replaced by noArray() if not needed
Has overloading in C++
Find the K nearest neighbors to the query point.
Python prototype (for reference only):
KNNSearch(query, K[, points[, colors[, squareDists]]]) -> points, colors, squareDists
@spec radiusNNSearch(t(), {number(), number(), number()}, number()) :: {integer(), Evision.Mat.t(), Evision.Mat.t(), Evision.Mat.t()} | {:error, String.t()}
Radius Nearest Neighbor Search in Octree.
Positional Arguments
self:
Evision.Octree.t()query:
Point3f.Query point.
radius:
float.Retrieved radius value.
Return
retval:
integer()points:
Evision.Mat.t().Point output. Contains searched points in 3-float format, and output vector is not in order, can be replaced by noArray() if not needed
colors:
Evision.Mat.t().Color output. Contains colors corresponding to points in pointSet, can be replaced by noArray() if not needed
squareDists:
Evision.Mat.t().Dist output. Contains searched squared distance in floats, and output vector is not in order, can be replaced by noArray() if not needed
Has overloading in C++
Search all points that are less than or equal to radius. And return the number of searched points. @return the number of searched points.
Python prototype (for reference only):
radiusNNSearch(query, radius[, points[, colors[, squareDists]]]) -> retval, points, colors, squareDists
@spec radiusNNSearch( t(), {number(), number(), number()}, number(), [{atom(), term()}, ...] | nil ) :: {integer(), Evision.Mat.t(), Evision.Mat.t(), Evision.Mat.t()} | {:error, String.t()}
Radius Nearest Neighbor Search in Octree.
Positional Arguments
self:
Evision.Octree.t()query:
Point3f.Query point.
radius:
float.Retrieved radius value.
Return
retval:
integer()points:
Evision.Mat.t().Point output. Contains searched points in 3-float format, and output vector is not in order, can be replaced by noArray() if not needed
colors:
Evision.Mat.t().Color output. Contains colors corresponding to points in pointSet, can be replaced by noArray() if not needed
squareDists:
Evision.Mat.t().Dist output. Contains searched squared distance in floats, and output vector is not in order, can be replaced by noArray() if not needed
Has overloading in C++
Search all points that are less than or equal to radius. And return the number of searched points. @return the number of searched points.
Python prototype (for reference only):
radiusNNSearch(query, radius[, points[, colors[, squareDists]]]) -> retval, points, colors, squareDists