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

クラス LightGlueMatcher


  • public class LightGlueMatcher extends DescriptorMatcher
    LightGlue 特徴マッチャ。LightGlue は CITE: Lindenberger23 に記述されている CNN ベースの特徴マッチャである。2 枚の画像のキーポイント位置と記述子を受け取り、マッチペアを直接予測する。記述子間の距離を計算する従来のマッチャと異なり、LightGlue はアテンション機構を用いて、各候補マッチペアに対する信頼度スコアを生成する。このマッチャは DescriptorMatcher を継承し、標準の match(), knnMatch(), radiusMatch() インターフェイスをサポートする。マッチングの前に、コンテキスト(キーポイントと画像サイズ)を setPairInfo() を介して与える必要がある。
    • コンストラクタの詳細

      • LightGlueMatcher

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

      • create

        public static LightGlueMatcher create​(java.lang.String modelPath,
                                              float scoreThreshold,
                                              int backend,
                                              int target)
        Creates LightGlueMatcher from a model file path.
        引数:
        modelPath - ONNX モデルファイルへのパス。
        scoreThreshold - マッチ信頼度のしきい値。
        backend - DNNバックエンド
        target - DNNターゲット
        戻り値:
        自動生成
      • create

        public static LightGlueMatcher create​(java.lang.String modelPath,
                                              float scoreThreshold,
                                              int backend)
        Creates LightGlueMatcher from a model file path.
        引数:
        modelPath - ONNX モデルファイルへのパス。
        scoreThreshold - マッチ信頼度のしきい値。
        backend - DNNバックエンド
        戻り値:
        自動生成
      • create

        public static LightGlueMatcher create​(java.lang.String modelPath,
                                              float scoreThreshold)
        Creates LightGlueMatcher from a model file path.
        引数:
        modelPath - ONNX モデルファイルへのパス。
        scoreThreshold - マッチ信頼度のしきい値。
        戻り値:
        自動生成
      • create

        public static LightGlueMatcher create​(java.lang.String modelPath)
        Creates LightGlueMatcher from a model file path.
        引数:
        modelPath - ONNX モデルファイルへのパス。
        戻り値:
        自動生成
      • createFromMemory

        public static LightGlueMatcher createFromMemory​(MatOfByte modelData,
                                                        float scoreThreshold,
                                                        int backend,
                                                        int target)
        Creates LightGlueMatcher from in-memory model data.
        引数:
        modelData - モデルデータを含むバッファ。
        scoreThreshold - マッチ信頼度のしきい値。
        backend - DNNバックエンド
        target - DNNターゲット
        戻り値:
        自動生成
      • createFromMemory

        public static LightGlueMatcher createFromMemory​(MatOfByte modelData,
                                                        float scoreThreshold,
                                                        int backend)
        Creates LightGlueMatcher from in-memory model data.
        引数:
        modelData - モデルデータを含むバッファ。
        scoreThreshold - マッチ信頼度のしきい値。
        backend - DNNバックエンド
        戻り値:
        自動生成
      • createFromMemory

        public static LightGlueMatcher createFromMemory​(MatOfByte modelData,
                                                        float scoreThreshold)
        Creates LightGlueMatcher from in-memory model data.
        引数:
        modelData - モデルデータを含むバッファ。
        scoreThreshold - マッチ信頼度のしきい値。
        戻り値:
        自動生成
      • createFromMemory

        public static LightGlueMatcher createFromMemory​(MatOfByte modelData)
        Creates LightGlueMatcher from in-memory model data.
        引数:
        modelData - モデルデータを含むバッファ。
        戻り値:
        自動生成
      • setPairInfo

        public void setPairInfo​(Mat queryKpts,
                                Mat trainKpts,
                                Size queryImageSize,
                                Size trainImageSize)
        Sets the keypoint and image size context for the next match() call. This provides the spatial context that LightGlue needs in addition to descriptors. Must be called before match()/knnMatch()/radiusMatch() unless using automatic context from in-process ALIKED instances.
        引数:
        queryKpts - クエリ画像のキーポイント(x,y 座標を持つ Nx2 の float 行列)。
        trainKpts - 学習画像のキーポイント(x,y 座標を持つ Nx2 の float 行列)。
        queryImageSize - クエリ画像のサイズ (width, height)。
        trainImageSize - 学習画像のサイズ (width, height)。
      • setPairInfo

        public void setPairInfo​(Mat queryKpts,
                                Mat trainKpts,
                                Size queryImageSize)
        Sets the keypoint and image size context for the next match() call. This provides the spatial context that LightGlue needs in addition to descriptors. Must be called before match()/knnMatch()/radiusMatch() unless using automatic context from in-process ALIKED instances.
        引数:
        queryKpts - クエリ画像のキーポイント(x,y 座標を持つ Nx2 の float 行列)。
        trainKpts - 学習画像のキーポイント(x,y 座標を持つ Nx2 の float 行列)。
        queryImageSize - クエリ画像のサイズ (width, height)。
      • setPairInfo

        public void setPairInfo​(Mat queryKpts,
                                Mat trainKpts)
        Sets the keypoint and image size context for the next match() call. This provides the spatial context that LightGlue needs in addition to descriptors. Must be called before match()/knnMatch()/radiusMatch() unless using automatic context from in-process ALIKED instances.
        引数:
        queryKpts - クエリ画像のキーポイント(x,y 座標を持つ Nx2 の float 行列)。
        trainKpts - 学習画像のキーポイント(x,y 座標を持つ Nx2 の float 行列)。
      • clearPairInfo

        public void clearPairInfo()
        Clears stored pair context information.