🤖 AIによる機械翻訳(非公式) — これは OpenCV 4.13.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。

クラス ContourFitting


  • public class ContourFitting extends Algorithm
    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

        protected ContourFitting​(long addr)
    • メソッドの詳細

      • __fromPtr__

        public static ContourFitting __fromPtr__​(long addr)
      • estimateTransformation

        public void estimateTransformation​(Mat src,
                                           Mat dst,
                                           Mat alphaPhiST,
                                           double[] dist,
                                           boolean fdContour)
        Fit two closed curves using fourier descriptors. More details in CITE: PersoonFu1977 and CITE: BergerRaghunathan1998
        引数:
        src - 1つ目の形状を定義する輪郭。
        dst - 2つ目の形状(ターゲット)を定義する輪郭。
        alphaPhiST - : \( \alpha \)=alphaPhiST(0,0), \( \phi \)=alphaPhiST(0,1) (ラジアン単位), s=alphaPhiST(0,2), Tx=alphaPhiST(0,3), Ty=alphaPhiST(0,4) 回転中心
        dist - マッチング後のsrcとdstの間の距離。
        fdContour - falseの場合srcとdstは輪郭、trueの場合srcとdstはフーリエ記述子である。
      • estimateTransformation

        public void estimateTransformation​(Mat src,
                                           Mat dst,
                                           Mat alphaPhiST,
                                           double[] dist)
        Fit two closed curves using fourier descriptors. More details in CITE: PersoonFu1977 and CITE: BergerRaghunathan1998
        引数:
        src - 1つ目の形状を定義する輪郭。
        dst - 2つ目の形状(ターゲット)を定義する輪郭。
        alphaPhiST - : \( \alpha \)=alphaPhiST(0,0), \( \phi \)=alphaPhiST(0,1) (ラジアン単位), s=alphaPhiST(0,2), Tx=alphaPhiST(0,3), Ty=alphaPhiST(0,4) 回転中心
        dist - マッチング後のsrcとdstの間の距離。
      • setCtrSize

        public void setCtrSize​(int n)
        set number of Fourier descriptors used in estimateTransformation
        引数:
        n - リサンプリング後の輪郭点数に等しいフーリエ記述子の数。
      • setFDSize

        public void setFDSize​(int n)
        set number of Fourier descriptors when estimateTransformation used vector<Point>
        引数:
        n - 最適な曲線マッチングに用いるフーリエ記述子の個数。
      • getCtrSize

        public int getCtrSize()
        戻り値:
        フーリエ記述子の数
      • getFDSize

        public int getFDSize()
        戻り値:
        最適な曲線マッチングに使用するフーリエ記述子の数