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

ContourFitting アルゴリズムのためのクラス。ContourFitting は2つの輪郭 \( z_a \) と \( z_b \) を距離を最小化してマッチングする。続き...

#include <opencv2/ximgproc/fourier_descriptors.hpp>

Collaboration diagram for cv::ximgproc::ContourFitting:

公開メンバ関数

 ContourFitting (int ctr=1024, int fd=16)
 フーリエ記述子を用いて2つの閉曲線をフィッティングする。詳細は [226] および [27] を参照。
 
void estimateTransformation (InputArray src, InputArray dst, OutputArray alphaPhiST, double &dist, bool fdContour=false)
 フーリエ記述子を用いて2つの閉曲線をフィッティングする。詳細は [226] および [27] を参照。
 
void estimateTransformation (InputArray src, InputArray dst, OutputArray alphaPhiST, double *dist=0, bool fdContour=false)
 フーリエ記述子を用いて2つの閉曲線をフィッティングする。詳細は [226] および [27] を参照。
 
int getCtrSize ()
 
int getFDSize ()
 
void setCtrSize (int n)
 estimateTransformationで使用するフーリエ記述子の数を設定する
 
void setFDSize (int n)
 estimateTransformationがvector<Point>を使用するときのフーリエ記述子の数を設定する
 
- Public Member Functions inherited from cv::Algorithm
 Algorithm ()
 
virtual ~Algorithm ()
 
virtual void clear ()
 アルゴリズムの状態をクリアする。
 
virtual bool empty () const
 Algorithm が空の場合(たとえば開始直後や読み込みに失敗した後)に true を返す。
 
virtual String getDefaultName () const
 
virtual void read (const FileNode &fn)
 ファイルストレージからアルゴリズムの引数を読み込む。
 
virtual void save (const String &filename) const
 
void write (const Ptr< FileStorage > &fs, const String &name=String()) const
 
virtual void write (FileStorage &fs) const
 アルゴリズムの引数をファイルストレージに保存する。
 
void write (FileStorage &fs, const String &name) const
 

Additional Inherited Members

- Static Public Member Functions inherited from cv::Algorithm
template<typename _Tp >
static Ptr< _Tpload (const String &filename, const String &objname=String())
 ファイルからアルゴリズムを読み込む。
 
template<typename _Tp >
static Ptr< _TploadFromString (const String &strModel, const String &objname=String())
 文字列からアルゴリズムを読み込む。
 
template<typename _Tp >
static Ptr< _Tpread (const FileNode &fn)
 ファイルノードからアルゴリズムを読み込む。
 
- Protected Member Functions inherited from cv::Algorithm
void writeFormat (FileStorage &fs) const
 

詳細説明

ContourFitting アルゴリズムのためのクラス。ContourFitting は2つの輪郭 \( z_a \) と \( z_b \) を距離を最小化してマッチングする。

\[ d(z_a,z_b)=\sum (a_n - s b_n e^{j(n \alpha +\phi )})^2 \]

ここで \( a_n \) と \( b_n \) は \( z_a \) と \( z_b \) のフーリエ記述子、sはスケーリング係数、 \( \phi \) は回転角、 \( \alpha \) は開始点の調整係数である

構築子と解体子の詳解

◆ ContourFitting()

cv::ximgproc::ContourFitting::ContourFitting ( int ctr = 1024,
int fd = 16 )
inline

フーリエ記述子を用いて2つの閉曲線をフィッティングする。詳細は [226] および [27] を参照。

引数
ctrリサンプリング後の輪郭点数に等しいフーリエ記述子の数。
fd2番目の形状(ターゲット)を定義する輪郭。

メンバ関数詳解

◆ estimateTransformation() [1/2]

void cv::ximgproc::ContourFitting::estimateTransformation ( InputArray src,
InputArray dst,
OutputArray alphaPhiST,
double & dist,
bool fdContour = false )
Python:
cv.ximgproc.ContourFitting.estimateTransformation(src, dst[, alphaPhiST[, fdContour]]) -> alphaPhiST, dist

フーリエ記述子を用いて2つの閉曲線をフィッティングする。詳細は [226] および [27] を参照。

引数
src1番目の形状を定義する輪郭。
dst2番目の形状(ターゲット)を定義する輪郭。
alphaPhiST: \( \alpha \)=alphaPhiST(0,0), \( \phi \)=alphaPhiST(0,1) (ラジアン単位), s=alphaPhiST(0,2), Tx=alphaPhiST(0,3), Ty=alphaPhiST(0,4) 回転中心
distマッチング後のsrcとdstの間の距離。
fdContourfalseの場合srcとdstは輪郭であり、trueの場合srcとdstはフーリエ記述子である。

◆ estimateTransformation() [2/2]

void cv::ximgproc::ContourFitting::estimateTransformation ( InputArray src,
InputArray dst,
OutputArray alphaPhiST,
double * dist = 0,
bool fdContour = false )
Python:
cv.ximgproc.ContourFitting.estimateTransformation(src, dst[, alphaPhiST[, fdContour]]) -> alphaPhiST, dist

フーリエ記述子を用いて2つの閉曲線をフィッティングする。詳細は [226] および [27] を参照。

引数
src1番目の形状を定義する輪郭。
dst2番目の形状(ターゲット)を定義する輪郭。
alphaPhiST: \( \alpha \)=alphaPhiST(0,0), \( \phi \)=alphaPhiST(0,1) (ラジアン単位), s=alphaPhiST(0,2), Tx=alphaPhiST(0,3), Ty=alphaPhiST(0,4) 回転中心
distマッチング後のsrcとdstの間の距離。
fdContourfalseの場合srcとdstは輪郭であり、trueの場合srcとdstはフーリエ記述子である。

◆ getCtrSize()

int cv::ximgproc::ContourFitting::getCtrSize ( )
inline
Python:
cv.ximgproc.ContourFitting.getCtrSize() -> retval
戻り値
フーリエ記述子の数

◆ getFDSize()

int cv::ximgproc::ContourFitting::getFDSize ( )
inline
Python:
cv.ximgproc.ContourFitting.getFDSize() -> retval
戻り値
最適な曲線マッチングに使用するフーリエ記述子の数

◆ setCtrSize()

void cv::ximgproc::ContourFitting::setCtrSize ( int n)
Python:
cv.ximgproc.ContourFitting.setCtrSize(n) -> None

estimateTransformationで使用するフーリエ記述子の数を設定する

引数
nリサンプリング後の輪郭点数に等しいフーリエ記述子の数。

◆ setFDSize()

void cv::ximgproc::ContourFitting::setFDSize ( int n)
Python:
cv.ximgproc.ContourFitting.setFDSize(n) -> None

estimateTransformationがvector<Point>を使用するときのフーリエ記述子の数を設定する

引数
n最適な曲線マッチングに使用するフーリエ記述子の数。

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