🤖
AIによる機械翻訳(非公式) — これは OpenCV 4.13.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は
公式英語版(原文) を参照してください。
#include <opencv2/hfs.hpp>
|
| static Ptr< HfsSegment > | create (int height, int width, float segEgbThresholdI=0.08f, int minRegionSizeI=100, float segEgbThresholdII=0.28f, int minRegionSizeII=200, float spatialWeight=0.6f, int slicSpixelSize=8, int numSlicIter=5) |
| | : hfsオブジェクトを生成する
|
| |
| template<typename _Tp > |
| static Ptr< _Tp > | load (const String &filename, const String &objname=String()) |
| | ファイルからアルゴリズムを読み込む。
|
| |
| template<typename _Tp > |
| static Ptr< _Tp > | loadFromString (const String &strModel, const String &objname=String()) |
| | 文字列からアルゴリズムを読み込む。
|
| |
| template<typename _Tp > |
| static Ptr< _Tp > | read (const FileNode &fn) |
| | ファイルノードからアルゴリズムを読み込む。
|
| |
◆ create()
| static Ptr< HfsSegment > cv::hfs::HfsSegment::create |
( |
int | height, |
|
|
int | width, |
|
|
float | segEgbThresholdI = 0.08f, |
|
|
int | minRegionSizeI = 100, |
|
|
float | segEgbThresholdII = 0.28f, |
|
|
int | minRegionSizeII = 200, |
|
|
float | spatialWeight = 0.6f, |
|
|
int | slicSpixelSize = 8, |
|
|
int | numSlicIter = 5 ) |
|
static |
| Python: |
|---|
| cv.hfs.HfsSegment.create( | height, width[, segEgbThresholdI[, minRegionSizeI[, segEgbThresholdII[, minRegionSizeII[, spatialWeight[, slicSpixelSize[, numSlicIter]]]]]]] | ) -> | retval |
| cv.hfs.HfsSegment_create( | height, width[, segEgbThresholdI[, minRegionSizeI[, segEgbThresholdII[, minRegionSizeII[, spatialWeight[, slicSpixelSize[, numSlicIter]]]]]]] | ) -> | retval |
: hfsオブジェクトを生成する
- 引数
-
| height | 入力画像の高さ |
| width | 入力画像の幅 |
| segEgbThresholdI | 引数 segEgbThresholdI |
| minRegionSizeI | 引数 minRegionSizeI |
| segEgbThresholdII | 引数 segEgbThresholdII |
| minRegionSizeII | 引数 minRegionSizeII |
| spatialWeight | 引数 spatialWeight |
| slicSpixelSize | 引数 slicSpixelSize |
| numSlicIter | 引数 numSlicIter |
◆ getMinRegionSizeI()
| virtual int cv::hfs::HfsSegment::getMinRegionSizeI |
( |
| ) |
|
|
pure virtual |
| Python: |
|---|
| cv.hfs.HfsSegment.getMinRegionSizeI( | | ) -> | retval |
◆ getMinRegionSizeII()
| virtual int cv::hfs::HfsSegment::getMinRegionSizeII |
( |
| ) |
|
|
pure virtual |
| Python: |
|---|
| cv.hfs.HfsSegment.getMinRegionSizeII( | | ) -> | retval |
◆ getNumSlicIter()
| virtual int cv::hfs::HfsSegment::getNumSlicIter |
( |
| ) |
|
|
pure virtual |
| Python: |
|---|
| cv.hfs.HfsSegment.getNumSlicIter( | | ) -> | retval |
◆ getSegEgbThresholdI()
| virtual float cv::hfs::HfsSegment::getSegEgbThresholdI |
( |
| ) |
|
|
pure virtual |
| Python: |
|---|
| cv.hfs.HfsSegment.getSegEgbThresholdI( | | ) -> | retval |
◆ getSegEgbThresholdII()
| virtual float cv::hfs::HfsSegment::getSegEgbThresholdII |
( |
| ) |
|
|
pure virtual |
| Python: |
|---|
| cv.hfs.HfsSegment.getSegEgbThresholdII( | | ) -> | retval |
◆ getSlicSpixelSize()
| virtual int cv::hfs::HfsSegment::getSlicSpixelSize |
( |
| ) |
|
|
pure virtual |
| Python: |
|---|
| cv.hfs.HfsSegment.getSlicSpixelSize( | | ) -> | retval |
◆ getSpatialWeight()
| virtual float cv::hfs::HfsSegment::getSpatialWeight |
( |
| ) |
|
|
pure virtual |
| Python: |
|---|
| cv.hfs.HfsSegment.getSpatialWeight( | | ) -> | retval |
◆ performSegmentCpu()
| virtual Mat cv::hfs::HfsSegment::performSegmentCpu |
( |
InputArray | src, |
|
|
bool | ifDraw = true ) |
|
pure virtual |
| Python: |
|---|
| cv.hfs.HfsSegment.performSegmentCpu( | src[, ifDraw] | ) -> | retval |
CPUでセグメンテーションを行う。このメソッドは参照用にのみ実装されている。使用することは強く推奨されない。
◆ performSegmentGpu()
| virtual Mat cv::hfs::HfsSegment::performSegmentGpu |
( |
InputArray | src, |
|
|
bool | ifDraw = true ) |
|
pure virtual |
| Python: |
|---|
| cv.hfs.HfsSegment.performSegmentGpu( | src[, ifDraw] | ) -> | retval |
GPUでセグメンテーションを行う
- 引数
-
| src | 入力画像 |
| ifDraw | 返される Mat に画像を描画するかどうか。この引数が false の場合、返される Mat の内容は、各ピクセルが属する領域を表すインデックスの行列となる。そのデータ型は CV_16U である。この引数が true の場合、返される Mat はセグメント化された画像となり、各領域の色はその領域内の全ピクセルの平均色となる。そのデータ型は入力画像と同じである |
◆ setMinRegionSizeI()
| virtual void cv::hfs::HfsSegment::setMinRegionSizeI |
( |
int | n | ) |
|
|
pure virtual |
| Python: |
|---|
| cv.hfs.HfsSegment.setMinRegionSizeI( | n | ) -> | None |
: パラメータ minRegionSizeI を設定・取得する。このパラメータは上述の第2ステージで使用される。EGBセグメンテーションの後、このパラメータより少ないピクセル数の領域は隣接する領域に統合される。
◆ setMinRegionSizeII()
| virtual void cv::hfs::HfsSegment::setMinRegionSizeII |
( |
int | n | ) |
|
|
pure virtual |
| Python: |
|---|
| cv.hfs.HfsSegment.setMinRegionSizeII( | n | ) -> | None |
: パラメータ minRegionSizeII を設定・取得する。このパラメータは上述の第3ステージで使用される。minRegionSizeI と同じ目的を持つ
◆ setNumSlicIter()
| virtual void cv::hfs::HfsSegment::setNumSlicIter |
( |
int | n | ) |
|
|
pure virtual |
| Python: |
|---|
| cv.hfs.HfsSegment.setNumSlicIter( | n | ) -> | None |
: パラメータ numSlicIter を設定・取得する。このパラメータは第1ステージで使用される。SLICを実行する際に何回反復するかを表す。
◆ setSegEgbThresholdI()
| virtual void cv::hfs::HfsSegment::setSegEgbThresholdI |
( |
float | c | ) |
|
|
pure virtual |
| Python: |
|---|
| cv.hfs.HfsSegment.setSegEgbThresholdI( | c | ) -> | None |
: パラメータ segEgbThresholdI を設定・取得する。このパラメータは上述の第2ステージで使用される。EGBアルゴリズムを適用して隣接ノードを統合する際にエッジの重みをしきい値処理するために使われる定数である。この値が大きいほどセグメンテーション結果に残る領域が多くなる傾向があり、小さいほどその逆になる。
◆ setSegEgbThresholdII()
| virtual void cv::hfs::HfsSegment::setSegEgbThresholdII |
( |
float | c | ) |
|
|
pure virtual |
| Python: |
|---|
| cv.hfs.HfsSegment.setSegEgbThresholdII( | c | ) -> | None |
: パラメータ segEgbThresholdII を設定・取得する。このパラメータは上述の第3ステージで使用される。segEgbThresholdI と同じ目的を持つ。この値が大きいほどセグメンテーション結果に残る領域が多くなる傾向があり、小さいほどその逆になる。
◆ setSlicSpixelSize()
| virtual void cv::hfs::HfsSegment::setSlicSpixelSize |
( |
int | n | ) |
|
|
pure virtual |
| Python: |
|---|
| cv.hfs.HfsSegment.setSlicSpixelSize( | n | ) -> | None |
: パラメータ slicSpixelSize を設定・取得する。このパラメータは上述の第1ステージ(SLICステージ)で使用される。SLICを初期化する際の各スーパーピクセルのサイズを表す。各スーパーピクセルは初期状態でおよそ \(slicSpixelSize \times slicSpixelSize\) ピクセルを持つ。
◆ setSpatialWeight()
| virtual void cv::hfs::HfsSegment::setSpatialWeight |
( |
float | w | ) |
|
|
pure virtual |
| Python: |
|---|
| cv.hfs.HfsSegment.setSpatialWeight( | w | ) -> | None |
: パラメータ spatialWeight を設定・取得する。このパラメータは上述の第1ステージ(SLICステージ)で使用される。各ピクセルとその中心との距離を計算する際に位置がどれだけ重要な役割を果たすかを表す。距離を計算する厳密な式は \(colorDistance + spatialWeight \times spatialDistance\) である。この値が大きいほどセグメンテーション結果は局所的な一貫性を持つ傾向がある。
このクラス詳解は次のファイルから抽出されました: