🤖 AIによる機械翻訳(非公式) — これは OpenCV 5.0.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
Package org.opencv.ptcloud
クラス Octree
- java.lang.Object
-
- org.opencv.ptcloud.Octree
public class Octree extends java.lang.Object3Dビジョン用のOctree。3Dビジョン分野では、Octreeはポイントクラウドデータの処理と高速化に利用される。Octreeクラスは八分木(Octree)データ構造を表す。各Octreeは固定の深さを持つ。Octreeの深さとは、ルートノードからリーフノードまでの距離を指す。すべてのOctreeNodeはこの深さを超えない。深さを増やすと計算量が指数関数的に増加する。深さが小さいとOctreeの解像度が低くなる。各ノードは8つの子を持ち、空間の立方体を8つの部分に分割するために使用される。各octreeノードは1つの立方体を表す。これら8つの子は固定の順序を持ち、その順序は次のとおりである。説明のため、rootNode: origin == (0, 0, 0), size == 2 と仮定する。このとき、children[0]: origin == (0, 0, 0), size == 1 children[1]: origin == (1, 0, 0), size == 1(X軸に沿って子0の隣) children[2]: origin == (0, 1, 0), size == 1(Y軸に沿って子0の隣) children[3]: origin == (1, 1, 0), size == 1(X-Y平面上) children[4]: origin == (0, 0, 1), size == 1(Z軸に沿って子0の隣) children[5]: origin == (1, 0, 1), size == 1(X-Z平面上) children[6]: origin == (0, 1, 1), size == 1(Y-Z平面上) children[7]: origin == (1, 1, 1), size == 1(子0から最も遠い)
-
-
フィールドの要約
フィールド Modifier and Type Field Description protected longnativeObj
-
コンストラクタの要約
コンストラクタ Modifier Constructor Description protectedOctree​(long addr)
-
メソッドの要約
すべてのメソッド 静的メソッド インスタンスメソッド 具象メソッド Modifier and Type Method Description static Octree__fromPtr__​(long addr)voidclear()Reset all octree parameter.static OctreecreateWithDepth​(int maxDepth, double size)Creates an empty Octree with given maximum depthstatic OctreecreateWithDepth​(int maxDepth, double size, Point3 origin)Creates an empty Octree with given maximum depthstatic OctreecreateWithDepth​(int maxDepth, double size, Point3 origin, boolean withColors)Creates an empty Octree with given maximum depthstatic OctreecreateWithDepth​(int maxDepth, Mat pointCloud)Create an Octree from the PointCloud data with the specific maxDepthstatic OctreecreateWithDepth​(int maxDepth, Mat pointCloud, Mat colors)Create an Octree from the PointCloud data with the specific maxDepthstatic OctreecreateWithResolution​(double resolution, double size)Creates an empty Octree with given resolutionstatic OctreecreateWithResolution​(double resolution, double size, Point3 origin)Creates an empty Octree with given resolutionstatic OctreecreateWithResolution​(double resolution, double size, Point3 origin, boolean withColors)Creates an empty Octree with given resolutionstatic OctreecreateWithResolution​(double resolution, Mat pointCloud)Create an Octree from the PointCloud data with the specific resolutionstatic OctreecreateWithResolution​(double resolution, Mat pointCloud, Mat colors)Create an Octree from the PointCloud data with the specific resolutionbooleandeletePoint​(Point3 point)Delete a given point from the Octree.booleanempty()longgetNativeObjAddr()voidgetPointCloudByOctree​(Mat restoredPointCloud)restore point cloud data from Octree.voidgetPointCloudByOctree​(Mat restoredPointCloud, Mat restoredColor)restore point cloud data from Octree.booleaninsertPoint​(Point3 point)Insert a point data with color to a OctreeNode.booleaninsertPoint​(Point3 point, Point3 color)Insert a point data with color to a OctreeNode.booleanisPointInBound​(Point3 point)Determine whether the point is within the space range of the specific cube.voidKNNSearch​(Point3 query, int K, Mat points)K Nearest Neighbor Search in Octree.voidKNNSearch​(Point3 query, int K, Mat points, Mat squareDists)K Nearest Neighbor Search in Octree.voidKNNSearch​(Point3 query, int K, Mat points, Mat colors, Mat squareDists)K Nearest Neighbor Search in Octree.intradiusNNSearch​(Point3 query, float radius, Mat points)Radius Nearest Neighbor Search in Octree.intradiusNNSearch​(Point3 query, float radius, Mat points, Mat squareDists)Radius Nearest Neighbor Search in Octree.intradiusNNSearch​(Point3 query, float radius, Mat points, Mat colors, Mat squareDists)Radius Nearest Neighbor Search in Octree.
-
-
-
メソッドの詳細
-
getNativeObjAddr
public long getNativeObjAddr()
-
__fromPtr__
public static Octree __fromPtr__​(long addr)
-
createWithDepth
public static Octree createWithDepth​(int maxDepth, double size, Point3 origin, boolean withColors)
Creates an empty Octree with given maximum depth- 引数:
maxDepth- Octreeの最大深さsize- Octreeのバウンディングボックスのサイズorigin- 初期中心座標withColors- 点ごとの色を保持するかどうか- 戻り値:
- 生成されたOctree
-
createWithDepth
public static Octree createWithDepth​(int maxDepth, double size, Point3 origin)
Creates an empty Octree with given maximum depth- 引数:
maxDepth- Octreeの最大深さsize- Octreeのバウンディングボックスのサイズorigin- 初期中心座標- 戻り値:
- 生成されたOctree
-
createWithDepth
public static Octree createWithDepth​(int maxDepth, double size)
Creates an empty Octree with given maximum depth- 引数:
maxDepth- Octreeの最大深さsize- Octreeのバウンディングボックスのサイズ- 戻り値:
- 生成されたOctree
-
createWithDepth
public static Octree createWithDepth​(int maxDepth, Mat pointCloud, Mat colors)
Create an Octree from the PointCloud data with the specific maxDepth- 引数:
maxDepth- octreeの最大深さpointCloud- ポイントクラウドデータ。3チャンネルのfloat配列であることcolors- ポイントクラウドの色属性。同じ3チャンネルのfloat形式であること- 戻り値:
- 生成されたOctree
-
createWithDepth
public static Octree createWithDepth​(int maxDepth, Mat pointCloud)
Create an Octree from the PointCloud data with the specific maxDepth- 引数:
maxDepth- octreeの最大深さpointCloud- ポイントクラウドデータ。3チャンネルのfloat配列であること- 戻り値:
- 生成されたOctree
-
createWithResolution
public static Octree createWithResolution​(double resolution, double size, Point3 origin, boolean withColors)
Creates an empty Octree with given resolution- 引数:
resolution- octreeリーフノードのサイズsize- Octreeのバウンディングボックスのサイズorigin- 初期中心座標withColors- 点ごとの色を保持するかどうか- 戻り値:
- 生成されたOctree
-
createWithResolution
public static Octree createWithResolution​(double resolution, double size, Point3 origin)
Creates an empty Octree with given resolution- 引数:
resolution- octreeリーフノードのサイズsize- Octreeのバウンディングボックスのサイズorigin- 初期中心座標- 戻り値:
- 生成されたOctree
-
createWithResolution
public static Octree createWithResolution​(double resolution, double size)
Creates an empty Octree with given resolution- 引数:
resolution- octreeリーフノードのサイズsize- Octreeのバウンディングボックスのサイズ- 戻り値:
- 生成されたOctree
-
createWithResolution
public static Octree createWithResolution​(double resolution, Mat pointCloud, Mat colors)
Create an Octree from the PointCloud data with the specific resolution- 引数:
resolution- octreeリーフノードのサイズpointCloud- ポイントクラウドデータ。3チャンネルのfloat配列であることcolors- ポイントクラウドの色属性。同じ3チャンネルのfloat形式であること- 戻り値:
- 生成されるオクツリー
-
createWithResolution
public static Octree createWithResolution​(double resolution, Mat pointCloud)
Create an Octree from the PointCloud data with the specific resolution- 引数:
resolution- octreeリーフノードのサイズpointCloud- ポイントクラウドデータ。3チャンネルのfloat配列であること- 戻り値:
- 生成されるオクツリー
-
insertPoint
public boolean insertPoint​(Point3 point, Point3 color)
Insert a point data with color to a OctreeNode.- 引数:
point- Point3f形式の点データ。color- Point3f形式の点の色属性。- 戻り値:
- 挿入が成功したかどうかを返す。
-
insertPoint
public boolean insertPoint​(Point3 point)
Insert a point data with color to a OctreeNode.- 引数:
point- Point3f形式の点データ。- 戻り値:
- 挿入が成功したかどうかを返す。
-
isPointInBound
public boolean isPointInBound​(Point3 point)
Determine whether the point is within the space range of the specific cube.- 引数:
point- 点の座標。- 戻り値:
- 点が範囲内にある場合はtrueを返す。そうでない場合はfalseを返す。
-
empty
public boolean empty()
-
clear
public void clear()
Reset all octree parameter. Clear all the nodes of the octree and initialize the parameters.
-
deletePoint
public boolean 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.- 引数:
point- 点の座標。比較はイプシロンに基づく- 戻り値:
- 点が正常に削除された場合にtrueを返す。
-
getPointCloudByOctree
public void 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.- 引数:
restoredPointCloud- 出力ポイントクラウドデータ。不要な場合はnoArray()で置き換え可能restoredColor- ポイントクラウドデータの色属性。不要な場合は省略可能
-
getPointCloudByOctree
public void 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.- 引数:
restoredPointCloud- 出力ポイントクラウドデータ。不要な場合はnoArray()で置き換え可能
-
radiusNNSearch
public int 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.- 引数:
query- クエリ点。radius- 取得する半径の値。points- 点の出力。検索された点を3-float形式で含む。出力ベクトルは順序付けされていない。不要な場合はnoArray()で置き換え可能squareDists- 距離の出力。検索された二乗距離をfloatで含む。出力ベクトルは順序付けされていない。不要な場合は省略可能- 戻り値:
- 探索された点の数。
-
radiusNNSearch
public int 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.- 引数:
query- クエリ点。radius- 取得する半径の値。points- 点の出力。検索された点を3-float形式で含む。出力ベクトルは順序付けされていない。不要な場合はnoArray()で置き換え可能。不要な場合は省略可能- 戻り値:
- 探索された点の数。
-
radiusNNSearch
public int radiusNNSearch​(Point3 query, float radius, Mat points, Mat colors, 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.- 引数:
query- クエリ点。radius- 取得する半径の値。points- 点の出力。検索された点を3-float形式で含む。出力ベクトルは順序付けされていない。不要な場合はnoArray()で置き換え可能colors- 色の出力。pointSet内の点に対応する色を含む。不要な場合はnoArray()で置き換え可能squareDists- 距離の出力。検索された二乗距離をfloatで含む。出力ベクトルは順序付けされていない。不要な場合はnoArray()で置き換え可能- 戻り値:
- 探索された点の数。
-
KNNSearch
public void KNNSearch​(Point3 query, int K, Mat points, Mat squareDists)
K Nearest Neighbor Search in Octree. Find the K nearest neighbors to the query point.- 引数:
query- クエリ点。K- 探索する最近傍点の数points- 点の出力。K個の点を3-float形式で含み、距離の近い順から遠い順に並べられる。不要な場合はnoArray()で置き換え可能squareDists- 距離の出力。K個の二乗距離をfloatで含み、距離の近い順から遠い順に並べられる。不要な場合は省略可能
-
KNNSearch
public void KNNSearch​(Point3 query, int K, Mat points)
K Nearest Neighbor Search in Octree. Find the K nearest neighbors to the query point.- 引数:
query- クエリ点。K- 探索する最近傍点の数points- 点の出力。K個の点を3-float形式で含み、距離の近い順から遠い順に並べられる。不要な場合はnoArray()で置き換え可能。不要な場合は省略可能
-
KNNSearch
public void KNNSearch​(Point3 query, int K, Mat points, Mat colors, Mat squareDists)
K Nearest Neighbor Search in Octree. Find the K nearest neighbors to the query point.- 引数:
query- クエリ点。K- 探索する最近傍点の数points- 点の出力。K個の点を3-float形式で含み、距離の近い順から遠い順に並べられる。不要な場合はnoArray()で置き換え可能colors- 色の出力。pointSet内の点に対応する色を含む。不要な場合はnoArray()で置き換え可能squareDists- 距離の出力。K個の二乗距離をfloatで含み、距離の近い順から遠い順に並べられる。不要な場合はnoArray()で置き換え可能
-
-