OpenCV for Unity 3.0.4
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/5.0/index.html ) for the details of the argument of the method.
Loading...
Searching...
No Matches
OpenCVForUnity.PtcloudModule.Octree Class Reference

Octree for 3D vision. More...

Public Member Functions

void clear ()
 Reset all octree parameter.
 
bool deletePoint (in Vec3d point)
 Delete a given point from the Octree.
 
bool deletePoint (in(double x, double y, double z) point)
 Delete a given point from the Octree.
 
bool deletePoint (Point3 point)
 Delete a given point from the Octree.
 
bool empty ()
 
IntPtr getNativeObjAddr ()
 
void getPointCloudByOctree (Mat restoredPointCloud)
 restore point cloud data from Octree.
 
void getPointCloudByOctree (Mat restoredPointCloud, Mat restoredColor)
 restore point cloud data from Octree.
 
bool insertPoint (in Vec3d point)
 Insert a point data with color to a OctreeNode.
 
bool insertPoint (in Vec3d point, in Vec3d color)
 Insert a point data with color to a OctreeNode.
 
bool insertPoint (in(double x, double y, double z) point)
 Insert a point data with color to a OctreeNode.
 
bool insertPoint (in(double x, double y, double z) point, in(double x, double y, double z) color)
 Insert a point data with color to a OctreeNode.
 
bool insertPoint (Point3 point)
 Insert a point data with color to a OctreeNode.
 
bool insertPoint (Point3 point, Point3 color)
 Insert a point data with color to a OctreeNode.
 
bool isPointInBound (in Vec3d point)
 Determine whether the point is within the space range of the specific cube.
 
bool isPointInBound (in(double x, double y, double z) point)
 Determine whether the point is within the space range of the specific cube.
 
bool isPointInBound (Point3 point)
 Determine whether the point is within the space range of the specific cube.
 
void KNNSearch (in Vec3d query, int K, Mat points)
 K Nearest Neighbor Search in Octree.
 
void KNNSearch (in Vec3d query, int K, Mat points, Mat colors, Mat squareDists)
 K Nearest Neighbor Search in Octree.
 
void KNNSearch (in Vec3d query, int K, Mat points, Mat squareDists)
 K Nearest Neighbor Search in Octree.
 
void KNNSearch (in(double x, double y, double z) query, int K, Mat points)
 K Nearest Neighbor Search in Octree.
 
void KNNSearch (in(double x, double y, double z) query, int K, Mat points, Mat colors, Mat squareDists)
 K Nearest Neighbor Search in Octree.
 
void KNNSearch (in(double x, double y, double z) query, int K, Mat points, Mat squareDists)
 K Nearest Neighbor Search in Octree.
 
void KNNSearch (Point3 query, int K, Mat points)
 K Nearest Neighbor Search in Octree.
 
void KNNSearch (Point3 query, int K, Mat points, Mat colors, Mat squareDists)
 K Nearest Neighbor Search in Octree.
 
void KNNSearch (Point3 query, int K, Mat points, Mat squareDists)
 K Nearest Neighbor Search in Octree.
 
int radiusNNSearch (in Vec3d query, float radius, Mat points)
 Radius Nearest Neighbor Search in Octree.
 
int radiusNNSearch (in Vec3d query, float radius, Mat points, Mat colors, Mat squareDists)
 Radius Nearest Neighbor Search in Octree.
 
int radiusNNSearch (in Vec3d query, float radius, Mat points, Mat squareDists)
 Radius Nearest Neighbor Search in Octree.
 
int radiusNNSearch (in(double x, double y, double z) query, float radius, Mat points)
 Radius Nearest Neighbor Search in Octree.
 
int radiusNNSearch (in(double x, double y, double z) query, float radius, Mat points, Mat colors, Mat squareDists)
 Radius Nearest Neighbor Search in Octree.
 
int radiusNNSearch (in(double x, double y, double z) query, float radius, Mat points, Mat squareDists)
 Radius Nearest Neighbor Search in Octree.
 
int radiusNNSearch (Point3 query, float radius, Mat points)
 Radius Nearest Neighbor Search in Octree.
 
int radiusNNSearch (Point3 query, float radius, Mat points, Mat colors, Mat squareDists)
 Radius Nearest Neighbor Search in Octree.
 
int radiusNNSearch (Point3 query, float radius, Mat points, Mat squareDists)
 Radius Nearest Neighbor Search in Octree.
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 Releases resources used by this object.
 
void ThrowIfDisposed ()
 Throws ObjectDisposedException if this object has been disposed.
 

Static Public Member Functions

static Octree __fromPtr__ (IntPtr addr)
 
static Octree createWithDepth (int maxDepth, double size)
 Creates an empty Octree with given maximum depth.
 
static Octree createWithDepth (int maxDepth, double size, in Vec3d origin)
 Creates an empty Octree with given maximum depth.
 
static Octree createWithDepth (int maxDepth, double size, in Vec3d origin, bool withColors)
 Creates an empty Octree with given maximum depth.
 
static Octree createWithDepth (int maxDepth, double size, in(double x, double y, double z) origin)
 Creates an empty Octree with given maximum depth.
 
static Octree createWithDepth (int maxDepth, double size, in(double x, double y, double z) origin, bool withColors)
 Creates an empty Octree with given maximum depth.
 
static Octree createWithDepth (int maxDepth, double size, Point3 origin)
 Creates an empty Octree with given maximum depth.
 
static Octree createWithDepth (int maxDepth, double size, Point3 origin, bool withColors)
 Creates an empty Octree with given maximum depth.
 
static Octree createWithDepth (int maxDepth, Mat pointCloud)
 Create an Octree from the PointCloud data with the specific maxDepth.
 
static Octree createWithDepth (int maxDepth, Mat pointCloud, Mat colors)
 Create an Octree from the PointCloud data with the specific maxDepth.
 
static Octree createWithResolution (double resolution, double size)
 Creates an empty Octree with given resolution.
 
static Octree createWithResolution (double resolution, double size, in Vec3d origin)
 Creates an empty Octree with given resolution.
 
static Octree createWithResolution (double resolution, double size, in Vec3d origin, bool withColors)
 Creates an empty Octree with given resolution.
 
static Octree createWithResolution (double resolution, double size, in(double x, double y, double z) origin)
 Creates an empty Octree with given resolution.
 
static Octree createWithResolution (double resolution, double size, in(double x, double y, double z) origin, bool withColors)
 Creates an empty Octree with given resolution.
 
static Octree createWithResolution (double resolution, double size, Point3 origin)
 Creates an empty Octree with given resolution.
 
static Octree createWithResolution (double resolution, double size, Point3 origin, bool withColors)
 Creates an empty Octree with given resolution.
 
static Octree createWithResolution (double resolution, Mat pointCloud)
 Create an Octree from the PointCloud data with the specific resolution.
 
static Octree createWithResolution (double resolution, Mat pointCloud, Mat colors)
 Create an Octree from the PointCloud data with the specific resolution.
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 Returns the native pointer, or throws CoreModule.CvException if it is zero.
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject
 DisposableOpenCVObject ()
 Initializes a new instance with a zero native pointer and dispose enabled.
 
 DisposableOpenCVObject (bool isEnabledDispose)
 Initializes a new instance with a zero native pointer.
 
 DisposableOpenCVObject (IntPtr ptr)
 Initializes a new instance with the specified native pointer and dispose enabled.
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 Initializes a new instance with the specified native pointer.
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 Initializes a new instance with dispose enabled.
 
 DisposableObject (bool isEnabledDispose)
 Initializes a new instance.
 

Additional Inherited Members

- Package Attributes inherited from OpenCVForUnity.DisposableOpenCVObject
- Properties inherited from OpenCVForUnity.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Detailed Description

Octree for 3D vision.

In 3D vision filed, the Octree is used to process and accelerate the pointcloud data. The class Octree represents the Octree data structure. Each Octree will have a fixed depth. The depth of Octree refers to the distance from the root node to the leaf node.All OctreeNodes will not exceed this depth.Increasing the depth will increase the amount of calculation exponentially. And the small number of depth refers low resolution of Octree. Each node contains 8 children, which are used to divide the space cube into eight parts. Each octree node represents a cube. And these eight children will have a fixed order, the order is described as follows:

For illustration, assume,

rootNode: origin == (0, 0, 0), size == 2

Then,

children[0]: origin == (0, 0, 0), size == 1

children[1]: origin == (1, 0, 0), size == 1, along X-axis next to child 0

children[2]: origin == (0, 1, 0), size == 1, along Y-axis next to child 0

children[3]: origin == (1, 1, 0), size == 1, in X-Y plane

children[4]: origin == (0, 0, 1), size == 1, along Z-axis next to child 0

children[5]: origin == (1, 0, 1), size == 1, in X-Z plane

children[6]: origin == (0, 1, 1), size == 1, in Y-Z plane

children[7]: origin == (1, 1, 1), size == 1, furthest from child 0

Member Function Documentation

◆ __fromPtr__()

static Octree OpenCVForUnity.PtcloudModule.Octree.__fromPtr__ ( IntPtr addr)
static

◆ clear()

void OpenCVForUnity.PtcloudModule.Octree.clear ( )

Reset all octree parameter.

Clear all the nodes of the octree and initialize the parameters.

◆ createWithDepth() [1/9]

static Octree OpenCVForUnity.PtcloudModule.Octree.createWithDepth ( int maxDepth,
double size )
static

Creates an empty Octree with given maximum depth.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
maxDepthThe max depth of the Octree
sizebounding box size for the Octree
originInitial center coordinate
withColorsWhether to keep per-point colors or not
Returns
resulting Octree

◆ createWithDepth() [2/9]

static Octree OpenCVForUnity.PtcloudModule.Octree.createWithDepth ( int maxDepth,
double size,
in Vec3d origin )
static

Creates an empty Octree with given maximum depth.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
maxDepthThe max depth of the Octree
sizebounding box size for the Octree
originInitial center coordinate
withColorsWhether to keep per-point colors or not
Returns
resulting Octree

◆ createWithDepth() [3/9]

static Octree OpenCVForUnity.PtcloudModule.Octree.createWithDepth ( int maxDepth,
double size,
in Vec3d origin,
bool withColors )
static

Creates an empty Octree with given maximum depth.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
maxDepthThe max depth of the Octree
sizebounding box size for the Octree
originInitial center coordinate
withColorsWhether to keep per-point colors or not
Returns
resulting Octree

◆ createWithDepth() [4/9]

static Octree OpenCVForUnity.PtcloudModule.Octree.createWithDepth ( int maxDepth,
double size,
in(double x, double y, double z) origin )
static

Creates an empty Octree with given maximum depth.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
maxDepthThe max depth of the Octree
sizebounding box size for the Octree
originInitial center coordinate
withColorsWhether to keep per-point colors or not
Returns
resulting Octree

◆ createWithDepth() [5/9]

static Octree OpenCVForUnity.PtcloudModule.Octree.createWithDepth ( int maxDepth,
double size,
in(double x, double y, double z) origin,
bool withColors )
static

Creates an empty Octree with given maximum depth.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
maxDepthThe max depth of the Octree
sizebounding box size for the Octree
originInitial center coordinate
withColorsWhether to keep per-point colors or not
Returns
resulting Octree

◆ createWithDepth() [6/9]

static Octree OpenCVForUnity.PtcloudModule.Octree.createWithDepth ( int maxDepth,
double size,
Point3 origin )
static

Creates an empty Octree with given maximum depth.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
maxDepthThe max depth of the Octree
sizebounding box size for the Octree
originInitial center coordinate
withColorsWhether to keep per-point colors or not
Returns
resulting Octree

◆ createWithDepth() [7/9]

static Octree OpenCVForUnity.PtcloudModule.Octree.createWithDepth ( int maxDepth,
double size,
Point3 origin,
bool withColors )
static

Creates an empty Octree with given maximum depth.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
maxDepthThe max depth of the Octree
sizebounding box size for the Octree
originInitial center coordinate
withColorsWhether to keep per-point colors or not
Returns
resulting Octree

◆ createWithDepth() [8/9]

static Octree OpenCVForUnity.PtcloudModule.Octree.createWithDepth ( int maxDepth,
Mat pointCloud )
static

Create an Octree from the PointCloud data with the specific maxDepth.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
maxDepthMax depth of the octree
pointCloudpoint cloud data, should be 3-channel float array
colorscolor attribute of point cloud in the same 3-channel float format
Returns
resulting Octree

◆ createWithDepth() [9/9]

static Octree OpenCVForUnity.PtcloudModule.Octree.createWithDepth ( int maxDepth,
Mat pointCloud,
Mat colors )
static

Create an Octree from the PointCloud data with the specific maxDepth.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
maxDepthMax depth of the octree
pointCloudpoint cloud data, should be 3-channel float array
colorscolor attribute of point cloud in the same 3-channel float format
Returns
resulting Octree

◆ createWithResolution() [1/9]

static Octree OpenCVForUnity.PtcloudModule.Octree.createWithResolution ( double resolution,
double size )
static

Creates an empty Octree with given resolution.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
resolutionThe size of the octree leaf node
sizebounding box size for the Octree
originInitial center coordinate
withColorsWhether to keep per-point colors or not
Returns
resulting Octree

◆ createWithResolution() [2/9]

static Octree OpenCVForUnity.PtcloudModule.Octree.createWithResolution ( double resolution,
double size,
in Vec3d origin )
static

Creates an empty Octree with given resolution.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
resolutionThe size of the octree leaf node
sizebounding box size for the Octree
originInitial center coordinate
withColorsWhether to keep per-point colors or not
Returns
resulting Octree

◆ createWithResolution() [3/9]

static Octree OpenCVForUnity.PtcloudModule.Octree.createWithResolution ( double resolution,
double size,
in Vec3d origin,
bool withColors )
static

Creates an empty Octree with given resolution.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
resolutionThe size of the octree leaf node
sizebounding box size for the Octree
originInitial center coordinate
withColorsWhether to keep per-point colors or not
Returns
resulting Octree

◆ createWithResolution() [4/9]

static Octree OpenCVForUnity.PtcloudModule.Octree.createWithResolution ( double resolution,
double size,
in(double x, double y, double z) origin )
static

Creates an empty Octree with given resolution.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
resolutionThe size of the octree leaf node
sizebounding box size for the Octree
originInitial center coordinate
withColorsWhether to keep per-point colors or not
Returns
resulting Octree

◆ createWithResolution() [5/9]

static Octree OpenCVForUnity.PtcloudModule.Octree.createWithResolution ( double resolution,
double size,
in(double x, double y, double z) origin,
bool withColors )
static

Creates an empty Octree with given resolution.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
resolutionThe size of the octree leaf node
sizebounding box size for the Octree
originInitial center coordinate
withColorsWhether to keep per-point colors or not
Returns
resulting Octree

◆ createWithResolution() [6/9]

static Octree OpenCVForUnity.PtcloudModule.Octree.createWithResolution ( double resolution,
double size,
Point3 origin )
static

Creates an empty Octree with given resolution.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
resolutionThe size of the octree leaf node
sizebounding box size for the Octree
originInitial center coordinate
withColorsWhether to keep per-point colors or not
Returns
resulting Octree

◆ createWithResolution() [7/9]

static Octree OpenCVForUnity.PtcloudModule.Octree.createWithResolution ( double resolution,
double size,
Point3 origin,
bool withColors )
static

Creates an empty Octree with given resolution.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
resolutionThe size of the octree leaf node
sizebounding box size for the Octree
originInitial center coordinate
withColorsWhether to keep per-point colors or not
Returns
resulting Octree

◆ createWithResolution() [8/9]

static Octree OpenCVForUnity.PtcloudModule.Octree.createWithResolution ( double resolution,
Mat pointCloud )
static

Create an Octree from the PointCloud data with the specific resolution.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
resolutionThe size of the octree leaf node
pointCloudpoint cloud data, should be 3-channel float array
colorscolor attribute of point cloud in the same 3-channel float format
Returns
resulting octree

◆ createWithResolution() [9/9]

static Octree OpenCVForUnity.PtcloudModule.Octree.createWithResolution ( double resolution,
Mat pointCloud,
Mat colors )
static

Create an Octree from the PointCloud data with the specific resolution.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
resolutionThe size of the octree leaf node
pointCloudpoint cloud data, should be 3-channel float array
colorscolor attribute of point cloud in the same 3-channel float format
Returns
resulting octree

◆ deletePoint() [1/3]

bool OpenCVForUnity.PtcloudModule.Octree.deletePoint ( in Vec3d point)

Delete a given point from the Octree.

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.

Parameters
pointThe point coordinates, comparison is epsilon-based
Returns
return ture if the point is deleted successfully.

◆ deletePoint() [2/3]

bool OpenCVForUnity.PtcloudModule.Octree.deletePoint ( in(double x, double y, double z) point)

Delete a given point from the Octree.

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.

Parameters
pointThe point coordinates, comparison is epsilon-based
Returns
return ture if the point is deleted successfully.

◆ deletePoint() [3/3]

bool OpenCVForUnity.PtcloudModule.Octree.deletePoint ( Point3 point)

Delete a given point from the Octree.

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.

Parameters
pointThe point coordinates, comparison is epsilon-based
Returns
return ture if the point is deleted successfully.

◆ Dispose()

override void OpenCVForUnity.PtcloudModule.Octree.Dispose ( bool disposing)
protectedvirtual

◆ empty()

bool OpenCVForUnity.PtcloudModule.Octree.empty ( )

◆ getNativeObjAddr()

IntPtr OpenCVForUnity.PtcloudModule.Octree.getNativeObjAddr ( )

◆ getPointCloudByOctree() [1/2]

void OpenCVForUnity.PtcloudModule.Octree.getPointCloudByOctree ( Mat restoredPointCloud)

restore point cloud data from Octree.

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.

Parameters
restoredPointCloudThe output point cloud data, can be replaced by noArray() if not needed
restoredColorThe color attribute of point cloud data, can be omitted if not needed

◆ getPointCloudByOctree() [2/2]

void OpenCVForUnity.PtcloudModule.Octree.getPointCloudByOctree ( Mat restoredPointCloud,
Mat restoredColor )

restore point cloud data from Octree.

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.

Parameters
restoredPointCloudThe output point cloud data, can be replaced by noArray() if not needed
restoredColorThe color attribute of point cloud data, can be omitted if not needed

◆ insertPoint() [1/6]

bool OpenCVForUnity.PtcloudModule.Octree.insertPoint ( in Vec3d point)

Insert a point data with color to a OctreeNode.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
pointThe point data in Point3f format.
colorThe color attribute of point in Point3f format.
Returns
Returns whether the insertion is successful.

◆ insertPoint() [2/6]

bool OpenCVForUnity.PtcloudModule.Octree.insertPoint ( in Vec3d point,
in Vec3d color )

Insert a point data with color to a OctreeNode.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
pointThe point data in Point3f format.
colorThe color attribute of point in Point3f format.
Returns
Returns whether the insertion is successful.

◆ insertPoint() [3/6]

bool OpenCVForUnity.PtcloudModule.Octree.insertPoint ( in(double x, double y, double z) point)

Insert a point data with color to a OctreeNode.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
pointThe point data in Point3f format.
colorThe color attribute of point in Point3f format.
Returns
Returns whether the insertion is successful.

◆ insertPoint() [4/6]

bool OpenCVForUnity.PtcloudModule.Octree.insertPoint ( in(double x, double y, double z) point,
in(double x, double y, double z) color )

Insert a point data with color to a OctreeNode.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
pointThe point data in Point3f format.
colorThe color attribute of point in Point3f format.
Returns
Returns whether the insertion is successful.

◆ insertPoint() [5/6]

bool OpenCVForUnity.PtcloudModule.Octree.insertPoint ( Point3 point)

Insert a point data with color to a OctreeNode.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
pointThe point data in Point3f format.
colorThe color attribute of point in Point3f format.
Returns
Returns whether the insertion is successful.

◆ insertPoint() [6/6]

bool OpenCVForUnity.PtcloudModule.Octree.insertPoint ( Point3 point,
Point3 color )

Insert a point data with color to a OctreeNode.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
pointThe point data in Point3f format.
colorThe color attribute of point in Point3f format.
Returns
Returns whether the insertion is successful.

◆ isPointInBound() [1/3]

bool OpenCVForUnity.PtcloudModule.Octree.isPointInBound ( in Vec3d point)

Determine whether the point is within the space range of the specific cube.

Parameters
pointThe point coordinates.
Returns
If point is in bound, return ture. Otherwise, false.

◆ isPointInBound() [2/3]

bool OpenCVForUnity.PtcloudModule.Octree.isPointInBound ( in(double x, double y, double z) point)

Determine whether the point is within the space range of the specific cube.

Parameters
pointThe point coordinates.
Returns
If point is in bound, return ture. Otherwise, false.

◆ isPointInBound() [3/3]

bool OpenCVForUnity.PtcloudModule.Octree.isPointInBound ( Point3 point)

Determine whether the point is within the space range of the specific cube.

Parameters
pointThe point coordinates.
Returns
If point is in bound, return ture. Otherwise, false.

◆ KNNSearch() [1/9]

void OpenCVForUnity.PtcloudModule.Octree.KNNSearch ( in Vec3d query,
int K,
Mat points )

K Nearest Neighbor Search in Octree.

Find the K nearest neighbors to the query point.

Parameters
queryQuery point.
Kamount of nearest neighbors to find
pointsPoint 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
squareDistsDist output. Contains K squared distance in floats, arranged in order of distance from near to far, can be omitted if not needed

◆ KNNSearch() [2/9]

void OpenCVForUnity.PtcloudModule.Octree.KNNSearch ( in Vec3d query,
int K,
Mat points,
Mat colors,
Mat squareDists )

K Nearest Neighbor Search in Octree.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Find the K nearest neighbors to the query point.

Parameters
queryQuery point.
Kamount of nearest neighbors to find
pointsPoint 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
colorsColor output. Contains colors corresponding to points in pointSet, can be replaced by noArray() if not needed
squareDistsDist output. Contains K squared distance in floats, arranged in order of distance from near to far, can be replaced by noArray() if not needed

◆ KNNSearch() [3/9]

void OpenCVForUnity.PtcloudModule.Octree.KNNSearch ( in Vec3d query,
int K,
Mat points,
Mat squareDists )

K Nearest Neighbor Search in Octree.

Find the K nearest neighbors to the query point.

Parameters
queryQuery point.
Kamount of nearest neighbors to find
pointsPoint 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
squareDistsDist output. Contains K squared distance in floats, arranged in order of distance from near to far, can be omitted if not needed

◆ KNNSearch() [4/9]

void OpenCVForUnity.PtcloudModule.Octree.KNNSearch ( in(double x, double y, double z) query,
int K,
Mat points )

K Nearest Neighbor Search in Octree.

Find the K nearest neighbors to the query point.

Parameters
queryQuery point.
Kamount of nearest neighbors to find
pointsPoint 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
squareDistsDist output. Contains K squared distance in floats, arranged in order of distance from near to far, can be omitted if not needed

◆ KNNSearch() [5/9]

void OpenCVForUnity.PtcloudModule.Octree.KNNSearch ( in(double x, double y, double z) query,
int K,
Mat points,
Mat colors,
Mat squareDists )

K Nearest Neighbor Search in Octree.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Find the K nearest neighbors to the query point.

Parameters
queryQuery point.
Kamount of nearest neighbors to find
pointsPoint 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
colorsColor output. Contains colors corresponding to points in pointSet, can be replaced by noArray() if not needed
squareDistsDist output. Contains K squared distance in floats, arranged in order of distance from near to far, can be replaced by noArray() if not needed

◆ KNNSearch() [6/9]

void OpenCVForUnity.PtcloudModule.Octree.KNNSearch ( in(double x, double y, double z) query,
int K,
Mat points,
Mat squareDists )

K Nearest Neighbor Search in Octree.

Find the K nearest neighbors to the query point.

Parameters
queryQuery point.
Kamount of nearest neighbors to find
pointsPoint 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
squareDistsDist output. Contains K squared distance in floats, arranged in order of distance from near to far, can be omitted if not needed

◆ KNNSearch() [7/9]

void OpenCVForUnity.PtcloudModule.Octree.KNNSearch ( Point3 query,
int K,
Mat points )

K Nearest Neighbor Search in Octree.

Find the K nearest neighbors to the query point.

Parameters
queryQuery point.
Kamount of nearest neighbors to find
pointsPoint 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
squareDistsDist output. Contains K squared distance in floats, arranged in order of distance from near to far, can be omitted if not needed

◆ KNNSearch() [8/9]

void OpenCVForUnity.PtcloudModule.Octree.KNNSearch ( Point3 query,
int K,
Mat points,
Mat colors,
Mat squareDists )

K Nearest Neighbor Search in Octree.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Find the K nearest neighbors to the query point.

Parameters
queryQuery point.
Kamount of nearest neighbors to find
pointsPoint 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
colorsColor output. Contains colors corresponding to points in pointSet, can be replaced by noArray() if not needed
squareDistsDist output. Contains K squared distance in floats, arranged in order of distance from near to far, can be replaced by noArray() if not needed

◆ KNNSearch() [9/9]

void OpenCVForUnity.PtcloudModule.Octree.KNNSearch ( Point3 query,
int K,
Mat points,
Mat squareDists )

K Nearest Neighbor Search in Octree.

Find the K nearest neighbors to the query point.

Parameters
queryQuery point.
Kamount of nearest neighbors to find
pointsPoint 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
squareDistsDist output. Contains K squared distance in floats, arranged in order of distance from near to far, can be omitted if not needed

◆ radiusNNSearch() [1/9]

int OpenCVForUnity.PtcloudModule.Octree.radiusNNSearch ( in Vec3d query,
float radius,
Mat points )

Radius Nearest Neighbor Search in Octree.

Search all points that are less than or equal to radius. And return the number of searched points.

Parameters
queryQuery point.
radiusRetrieved radius value.
pointsPoint output. Contains searched points in 3-float format, and output vector is not in order, can be replaced by noArray() if not needed
squareDistsDist output. Contains searched squared distance in floats, and output vector is not in order, can be omitted if not needed
Returns
the number of searched points.

◆ radiusNNSearch() [2/9]

int OpenCVForUnity.PtcloudModule.Octree.radiusNNSearch ( in Vec3d query,
float radius,
Mat points,
Mat colors,
Mat squareDists )

Radius Nearest Neighbor Search in Octree.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Search all points that are less than or equal to radius. And return the number of searched points.

Parameters
queryQuery point.
radiusRetrieved radius value.
pointsPoint output. Contains searched points in 3-float format, and output vector is not in order, can be replaced by noArray() if not needed
colorsColor output. Contains colors corresponding to points in pointSet, can be replaced by noArray() if not needed
squareDistsDist output. Contains searched squared distance in floats, and output vector is not in order, can be replaced by noArray() if not needed
Returns
the number of searched points.

◆ radiusNNSearch() [3/9]

int OpenCVForUnity.PtcloudModule.Octree.radiusNNSearch ( in Vec3d query,
float radius,
Mat points,
Mat squareDists )

Radius Nearest Neighbor Search in Octree.

Search all points that are less than or equal to radius. And return the number of searched points.

Parameters
queryQuery point.
radiusRetrieved radius value.
pointsPoint output. Contains searched points in 3-float format, and output vector is not in order, can be replaced by noArray() if not needed
squareDistsDist output. Contains searched squared distance in floats, and output vector is not in order, can be omitted if not needed
Returns
the number of searched points.

◆ radiusNNSearch() [4/9]

int OpenCVForUnity.PtcloudModule.Octree.radiusNNSearch ( in(double x, double y, double z) query,
float radius,
Mat points )

Radius Nearest Neighbor Search in Octree.

Search all points that are less than or equal to radius. And return the number of searched points.

Parameters
queryQuery point.
radiusRetrieved radius value.
pointsPoint output. Contains searched points in 3-float format, and output vector is not in order, can be replaced by noArray() if not needed
squareDistsDist output. Contains searched squared distance in floats, and output vector is not in order, can be omitted if not needed
Returns
the number of searched points.

◆ radiusNNSearch() [5/9]

int OpenCVForUnity.PtcloudModule.Octree.radiusNNSearch ( in(double x, double y, double z) query,
float radius,
Mat points,
Mat colors,
Mat squareDists )

Radius Nearest Neighbor Search in Octree.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Search all points that are less than or equal to radius. And return the number of searched points.

Parameters
queryQuery point.
radiusRetrieved radius value.
pointsPoint output. Contains searched points in 3-float format, and output vector is not in order, can be replaced by noArray() if not needed
colorsColor output. Contains colors corresponding to points in pointSet, can be replaced by noArray() if not needed
squareDistsDist output. Contains searched squared distance in floats, and output vector is not in order, can be replaced by noArray() if not needed
Returns
the number of searched points.

◆ radiusNNSearch() [6/9]

int OpenCVForUnity.PtcloudModule.Octree.radiusNNSearch ( in(double x, double y, double z) query,
float radius,
Mat points,
Mat squareDists )

Radius Nearest Neighbor Search in Octree.

Search all points that are less than or equal to radius. And return the number of searched points.

Parameters
queryQuery point.
radiusRetrieved radius value.
pointsPoint output. Contains searched points in 3-float format, and output vector is not in order, can be replaced by noArray() if not needed
squareDistsDist output. Contains searched squared distance in floats, and output vector is not in order, can be omitted if not needed
Returns
the number of searched points.

◆ radiusNNSearch() [7/9]

int OpenCVForUnity.PtcloudModule.Octree.radiusNNSearch ( Point3 query,
float radius,
Mat points )

Radius Nearest Neighbor Search in Octree.

Search all points that are less than or equal to radius. And return the number of searched points.

Parameters
queryQuery point.
radiusRetrieved radius value.
pointsPoint output. Contains searched points in 3-float format, and output vector is not in order, can be replaced by noArray() if not needed
squareDistsDist output. Contains searched squared distance in floats, and output vector is not in order, can be omitted if not needed
Returns
the number of searched points.

◆ radiusNNSearch() [8/9]

int OpenCVForUnity.PtcloudModule.Octree.radiusNNSearch ( Point3 query,
float radius,
Mat points,
Mat colors,
Mat squareDists )

Radius Nearest Neighbor Search in Octree.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Search all points that are less than or equal to radius. And return the number of searched points.

Parameters
queryQuery point.
radiusRetrieved radius value.
pointsPoint output. Contains searched points in 3-float format, and output vector is not in order, can be replaced by noArray() if not needed
colorsColor output. Contains colors corresponding to points in pointSet, can be replaced by noArray() if not needed
squareDistsDist output. Contains searched squared distance in floats, and output vector is not in order, can be replaced by noArray() if not needed
Returns
the number of searched points.

◆ radiusNNSearch() [9/9]

int OpenCVForUnity.PtcloudModule.Octree.radiusNNSearch ( Point3 query,
float radius,
Mat points,
Mat squareDists )

Radius Nearest Neighbor Search in Octree.

Search all points that are less than or equal to radius. And return the number of searched points.

Parameters
queryQuery point.
radiusRetrieved radius value.
pointsPoint output. Contains searched points in 3-float format, and output vector is not in order, can be replaced by noArray() if not needed
squareDistsDist output. Contains searched squared distance in floats, and output vector is not in order, can be omitted if not needed
Returns
the number of searched points.

The documentation for this class was generated from the following files: