🤖 AIによる機械翻訳(非公式) — これは OpenCV 5.0.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
Package org.opencv.objdetect
クラス Dictionary
- java.lang.Object
-
- org.opencv.objdetect.Dictionary
public class Dictionary extends java.lang.ObjectDictionary は同一サイズの一意な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]
-
-
フィールドの要約
フィールド Modifier and Type Field Description protected longnativeObj
-
コンストラクタの要約
コンストラクタ Modifier Constructor Description Dictionary()protectedDictionary​(long addr)Dictionary​(Mat bytesList, int _markerSize)Basic ArUco dictionary constructorDictionary​(Mat bytesList, int _markerSize, int maxcorr)Basic ArUco dictionary constructor
-
メソッドの要約
すべてのメソッド 静的メソッド インスタンスメソッド 具象メソッド Modifier and Type Method Description static Dictionary__fromPtr__​(long addr)voidgenerateImageMarker​(int id, int sidePixels, Mat _img)Generate a canonical marker imagevoidgenerateImageMarker​(int id, int sidePixels, Mat _img, int borderBits)Generate a canonical marker imageMatget_bytesList()intget_markerSize()intget_maxCorrectionBits()static MatgetBitsFromByteList​(Mat byteList, int markerSize)Transform list of bytes to matrix of bitsstatic MatgetBitsFromByteList​(Mat byteList, int markerSize, int rotationId)Transform list of bytes to matrix of bitsstatic MatgetByteListFromBits​(Mat bits)Transform matrix of bits to list of bytes with 4 marker rotationsintgetDistanceToId​(Mat bits, int id)Returns Hamming distance of the input bits to the specific id.intgetDistanceToId​(Mat bits, int id, boolean allRotations)Returns Hamming distance of the input bits to the specific id.MatgetMarkerBits​(int markerId)Get ground truth bits floatMatgetMarkerBits​(int markerId, int rotationId)Get ground truth bits floatlonggetNativeObjAddr()booleanidentify​(Mat onlyBits, int[] idx, int[] rotation, double maxCorrectionRate)Given a matrix of bits.booleanidentify​(Mat onlyCellPixelRatio, int[] idx, int[] rotation, double maxCorrectionRate, float validBitIdThreshold)Given a matrix of pixel ratio raging from 0 to 1.voidset_bytesList​(Mat bytesList)voidset_markerSize​(int markerSize)voidset_maxCorrectionBits​(int maxCorrectionBits)
-
-
-
コンストラクタの詳細
-
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. IfallRotationsflag 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. IfallRotationsflag 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)
-
-