🤖 AIによる機械翻訳(非公式) — これは OpenCV 5.0.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
Package org.opencv.objdetect
クラス ArucoDetector
- java.lang.Object
-
- org.opencv.core.Algorithm
-
- org.opencv.objdetect.ArucoDetector
public class ArucoDetector extends Algorithm
ArucoDetector クラスの主な機能は、detectMarkers() メソッドによる画像中のマーカー検出である。画像内でいくつかのマーカーを検出した後、refineDetectedMarkers() メソッドを用いて、このディクショナリから未検出のマーカーを探し出すことができる。参照: DetectorParameters, RefineParameters
-
-
コンストラクタの要約
コンストラクタ Modifier Constructor Description ArucoDetector()Basic ArucoDetector constructorprotectedArucoDetector​(long addr)ArucoDetector​(Dictionary dictionary)Basic ArucoDetector constructorArucoDetector​(Dictionary dictionary, DetectorParameters detectorParams)Basic ArucoDetector constructorArucoDetector​(Dictionary dictionary, DetectorParameters detectorParams, RefineParameters refineParams)Basic ArucoDetector constructor
-
メソッドの要約
すべてのメソッド 静的メソッド インスタンスメソッド 具象メソッド Modifier and Type Method Description static ArucoDetector__fromPtr__​(long addr)voiddetectMarkers​(Mat image, java.util.List<Mat> corners, Mat ids)Basic marker detectionvoiddetectMarkers​(Mat image, java.util.List<Mat> corners, Mat ids, java.util.List<Mat> rejectedImgPoints)Basic marker detectionvoiddetectMarkersMultiDict​(Mat image, java.util.List<Mat> corners, Mat ids)Basic marker detectionvoiddetectMarkersMultiDict​(Mat image, java.util.List<Mat> corners, Mat ids, java.util.List<Mat> rejectedImgPoints)Basic marker detectionvoiddetectMarkersMultiDict​(Mat image, java.util.List<Mat> corners, Mat ids, java.util.List<Mat> rejectedImgPoints, Mat dictIndices)Basic marker detectionvoiddetectMarkersWithConfidence​(Mat image, java.util.List<Mat> corners, Mat ids, Mat markersConfidence)Marker detection with confidence computationvoiddetectMarkersWithConfidence​(Mat image, java.util.List<Mat> corners, Mat ids, Mat markersConfidence, java.util.List<Mat> rejectedImgPoints)Marker detection with confidence computationDetectorParametersgetDetectorParameters()DictionarygetDictionary()Returns first dictionary from internal list used for marker detection.RefineParametersgetRefineParameters()voidrefineDetectedMarkers​(Mat image, Board board, java.util.List<Mat> detectedCorners, Mat detectedIds, java.util.List<Mat> rejectedCorners)Refine not detected markers based on the already detected and the board layoutvoidrefineDetectedMarkers​(Mat image, Board board, java.util.List<Mat> detectedCorners, Mat detectedIds, java.util.List<Mat> rejectedCorners, Mat cameraMatrix)Refine not detected markers based on the already detected and the board layoutvoidrefineDetectedMarkers​(Mat image, Board board, java.util.List<Mat> detectedCorners, Mat detectedIds, java.util.List<Mat> rejectedCorners, Mat cameraMatrix, Mat distCoeffs)Refine not detected markers based on the already detected and the board layoutvoidrefineDetectedMarkers​(Mat image, Board board, java.util.List<Mat> detectedCorners, Mat detectedIds, java.util.List<Mat> rejectedCorners, Mat cameraMatrix, Mat distCoeffs, Mat recoveredIdxs)Refine not detected markers based on the already detected and the board layoutvoidsetDetectorParameters​(DetectorParameters detectorParameters)voidsetDictionary​(Dictionary dictionary)Sets and replaces the first dictionary in internal list to be used for marker detection.voidsetRefineParameters​(RefineParameters refineParameters)-
クラス org.opencv.core.Algorithm から継承されたメソッド
clear, empty, getDefaultName, getNativeObjAddr, save
-
-
-
-
コンストラクタの詳細
-
ArucoDetector
protected ArucoDetector​(long addr)
-
ArucoDetector
public ArucoDetector​(Dictionary dictionary, DetectorParameters detectorParams, RefineParameters refineParams)
Basic ArucoDetector constructor- 引数:
dictionary- 検索対象となるマーカーの種類を示すdetectorParams- マーカー検出の引数refineParams- マーカーのリファイン検出の引数
-
ArucoDetector
public ArucoDetector​(Dictionary dictionary, DetectorParameters detectorParams)
Basic ArucoDetector constructor- 引数:
dictionary- 検索対象となるマーカーの種類を示すdetectorParams- マーカー検出の引数
-
ArucoDetector
public ArucoDetector​(Dictionary dictionary)
Basic ArucoDetector constructor- 引数:
dictionary- 検索対象となるマーカーの種類を示す
-
ArucoDetector
public ArucoDetector()
Basic ArucoDetector constructor
-
-
メソッドの詳細
-
__fromPtr__
public static ArucoDetector __fromPtr__​(long addr)
-
detectMarkers
public void detectMarkers​(Mat image, java.util.List<Mat> corners, Mat ids, java.util.List<Mat> rejectedImgPoints)
Basic marker detection- 引数:
image- 入力画像corners- 検出されたマーカーのコーナーのベクトル。各マーカーについて、その4つのコーナーが提供される (例: std::vector<std::vector<cv::Point2f> > )。N個のマーカーが検出された場合、この配列の次元は Nx4 となる。コーナーの順序は時計回りである。ids- 検出されたマーカーの識別子のベクトル。識別子は int 型である (例: std::vector<int>)。N個のマーカーが検出された場合、ids のサイズも N となる。識別子は imgPoints 配列内のマーカーと同じ順序を持つ。rejectedImgPoints- 内部コードが正しいコード化になっていない正方形の imgPoints を含む。デバッグ目的に有用である。 入力画像に対してマーカー検出を行う。最初に指定したディクショナリに含まれるマーカーのみが検索される。検出された各マーカーについて、画像中のコーナーの2D位置とそれに対応する識別子を返す。この関数は姿勢推定 (pose estimation) を行わないことに注意。覚え書き: この関数はレンズ歪みの補正や考慮を行わない。カメラパラメータが既知の場合は、対応するカメラモデルを用いて入力画像の歪みを補正することを推奨する。参照: undistort, estimatePoseSingleMarkers, estimatePoseBoard
-
detectMarkers
public void detectMarkers​(Mat image, java.util.List<Mat> corners, Mat ids)
Basic marker detection- 引数:
image- 入力画像corners- 検出されたマーカーのコーナーのベクトル。各マーカーについて、その4つのコーナーが提供される (例: std::vector<std::vector<cv::Point2f> > )。N個のマーカーが検出された場合、この配列の次元は Nx4 となる。コーナーの順序は時計回りである。ids- 検出されたマーカーの識別子のベクトル。識別子は int 型である (例: std::vector<int>)。N個のマーカーが検出された場合、ids のサイズも N となる。識別子は imgPoints 配列内のマーカーと同じ順序を持つ。 correct codification. Useful for debugging purposes. Performs marker detection in the input image. Only markers included in the first specified dictionary are searched. For each detected marker, it returns the 2D position of its corner in the image and its corresponding identifier. Note that this function does not perform pose estimation. 覚え書き: The function does not correct lens distortion or takes it into account. It's recommended to undistort input image with corresponding camera model, if camera parameters are known SEE: undistort, estimatePoseSingleMarkers, estimatePoseBoard
-
detectMarkersWithConfidence
public void detectMarkersWithConfidence​(Mat image, java.util.List<Mat> corners, Mat ids, Mat markersConfidence, java.util.List<Mat> rejectedImgPoints)
Marker detection with confidence computation- 引数:
image- 入力画像corners- 検出されたマーカーのコーナーのベクトル。各マーカーについて、その4つのコーナーが提供される (例: std::vector<std::vector<cv::Point2f> > )。N個のマーカーが検出された場合、この配列の次元は Nx4 となる。コーナーの順序は時計回りである。ids- 検出されたマーカーの識別子のベクトル。識別子は int 型である (例: std::vector<int>)。N個のマーカーが検出された場合、ids のサイズも N となる。識別子は imgPoints 配列内のマーカーと同じ順序を持つ。markersConfidence- マーカー検出の正規化された信頼度 [0;1] を含む。これは正規化された不確かさ (誤ったピクセル検出の割合) を 1 から引いた値として定義され、1 はピクセル単位で完璧な検出を表す。信頼度の値は float 型である (例: std::vector<float>)rejectedImgPoints- 内部コードが正しいコード化になっていない正方形の imgPoints を含む。デバッグ目的に有用である。 入力画像に対してマーカー検出を行う。最初に指定したディクショナリに含まれるマーカーのみが検索される。検出された各マーカーについて、画像中のコーナーの2D位置とそれに対応する識別子を返す。この関数は姿勢推定 (pose estimation) を行わないことに注意。覚え書き: この関数はレンズ歪みの補正や考慮を行わない。カメラパラメータが既知の場合は、対応するカメラモデルを用いて入力画像の歪みを補正することを推奨する。参照: undistort, estimatePoseSingleMarkers, estimatePoseBoard
-
detectMarkersWithConfidence
public void detectMarkersWithConfidence​(Mat image, java.util.List<Mat> corners, Mat ids, Mat markersConfidence)
Marker detection with confidence computation- 引数:
image- 入力画像corners- 検出されたマーカーのコーナーのベクトル。各マーカーについて、その4つのコーナーが提供される (例: std::vector<std::vector<cv::Point2f> > )。N個のマーカーが検出された場合、この配列の次元は Nx4 となる。コーナーの順序は時計回りである。ids- 検出されたマーカーの識別子のベクトル。識別子は int 型である (例: std::vector<int>)。N個のマーカーが検出された場合、ids のサイズも N となる。識別子は imgPoints 配列内のマーカーと同じ順序を持つ。markersConfidence- マーカー検出の正規化された信頼度 [0;1] を含む。これは正規化された不確かさ (誤ったピクセル検出の割合) を 1 から引いた値として定義され、1 はピクセル単位で完璧な検出を表す。信頼度の値は float 型である (例: std::vector<float>) correct codification. Useful for debugging purposes. Performs marker detection in the input image. Only markers included in the first specified dictionary are searched. For each detected marker, it returns the 2D position of its corner in the image and its corresponding identifier. Note that this function does not perform pose estimation. 覚え書き: The function does not correct lens distortion or takes it into account. It's recommended to undistort input image with corresponding camera model, if camera parameters are known SEE: undistort, estimatePoseSingleMarkers, estimatePoseBoard
-
refineDetectedMarkers
public void refineDetectedMarkers​(Mat image, Board board, java.util.List<Mat> detectedCorners, Mat detectedIds, java.util.List<Mat> rejectedCorners, Mat cameraMatrix, Mat distCoeffs, Mat recoveredIdxs)
Refine not detected markers based on the already detected and the board layout- 引数:
image- 入力画像board- ボード内のマーカーの配置。detectedCorners- すでに検出されているマーカーのコーナーのベクトル。detectedIds- すでに検出されているマーカーの識別子のベクトル。rejectedCorners- マーカー検出処理中に棄却された候補のベクトル。cameraMatrix- 省略可能な入力の 3x3 浮動小数点カメラ行列 \(A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\)distCoeffs- 4, 5, 8, 12要素のいずれかからなる省略可能な歪み係数のベクトル \((k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\)recoveredIdxs- 元の rejectedCorners 配列内で回復された候補のインデックスを返す省略可能な配列。 この関数は、基本の detecMarkers 関数で検出されなかったマーカーを見つけようとする。まず、現在検出されているマーカーとボードの配置に基づいて、欠落したマーカーの位置を補間する。次に、minRepDistance および errorCorrectionRate の引数に基づいて、再投影されたマーカーと棄却された候補との対応を見つけようとする。カメラパラメータと歪み係数が与えられている場合、欠落したマーカーは projectPoint 関数を用いて再投影される。与えられていない場合、欠落したマーカーの投影はグローバルホモグラフィを用いて補間され、ボード内のすべてのマーカーコーナーは同じ Z 座標を持つ必要がある。覚え書き: この関数はボードが1つのディクショナリのマーカーのみを含むことを前提とするため、最初に設定されたディクショナリのみが使用される。正しく動作させるには、ボードのディクショナリと一致している必要がある。
-
refineDetectedMarkers
public void refineDetectedMarkers​(Mat image, Board board, java.util.List<Mat> detectedCorners, Mat detectedIds, java.util.List<Mat> rejectedCorners, Mat cameraMatrix, Mat distCoeffs)
Refine not detected markers based on the already detected and the board layout- 引数:
image- 入力画像board- ボード内のマーカーの配置。detectedCorners- すでに検出されているマーカーのコーナーのベクトル。detectedIds- すでに検出されているマーカーの識別子のベクトル。rejectedCorners- マーカー検出処理中に棄却された候補のベクトル。cameraMatrix- 省略可能な入力の 3x3 浮動小数点カメラ行列 \(A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\)distCoeffs- 4個、5個、8個または12個の要素からなる省略可能な歪み係数のベクトル \((k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\) original rejectedCorners array. This function tries to find markers that were not detected in the basic detecMarkers function. First, based on the current detected marker and the board layout, the function interpolates the position of the missing markers. Then it tries to find correspondence between the reprojected markers and the rejected candidates based on the minRepDistance and errorCorrectionRate parameters. If camera parameters and distortion coefficients are provided, missing markers are reprojected using projectPoint function. If not, missing marker projections are interpolated using global homography, and all the marker corners in the board must have the same Z coordinate. 覚え書き: This function assumes that the board only contains markers from one dictionary, so only the first configured dictionary is used. It has to match the dictionary of the board to work properly.
-
refineDetectedMarkers
public void refineDetectedMarkers​(Mat image, Board board, java.util.List<Mat> detectedCorners, Mat detectedIds, java.util.List<Mat> rejectedCorners, Mat cameraMatrix)
Refine not detected markers based on the already detected and the board layout- 引数:
image- 入力画像board- ボード内のマーカーの配置。detectedCorners- すでに検出されているマーカーのコーナーのベクトル。detectedIds- すでに検出されているマーカーの識別子のベクトル。rejectedCorners- マーカー検出処理中に棄却された候補のベクトル。cameraMatrix- 省略可能な入力の 3x3 浮動小数点カメラ行列 \(A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\) \((k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\) of 4, 5, 8 or 12 elements original rejectedCorners array. This function tries to find markers that were not detected in the basic detecMarkers function. First, based on the current detected marker and the board layout, the function interpolates the position of the missing markers. Then it tries to find correspondence between the reprojected markers and the rejected candidates based on the minRepDistance and errorCorrectionRate parameters. If camera parameters and distortion coefficients are provided, missing markers are reprojected using projectPoint function. If not, missing marker projections are interpolated using global homography, and all the marker corners in the board must have the same Z coordinate. 覚え書き: This function assumes that the board only contains markers from one dictionary, so only the first configured dictionary is used. It has to match the dictionary of the board to work properly.
-
refineDetectedMarkers
public void refineDetectedMarkers​(Mat image, Board board, java.util.List<Mat> detectedCorners, Mat detectedIds, java.util.List<Mat> rejectedCorners)
Refine not detected markers based on the already detected and the board layout- 引数:
image- 入力画像board- ボード内のマーカーの配置。detectedCorners- すでに検出されているマーカーのコーナーのベクトル。detectedIds- すでに検出されているマーカーの識別子のベクトル。rejectedCorners- マーカー検出処理中に棄却された候補のベクトル。 \(A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\) \((k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\) of 4, 5, 8 or 12 elements original rejectedCorners array. This function tries to find markers that were not detected in the basic detecMarkers function. First, based on the current detected marker and the board layout, the function interpolates the position of the missing markers. Then it tries to find correspondence between the reprojected markers and the rejected candidates based on the minRepDistance and errorCorrectionRate parameters. If camera parameters and distortion coefficients are provided, missing markers are reprojected using projectPoint function. If not, missing marker projections are interpolated using global homography, and all the marker corners in the board must have the same Z coordinate. 覚え書き: This function assumes that the board only contains markers from one dictionary, so only the first configured dictionary is used. It has to match the dictionary of the board to work properly.
-
detectMarkersMultiDict
public void detectMarkersMultiDict​(Mat image, java.util.List<Mat> corners, Mat ids, java.util.List<Mat> rejectedImgPoints, Mat dictIndices)
Basic marker detection- 引数:
image- 入力画像corners- 検出されたマーカーのコーナーのベクトル。各マーカーについて、その4つのコーナーが提供される (例: std::vector<std::vector<cv::Point2f> > )。N個のマーカーが検出された場合、この配列の次元は Nx4 となる。コーナーの順序は時計回りである。ids- 検出されたマーカーの識別子のベクトル。識別子は int 型である (例: std::vector<int>)。N個のマーカーが検出された場合、ids のサイズも N となる。識別子は imgPoints 配列内のマーカーと同じ順序を持つ。rejectedImgPoints- 内部コードが正しいコード化になっていない正方形の imgPoints を含む。デバッグ目的に有用である。dictIndices- 検出された各マーカーのディクショナリインデックスのベクトル。対応するディクショナリのリストを取得するには getDictionaries() を使用する。 入力画像に対してマーカー検出を行う。指定したディクショナリに含まれるマーカーのみが検索される。検出された各マーカーについて、画像中のコーナーの2D位置とそれに対応する識別子を返す。この関数は姿勢推定 (pose estimation) を行わないことに注意。覚え書き: この関数はレンズ歪みの補正や考慮を行わない。カメラパラメータが既知の場合は、対応するカメラモデルを用いて入力画像の歪みを補正することを推奨する。参照: undistort, estimatePoseSingleMarkers, estimatePoseBoard
-
detectMarkersMultiDict
public void detectMarkersMultiDict​(Mat image, java.util.List<Mat> corners, Mat ids, java.util.List<Mat> rejectedImgPoints)
Basic marker detection- 引数:
image- 入力画像corners- 検出されたマーカーのコーナーのベクトル。各マーカーについて、その4つのコーナーが提供される (例: std::vector<std::vector<cv::Point2f> > )。N個のマーカーが検出された場合、この配列の次元は Nx4 となる。コーナーの順序は時計回りである。ids- 検出されたマーカーの識別子のベクトル。識別子は int 型である (例: std::vector<int>)。N個のマーカーが検出された場合、ids のサイズも N となる。識別子は imgPoints 配列内のマーカーと同じ順序を持つ。rejectedImgPoints- 内部コードが正しいコード化になっていない正方形の imgPoints を含む。デバッグ目的に有用である。 list of corresponding dictionaries. Performs marker detection in the input image. Only markers included in the specific dictionaries are searched. For each detected marker, it returns the 2D position of its corner in the image and its corresponding identifier. Note that this function does not perform pose estimation. 覚え書き: The function does not correct lens distortion or takes it into account. It's recommended to undistort input image with corresponding camera model, if camera parameters are known SEE: undistort, estimatePoseSingleMarkers, estimatePoseBoard
-
detectMarkersMultiDict
public void detectMarkersMultiDict​(Mat image, java.util.List<Mat> corners, Mat ids)
Basic marker detection- 引数:
image- 入力画像corners- 検出されたマーカーのコーナーのベクトル。各マーカーについて、その4つのコーナーが提供される (例: std::vector<std::vector<cv::Point2f> > )。N個のマーカーが検出された場合、この配列の次元は Nx4 となる。コーナーの順序は時計回りである。ids- 検出されたマーカーの識別子のベクトル。識別子は int 型である (例: std::vector<int>)。N個のマーカーが検出された場合、ids のサイズも N となる。識別子は imgPoints 配列内のマーカーと同じ順序を持つ。 correct codification. Useful for debugging purposes. list of corresponding dictionaries. Performs marker detection in the input image. Only markers included in the specific dictionaries are searched. For each detected marker, it returns the 2D position of its corner in the image and its corresponding identifier. Note that this function does not perform pose estimation. 覚え書き: The function does not correct lens distortion or takes it into account. It's recommended to undistort input image with corresponding camera model, if camera parameters are known SEE: undistort, estimatePoseSingleMarkers, estimatePoseBoard
-
getDictionary
public Dictionary getDictionary()
Returns first dictionary from internal list used for marker detection.- 戻り値:
- 設定された ArucoDetector の最初のディクショナリ。
-
setDictionary
public void setDictionary​(Dictionary dictionary)
Sets and replaces the first dictionary in internal list to be used for marker detection.- 引数:
dictionary- 内部リストの最初のディクショナリを置き換える新しいディクショナリ。
-
getDetectorParameters
public DetectorParameters getDetectorParameters()
-
setDetectorParameters
public void setDetectorParameters​(DetectorParameters detectorParameters)
-
getRefineParameters
public RefineParameters getRefineParameters()
-
setRefineParameters
public void setRefineParameters​(RefineParameters refineParameters)
-
-