OpenCV 5.0.0
Open Source Computer Vision
読み込み中...
検索中...
見つかりません
🤖 AIによる機械翻訳(非公式) — これは OpenCV 5.0.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
cv::Octree クラス

3Dビジョン向けの Octree詳細...

#include <opencv2/ptcloud.hpp>

Collaboration diagram for cv::Octree:

公開メンバ関数

 Octree ()
 デフォルトコンストラクタ。
 
 ~Octree ()
 デフォルトのデストラクタ。
 
void clear ()
 すべてのオクツリーの引数をリセットする。
 
bool deletePoint (const Point3f &point)
 指定した点を Octree から削除する。
 
bool empty () const
 ルートノードがNULLの場合にtrueを返す。
 
void getPointCloudByOctree (OutputArray restoredPointCloud, OutputArray restoredColor=noArray())
 Octree から点群データを復元する。
 
bool insertPoint (const Point3f &point, const Point3f &color={ })
 色付きの点データをOctreeNodeに挿入する。
 
bool isPointInBound (const Point3f &point) const
 点が特定の立方体の空間範囲内にあるかどうかを判定する。
 
void KNNSearch (const Point3f &query, const int K, OutputArray points, OutputArray colors, OutputArray squareDists) const
 Octree 内でのK最近傍探索。
 
void KNNSearch (const Point3f &query, const int K, OutputArray points, OutputArray squareDists=noArray()) const
 Octree 内でのK最近傍探索。
 
int radiusNNSearch (const Point3f &query, float radius, OutputArray points, OutputArray colors, OutputArray squareDists) const
 Octree 内での半径最近傍探索。
 
int radiusNNSearch (const Point3f &query, float radius, OutputArray points, OutputArray squareDists=noArray()) const
 Octree 内での半径最近傍探索。
 

静的公開メンバ関数

static Ptr< OctreecreateWithDepth (int maxDepth, double size, const Point3f &origin={ }, bool withColors=false)
 指定した最大深度を持つ空の Octree を作成する。
 
static Ptr< OctreecreateWithDepth (int maxDepth, InputArray pointCloud, InputArray colors=noArray())
 指定したmaxDepthでPointCloudデータから Octree を作成する。
 
static Ptr< OctreecreateWithResolution (double resolution, double size, const Point3f &origin={ }, bool withColors=false)
 指定した解像度を持つ空の Octree を作成する。
 
static Ptr< OctreecreateWithResolution (double resolution, InputArray pointCloud, InputArray colors=noArray())
 指定した解像度でPointCloudデータから Octree を作成する。
 

限定公開変数類

Ptr< Impl > p
 

詳細説明

3Dビジョン向けの Octree

3Dビジョン分野では、Octree は点群データの処理や高速化に用いられる。Octree クラスは Octree データ構造を表す。各 Octree は固定された深度を持つ。Octree の深度とは、ルートノードから葉ノードまでの距離を指す。すべてのOctreeNodeはこの深度を超えない。深度を増やすと計算量が指数関数的に増加する。また、深度の数が小さいことは Octree の低い解像度を指す。各ノードは8個の子を含み、これらは空間の立方体を8つの部分に分割するために使われる。各オクツリーノードは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から最も遠い

構築子と解体子の詳解

◆ Octree()

cv::Octree::Octree ( )

デフォルトコンストラクタ。

◆ ~Octree()

cv::Octree::~Octree ( )

デフォルトのデストラクタ。

メンバ関数詳解

◆ clear()

void cv::Octree::clear ( )
Python:
cv.Octree.clear() -> None

すべてのオクツリーの引数をリセットする。

オクツリーのすべてのノードをクリアし、引数を初期化する。

◆ createWithDepth() [1/2]

static Ptr< Octree > cv::Octree::createWithDepth ( int maxDepth,
double size,
const Point3f & origin = { },
bool withColors = false )
static
Python:
cv.Octree.createWithDepth(maxDepth, size[, origin[, withColors]]) -> retval
cv.Octree.createWithDepth(maxDepth, pointCloud[, colors]) -> retval
cv.Octree_createWithDepth(maxDepth, size[, origin[, withColors]]) -> retval
cv.Octree_createWithDepth(maxDepth, pointCloud[, colors]) -> retval

指定した最大深度を持つ空の Octree を作成する。

これは利便性のために提供されているオーバーロードされたメンバ関数である。上記の関数とは、受け取る引数のみが異なる。

引数
maxDepthOctree の最大深さ
sizeOctree のバウンディングボックスのサイズ
origin初期中心座標
withColors点ごとの色を保持するかどうか
戻り値
生成される Octree

◆ createWithDepth() [2/2]

static Ptr< Octree > cv::Octree::createWithDepth ( int maxDepth,
InputArray pointCloud,
InputArray colors = noArray() )
static
Python:
cv.Octree.createWithDepth(maxDepth, size[, origin[, withColors]]) -> retval
cv.Octree.createWithDepth(maxDepth, pointCloud[, colors]) -> retval
cv.Octree_createWithDepth(maxDepth, size[, origin[, withColors]]) -> retval
cv.Octree_createWithDepth(maxDepth, pointCloud[, colors]) -> retval

指定したmaxDepthでPointCloudデータから Octree を作成する。

これは利便性のために提供されているオーバーロードされたメンバ関数である。上記の関数とは、受け取る引数のみが異なる。

引数
maxDepthoctreeの最大深さ
pointCloud点群データ。3チャンネルのfloat配列であるべきである
colors同じ3チャンネルfloat形式での点群の色属性
戻り値
生成される Octree
この関数の呼び出しグラフ:

◆ createWithResolution() [1/2]

static Ptr< Octree > cv::Octree::createWithResolution ( double resolution,
double size,
const Point3f & origin = { },
bool withColors = false )
static
Python:
cv.Octree.createWithResolution(resolution, size[, origin[, withColors]]) -> retval
cv.Octree.createWithResolution(resolution, pointCloud[, colors]) -> retval
cv.Octree_createWithResolution(resolution, size[, origin[, withColors]]) -> retval
cv.Octree_createWithResolution(resolution, pointCloud[, colors]) -> retval

指定した解像度を持つ空の Octree を作成する。

これは利便性のために提供されているオーバーロードされたメンバ関数である。上記の関数とは、受け取る引数のみが異なる。

引数
resolutionオクツリーの葉ノードのサイズ
sizeOctree のバウンディングボックスのサイズ
origin初期中心座標
withColors点ごとの色を保持するかどうか
戻り値
生成される Octree

◆ createWithResolution() [2/2]

static Ptr< Octree > cv::Octree::createWithResolution ( double resolution,
InputArray pointCloud,
InputArray colors = noArray() )
static
Python:
cv.Octree.createWithResolution(resolution, size[, origin[, withColors]]) -> retval
cv.Octree.createWithResolution(resolution, pointCloud[, colors]) -> retval
cv.Octree_createWithResolution(resolution, size[, origin[, withColors]]) -> retval
cv.Octree_createWithResolution(resolution, pointCloud[, colors]) -> retval

指定した解像度でPointCloudデータから Octree を作成する。

これは利便性のために提供されているオーバーロードされたメンバ関数である。上記の関数とは、受け取る引数のみが異なる。

引数
resolutionオクツリーの葉ノードのサイズ
pointCloud点群データ。3チャンネルのfloat配列であるべきである
colors同じ3チャンネルfloat形式での点群の色属性
戻り値
生成されるオクツリー
この関数の呼び出しグラフ:

◆ deletePoint()

bool cv::Octree::deletePoint ( const Point3f & point)
Python:
cv.Octree.deletePoint(point) -> retval

指定した点を Octree から削除する。

対応する葉ノードのpointListから対応する要素を削除する。削除後に葉ノードが他の点を含まない場合、このノードは削除される。同様に、最後の子が削除された場合、その親ノードも削除されることがある。

引数
point点の座標。比較はイプシロンに基づく
戻り値
点が正常に削除された場合にtrueを返す。

◆ empty()

bool cv::Octree::empty ( ) const
Python:
cv.Octree.empty() -> retval

ルートノードがNULLの場合にtrueを返す。

◆ getPointCloudByOctree()

void cv::Octree::getPointCloudByOctree ( OutputArray restoredPointCloud,
OutputArray restoredColor = noArray() )
Python:
cv.Octree.getPointCloudByOctree([, restoredPointCloud[, restoredColor]]) -> restoredPointCloud, restoredColor

Octree から点群データを復元する。

既存のオクツリーから点群データを復元する。同じ葉ノード内の点は同一の点とみなされる。この点は葉ノードの中心である。解像度が小さい場合、ダウンサンプリング関数として機能する。

引数
restoredPointCloud出力点群データ。不要な場合は noArray() で置き換えられる
restoredColor点群データの色属性。不要な場合は省略可能
この関数の呼び出しグラフ:

◆ insertPoint()

bool cv::Octree::insertPoint ( const Point3f & point,
const Point3f & color = { } )
Python:
cv.Octree.insertPoint(point[, color]) -> retval

色付きの点データをOctreeNodeに挿入する。

これは利便性のために提供されているオーバーロードされたメンバ関数である。上記の関数とは、受け取る引数のみが異なる。

引数
pointPoint3f形式の点データ。
colorPoint3f形式の点の色属性。
戻り値
挿入が成功したかどうかを返す。

◆ isPointInBound()

bool cv::Octree::isPointInBound ( const Point3f & point) const
Python:
cv.Octree.isPointInBound(point) -> retval

点が特定の立方体の空間範囲内にあるかどうかを判定する。

引数
point点の座標。
戻り値
点が範囲内にある場合はtrueを返す。そうでない場合はfalseを返す。

◆ KNNSearch() [1/2]

void cv::Octree::KNNSearch ( const Point3f & query,
const int K,
OutputArray points,
OutputArray colors,
OutputArray squareDists ) const
Python:
cv.Octree.KNNSearch(query, K[, points[, squareDists]]) -> points, squareDists
cv.Octree.KNNSearch(query, K[, points[, colors[, squareDists]]]) -> points, colors, squareDists

Octree 内でのK最近傍探索。

これは利便性のために提供されているオーバーロードされたメンバ関数である。上記の関数とは、受け取る引数のみが異なる。

クエリ点に最も近いK個の最近傍点を見つける。

引数
queryクエリ点。
K探索する最近傍点の数
points点の出力。3-float形式のK個の点を、近いものから遠いものへ距離順に並べて格納する。不要な場合は noArray() で置き換えられる
colors色の出力。pointSet内の点に対応する色を格納する。不要な場合は noArray() で置き換えられる
squareDists距離の出力。float形式のK個の二乗距離を、近いものから遠いものへ距離順に並べて格納する。不要な場合は noArray() で置き換えられる

◆ KNNSearch() [2/2]

void cv::Octree::KNNSearch ( const Point3f & query,
const int K,
OutputArray points,
OutputArray squareDists = noArray() ) const
Python:
cv.Octree.KNNSearch(query, K[, points[, squareDists]]) -> points, squareDists
cv.Octree.KNNSearch(query, K[, points[, colors[, squareDists]]]) -> points, colors, squareDists

Octree 内でのK最近傍探索。

クエリ点に最も近いK個の最近傍点を見つける。

引数
queryクエリ点。
K探索する最近傍点の数
points点の出力。3-float形式のK個の点を、近いものから遠いものへ距離順に並べて格納する。不要な場合は noArray() で置き換えられる
squareDists距離の出力。float形式のK個の二乗距離を、近いものから遠いものへ距離順に並べて格納する。不要な場合は省略可能
この関数の呼び出しグラフ:

◆ radiusNNSearch() [1/2]

int cv::Octree::radiusNNSearch ( const Point3f & query,
float radius,
OutputArray points,
OutputArray colors,
OutputArray squareDists ) const
Python:
cv.Octree.radiusNNSearch(query, radius[, points[, squareDists]]) -> retval, points, squareDists
cv.Octree.radiusNNSearch(query, radius[, points[, colors[, squareDists]]]) -> retval, points, colors, squareDists

Octree 内での半径最近傍探索。

これは利便性のために提供されているオーバーロードされたメンバ関数である。上記の関数とは、受け取る引数のみが異なる。

半径以下のすべての点を探索する。そして探索された点の数を返す。

引数
queryクエリ点。
radius取得した半径値。
points点の出力。3-float形式で検索された点を格納する。出力ベクトルは順序付けされていない。不要な場合は noArray() で置き換えられる
colors色の出力。pointSet内の点に対応する色を格納する。不要な場合は noArray() で置き換えられる
squareDists距離の出力。float形式で検索された二乗距離を格納する。出力ベクトルは順序付けされていない。不要な場合は noArray() で置き換えられる
戻り値
探索された点の数。

◆ radiusNNSearch() [2/2]

int cv::Octree::radiusNNSearch ( const Point3f & query,
float radius,
OutputArray points,
OutputArray squareDists = noArray() ) const
Python:
cv.Octree.radiusNNSearch(query, radius[, points[, squareDists]]) -> retval, points, squareDists
cv.Octree.radiusNNSearch(query, radius[, points[, colors[, squareDists]]]) -> retval, points, colors, squareDists

Octree 内での半径最近傍探索。

半径以下のすべての点を探索する。そして探索された点の数を返す。

引数
queryクエリ点。
radius取得した半径値。
points点の出力。3-float形式で検索された点を格納する。出力ベクトルは順序付けされていない。不要な場合は noArray() で置き換えられる
squareDists距離の出力。float形式で検索された二乗距離を格納する。出力ベクトルは順序付けされていない。不要な場合は省略可能
戻り値
探索された点の数。
この関数の呼び出しグラフ:

メンバ変数詳解

◆ p

Ptr<Impl> cv::Octree::p
protected

このクラス詳解は次のファイルから抽出されました: