|
| virtual const std::vector< std::vector< cv::Point > > & | getBlobContours () const =0 |
| | 最後に呼び出されたdetect()で検出されたブロブの輪郭を返す。
|
| |
| virtual String | getDefaultName () const CV_OVERRIDE |
| |
| virtual SimpleBlobDetector::Params | getParams () const =0 |
| |
| virtual void | setParams (const SimpleBlobDetector::Params ¶ms)=0 |
| |
| virtual | ~Feature2D () |
| |
| virtual void | compute (InputArray image, std::vector< KeyPoint > &keypoints, OutputArray descriptors) |
| | 画像(1番目のバリアント)または画像集合(2番目のバリアント)で検出されたキーポイントの集合について記述子を計算する。
|
| |
| virtual void | compute (InputArrayOfArrays images, std::vector< std::vector< KeyPoint > > &keypoints, OutputArrayOfArrays descriptors) |
| |
| virtual int | defaultNorm () const |
| |
| virtual int | descriptorSize () const |
| |
| virtual int | descriptorType () const |
| |
| virtual void | detect (InputArray image, std::vector< KeyPoint > &keypoints, InputArray mask=noArray()) |
| | 画像(1番目のバリアント)または画像集合(2番目のバリアント)からキーポイントを検出する。
|
| |
| virtual void | detect (InputArrayOfArrays images, std::vector< std::vector< KeyPoint > > &keypoints, InputArrayOfArrays masks=noArray()) |
| |
| virtual void | detectAndCompute (InputArray image, InputArray mask, std::vector< KeyPoint > &keypoints, OutputArray descriptors, bool useProvidedKeypoints=false) |
| |
| virtual bool | empty () const CV_OVERRIDE |
| | 検出器オブジェクトが空の場合に true を返す。
|
| |
| virtual void | read (const FileNode &) CV_OVERRIDE |
| | ファイルストレージからアルゴリズムの引数を読み込む。
|
| |
| void | read (const String &fileName) |
| |
| void | write (const String &fileName) const |
| |
| virtual void | write (FileStorage &) const CV_OVERRIDE |
| | アルゴリズムの引数をファイルストレージに保存する。
|
| |
| void | write (FileStorage &fs, const String &name) const |
| |
| | Algorithm () |
| |
| virtual | ~Algorithm () |
| |
| virtual void | clear () |
| | アルゴリズムの状態をクリアする。
|
| |
| virtual void | save (const String &filename) const |
| |
| void | write (FileStorage &fs, const String &name) const |
| |
画像からブロブを抽出するためのクラス。:
このクラスは、画像からブロブを抽出する単純なアルゴリズムを実装する:
- minThreshold(含む)からmaxThreshold(含まない)までの複数のしきい値を、隣接するしきい値間の距離 thresholdStep で適用したしきい値処理によって、ソース画像を二値画像に変換する。
- 各二値画像から findContours によって連結成分を抽出し、それらの中心を計算する。
- 複数の二値画像から得た中心を、その座標によってグループ化する。近接する中心は1つのグループを形成し、これが1つのブロブに対応する。これは minDistBetweenBlobs 引数によって制御される。
- これらのグループから、ブロブの最終的な中心とその半径を推定し、キーポイントの位置とサイズとして返す。
このクラスは、返されるブロブに対していくつかのフィルタリングを行う。対応するフィルタリングのオン/オフを切り替えるには、filterBy* を true/false に設定する。利用できるフィルタリング:
- 色による。このフィルタは、ブロブの中心における二値画像の強度を blobColor と比較する。両者が異なる場合、そのブロブは除外される。暗いブロブを抽出するには blobColor = 0 を、明るいブロブを抽出するには blobColor = 255 を使う。
- 面積による。抽出されるブロブは、minArea(含む)と maxArea(含まない)の間の面積を持つ。
- 円形度による。抽出されるブロブは、minCircularity(含む)と maxCircularity(含まない)の間の円形度( \(\frac{4*\pi*Area}{perimeter * perimeter}\))を持つ。
- 最小慣性と最大慣性の比による。抽出されるブロブは、minInertiaRatio(含む)と maxInertiaRatio(含まない)の間のこの比を持つ。
- 凸性による。抽出されるブロブは、minConvexity(含む)と maxConvexity(含まない)の間の凸性(面積 / ブロブの凸包の面積)を持つ。
引数のデフォルト値は、暗い円形のブロブを抽出するように調整されている。
- 例
- samples/cpp/snippets/detect_blob.cpp.