3Dモデルの読み込みとマッチングを行うクラス。一般的な使い方: 続きを読む...
#include <opencv2/surface_matching/ppf_match_3d.hpp>
|
| | PPF3DDetector () |
| | 空のコンストラクタ。デフォルト引数を設定する。
|
| |
| | PPF3DDetector (const double relativeSamplingStep, const double relativeDistanceStep=0.05, const double numAngles=30) |
| |
| virtual | ~PPF3DDetector () |
| |
| void | match (const Mat &scene, std::vector< Pose3DPtr > &results, const double relativeSceneSampleStep=1.0/5.0, const double relativeSceneDistance=0.03) |
| | 学習済みモデルを指定したシーン全体に対してマッチングする。
|
| |
| void | read (const FileNode &fn) |
| |
| void | setSearchParams (const double positionThreshold=-1, const double rotationThreshold=-1, const bool useWeightedClustering=false) |
| |
| void | trainModel (const Mat &Model) |
| | 新しいモデルを学習する。
|
| |
| void | write (FileStorage &fs) const |
| |
3Dモデルの読み込みとマッチングを行うクラス。一般的な使い方:
vector<Pose3DPtr> results;
detector.match(pcTest, results, 1.0/5.0,0.05);
Class, allowing the load and matching 3D models. Typical Use:
Definition ppf_match_3d.hpp:98
@ pc
Definition container_avi.private.hpp:138
◆ PPF3DDetector() [1/2]
| cv::ppf_match_3d::PPF3DDetector::PPF3DDetector |
( |
| ) |
|
| Python: |
|---|
| cv.ppf_match_3d.PPF3DDetector( | | ) -> | <ppf_match_3d_PPF3DDetector object> |
| cv.ppf_match_3d.PPF3DDetector( | relativeSamplingStep[, relativeDistanceStep[, numAngles]] | ) -> | <ppf_match_3d_PPF3DDetector object> |
◆ PPF3DDetector() [2/2]
| cv::ppf_match_3d::PPF3DDetector::PPF3DDetector |
( |
const double | relativeSamplingStep, |
|
|
const double | relativeDistanceStep = 0.05, |
|
|
const double | numAngles = 30 ) |
| Python: |
|---|
| cv.ppf_match_3d.PPF3DDetector( | | ) -> | <ppf_match_3d_PPF3DDetector object> |
| cv.ppf_match_3d.PPF3DDetector( | relativeSamplingStep[, relativeDistanceStep[, numAngles]] | ) -> | <ppf_match_3d_PPF3DDetector object> |
引数付きのコンストラクタ
- 引数
-
| [in] | relativeSamplingStep | オブジェクトの直径に対するサンプリング距離。モデルは効率を上げるためにまず一様にサンプリングされる。この値を小さくするとモデルが密になり、ポーズ推定はより正確になるが、モデルが大きくなるほど学習は遅くなる。値を大きくするとポーズ計算の精度は下がるが、モデルは小さくなり、モデル生成とマッチングは速くなる。小さい値を使う際はメモリ消費に注意すること。 |
| [in] | relativeDistanceStep | モデルの直径に対する点対距離の離散化距離。この値はハッシュテーブルに直接影響する。小さい値を使うと離散化が細かくなりすぎ、ハッシュテーブルのビンに曖昧さが生じる。大きすぎる値を使うと特徴ベクトル間の識別力がなくなり、異なる点対特徴が同じビンに割り当てられる。この引数のデフォルト値はRelativeSamplingStepの値である。ノイズの多いシーンでは、ノイズ点に対するマッチングの頑健性を高めるために値を大きくできる。 |
| [in] | numAngles | 点対の向きの離散化を、角度の分割数として設定する。この値は向きに対するRelativeDistanceStepに相当する。値を大きくするとマッチングの精度は上がるが、誤った法線方向に対する頑健性は下がる。値を小さくするとマッチングの精度は下がるが、誤った法線方向に対する頑健性は上がる。法線方向を正確に計算できないような非常にノイズの多いシーンでは、値を25や20に設定できる。 |
◆ ~PPF3DDetector()
| virtual cv::ppf_match_3d::PPF3DDetector::~PPF3DDetector |
( |
| ) |
|
|
virtual |
◆ clearTrainingModels()
| void cv::ppf_match_3d::PPF3DDetector::clearTrainingModels |
( |
| ) |
|
|
protected |
◆ match()
| void cv::ppf_match_3d::PPF3DDetector::match |
( |
const Mat & | scene, |
|
|
std::vector< Pose3DPtr > & | results, |
|
|
const double | relativeSceneSampleStep = 1.0/5.0, |
|
|
const double | relativeSceneDistance = 0.03 ) |
| Python: |
|---|
| cv.ppf_match_3d.PPF3DDetector.match( | scene[, relativeSceneSampleStep[, relativeSceneDistance]] | ) -> | results |
学習済みモデルを指定したシーン全体に対してマッチングする。
- 引数
-
| [in] | scene | シーンの点群 |
| [out] | results | 出力ポーズのリスト |
| [in] | relativeSceneSampleStep | relativeSceneDistanceでサンプリングした後にマッチングに使用するシーン点の割合。例えばこの値を1.0/5.0に設定すると、シーンの5点ごとに1点がポーズ推定に使われる。この引数により、マッチングの速度と精度の間で簡単にトレードオフできる。値を大きくすると使用する点が少なくなり、その結果ポーズ計算は速くなるが精度は下がる。値を小さくすると逆の効果になる。 |
| [in] | relativeSceneDistance | モデルの直径に対する距離しきい値を設定する。この引数は学習段階のrelativeSamplingStepに相当する。この引数はrelativeSceneSampleStep引数による事前サンプリングのように作用する。 |
◆ read()
| void cv::ppf_match_3d::PPF3DDetector::read |
( |
const FileNode & | fn | ) |
|
◆ setSearchParams()
| void cv::ppf_match_3d::PPF3DDetector::setSearchParams |
( |
const double | positionThreshold = -1, |
|
|
const double | rotationThreshold = -1, |
|
|
const bool | useWeightedClustering = false ) |
探索のための引数を設定する
- 引数
-
| [in] | positionThreshold | 並進の類似性を制御する位置しきい値。キャリブレーション/モデルの単位に依存する。 |
| [in] | rotationThreshold | 回転の類似性を制御する位置しきい値。この引数は角度差に対するしきい値として捉えることができる |
| [in] | useWeightedClustering | このアルゴリズムはデフォルトでは重み付けなしにポーズをクラスタリングする。非ゼロの値を指定すると、ポーズのクラスタリングが投票数を重みとして考慮し、単純な平均化の代わりに重み付き平均化を行うことを意味する。 |
◆ trainModel()
| void cv::ppf_match_3d::PPF3DDetector::trainModel |
( |
const Mat & | Model | ) |
|
| Python: |
|---|
| cv.ppf_match_3d.PPF3DDetector.trainModel( | Model | ) -> | None |
新しいモデルを学習する。
- 引数
-
コンストラクタで設定された引数を用いて、ダウンサンプリングを行い新しいモデルを学習する。モデルの学習が完了すると、インスタンスは "match" を呼び出せる状態になる。
◆ write()
| void cv::ppf_match_3d::PPF3DDetector::write |
( |
FileStorage & | fs | ) |
const |
◆ angle_step
| double cv::ppf_match_3d::PPF3DDetector::angle_step |
|
protected |
◆ angle_step_radians
| double cv::ppf_match_3d::PPF3DDetector::angle_step_radians |
|
protected |
◆ angle_step_relative
| double cv::ppf_match_3d::PPF3DDetector::angle_step_relative |
|
protected |
◆ distance_step
| double cv::ppf_match_3d::PPF3DDetector::distance_step |
|
protected |
◆ distance_step_relative
| double cv::ppf_match_3d::PPF3DDetector::distance_step_relative |
|
protected |
◆ hash_nodes
| THash* cv::ppf_match_3d::PPF3DDetector::hash_nodes |
|
protected |
◆ hash_table
◆ num_ref_points
| int cv::ppf_match_3d::PPF3DDetector::num_ref_points |
|
protected |
◆ position_threshold
| double cv::ppf_match_3d::PPF3DDetector::position_threshold |
|
protected |
◆ ppf
| Mat cv::ppf_match_3d::PPF3DDetector::ppf |
|
protected |
◆ rotation_threshold
| double cv::ppf_match_3d::PPF3DDetector::rotation_threshold |
|
protected |
◆ sampled_pc
| Mat cv::ppf_match_3d::PPF3DDetector::sampled_pc |
|
protected |
◆ sampling_step_relative
| double cv::ppf_match_3d::PPF3DDetector::sampling_step_relative |
|
protected |
◆ scene_sample_step
| int cv::ppf_match_3d::PPF3DDetector::scene_sample_step |
|
protected |
◆ use_weighted_avg
| bool cv::ppf_match_3d::PPF3DDetector::use_weighted_avg |
|
protected |
このクラス詳解は次のファイルから抽出されました: