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

クラス Dictionary


  • public class Dictionary extends java.lang.Object
    Dictionary は同一サイズの一意なArUcoマーカーの集合である。bytesList は4番目のチャンネルを持つ2次元のMat(CV_8UC4型を使用)として格納され、マーカーのコードワードを次のように保持する。 - bytesList.rows は辞書サイズ - 各マーカーは nbytes = ceil(markerSize*markerSize/8.) バイトで符号化される - 各行にはマーカーの4回転すべてが含まれるため、その長さは 4*nbytes である - bytesList[i] 行内のバイト順は次のとおり: //bytes without rotation/bytes with rotation 1/bytes with rotation 2/bytes with rotation 3// したがって bytesList.ptr(i)[k*nbytes + j] は、i番目のマーカーのk番目の回転におけるj番目のバイトである。注意: Pythonバインディングは bytesList の形状が dictionary_size x nbytes x 4 の行列を生成するが、C++版と同様にインデックス指定すべきである。i番目のマーカーのk番目の回転におけるj番目のバイトを取得するPythonの例: aruco_dict.bytesList[id].ravel()[k*nbytes + j]
    • フィールドの詳細

      • nativeObj

        protected final long nativeObj
    • コンストラクタの詳細

      • Dictionary

        protected Dictionary​(long addr)
      • Dictionary

        public Dictionary()
      • Dictionary

        public Dictionary​(Mat bytesList,
                          int _markerSize,
                          int maxcorr)
        Basic ArUco dictionary constructor
        引数:
        bytesList - 辞書内のすべてのArUcoマーカーのビット。メモリレイアウトはクラスの説明を参照
        _markerSize - ArUcoマーカーのサイズ(単位数)
        maxcorr - 補正可能な最大ビット数
      • Dictionary

        public Dictionary​(Mat bytesList,
                          int _markerSize)
        Basic ArUco dictionary constructor
        引数:
        bytesList - 辞書内のすべてのArUcoマーカーのビット。メモリレイアウトはクラスの説明を参照
        _markerSize - ArUcoマーカーのサイズ(単位数)
    • メソッドの詳細

      • getNativeObjAddr

        public long getNativeObjAddr()
      • __fromPtr__

        public static Dictionary __fromPtr__​(long addr)
      • identify

        public boolean identify​(Mat onlyBits,
                                int[] idx,
                                int[] rotation,
                                double maxCorrectionRate)
        Given a matrix of bits. Returns whether if marker is identified or not. Returns reference to the marker id in the dictionary (if any) and its rotation.
        引数:
        onlyBits - 自動生成
        idx - 自動生成
        rotation - 自動生成
        maxCorrectionRate - 自動生成
        戻り値:
        自動生成
      • identify

        public boolean identify​(Mat onlyCellPixelRatio,
                                int[] idx,
                                int[] rotation,
                                double maxCorrectionRate,
                                float validBitIdThreshold)
        Given a matrix of pixel ratio raging from 0 to 1. Returns whether if marker is identified or not. Returns reference to the marker id in the dictionary (if any) and its rotation.
        引数:
        onlyCellPixelRatio - 自動生成
        idx - 自動生成
        rotation - 自動生成
        maxCorrectionRate - 自動生成
        validBitIdThreshold - 自動生成
        戻り値:
        自動生成
      • getDistanceToId

        public int getDistanceToId​(Mat bits,
                                   int id,
                                   boolean allRotations)
        Returns Hamming distance of the input bits to the specific id. If allRotations flag is set, the four possible marker rotations are considered
        引数:
        bits - 自動生成
        id - 自動生成
        allRotations - 自動生成
        戻り値:
        自動生成
      • getDistanceToId

        public int getDistanceToId​(Mat bits,
                                   int id)
        Returns Hamming distance of the input bits to the specific id. If allRotations flag is set, the four possible marker rotations are considered
        引数:
        bits - 自動生成
        id - 自動生成
        戻り値:
        自動生成
      • generateImageMarker

        public void generateImageMarker​(int id,
                                        int sidePixels,
                                        Mat _img,
                                        int borderBits)
        Generate a canonical marker image
        引数:
        id - 自動生成
        sidePixels - 自動生成
        _img - 自動生成
        borderBits - 自動生成
      • generateImageMarker

        public void generateImageMarker​(int id,
                                        int sidePixels,
                                        Mat _img)
        Generate a canonical marker image
        引数:
        id - 自動生成
        sidePixels - 自動生成
        _img - 自動生成
      • getByteListFromBits

        public static Mat getByteListFromBits​(Mat bits)
        Transform matrix of bits to list of bytes with 4 marker rotations
        引数:
        bits - 自動生成
        戻り値:
        自動生成
      • getBitsFromByteList

        public static Mat getBitsFromByteList​(Mat byteList,
                                              int markerSize,
                                              int rotationId)
        Transform list of bytes to matrix of bits
        引数:
        byteList - 自動生成
        markerSize - 自動生成
        rotationId - 自動生成
        戻り値:
        自動生成
      • getBitsFromByteList

        public static Mat getBitsFromByteList​(Mat byteList,
                                              int markerSize)
        Transform list of bytes to matrix of bits
        引数:
        byteList - 自動生成
        markerSize - 自動生成
        戻り値:
        自動生成
      • getMarkerBits

        public Mat getMarkerBits​(int markerId,
                                 int rotationId)
        Get ground truth bits float
        引数:
        markerId - 自動生成
        rotationId - 自動生成
        戻り値:
        自動生成
      • getMarkerBits

        public Mat getMarkerBits​(int markerId)
        Get ground truth bits float
        引数:
        markerId - 自動生成
        戻り値:
        自動生成
      • get_bytesList

        public Mat get_bytesList()
      • set_bytesList

        public void set_bytesList​(Mat bytesList)
      • get_markerSize

        public int get_markerSize()
      • set_markerSize

        public void set_markerSize​(int markerSize)
      • get_maxCorrectionBits

        public int get_maxCorrectionBits()
      • set_maxCorrectionBits

        public void set_maxCorrectionBits​(int maxCorrectionBits)