ArucoDetector.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508
  1. using OpenCVForUnity.CoreModule;
  2. using OpenCVForUnity.UtilsModule;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Runtime.InteropServices;
  6. namespace OpenCVForUnity.ObjdetectModule
  7. {
  8. // C++: class ArucoDetector
  9. /**
  10. * The main functionality of ArucoDetector class is detection of markers in an image with detectMarkers() method.
  11. *
  12. * After detecting some markers in the image, you can try to find undetected markers from this dictionary with
  13. * refineDetectedMarkers() method.
  14. *
  15. * SEE: DetectorParameters, RefineParameters
  16. */
  17. public class ArucoDetector : Algorithm
  18. {
  19. protected override void Dispose(bool disposing)
  20. {
  21. try
  22. {
  23. if (disposing)
  24. {
  25. }
  26. if (IsEnabledDispose)
  27. {
  28. if (nativeObj != IntPtr.Zero)
  29. objdetect_ArucoDetector_delete(nativeObj);
  30. nativeObj = IntPtr.Zero;
  31. }
  32. }
  33. finally
  34. {
  35. base.Dispose(disposing);
  36. }
  37. }
  38. protected internal ArucoDetector(IntPtr addr) : base(addr) { }
  39. // internal usage only
  40. public static new ArucoDetector __fromPtr__(IntPtr addr) { return new ArucoDetector(addr); }
  41. //
  42. // C++: cv::aruco::ArucoDetector::ArucoDetector(Dictionary dictionary = getPredefinedDictionary(cv::aruco::DICT_4X4_50), DetectorParameters detectorParams = DetectorParameters(), RefineParameters refineParams = RefineParameters())
  43. //
  44. /**
  45. * Basic ArucoDetector constructor
  46. *
  47. * param dictionary indicates the type of markers that will be searched
  48. * param detectorParams marker detection parameters
  49. * param refineParams marker refine detection parameters
  50. */
  51. public ArucoDetector(Dictionary dictionary, DetectorParameters detectorParams, RefineParameters refineParams) :
  52. base(DisposableObject.ThrowIfNullIntPtr(objdetect_ArucoDetector_ArucoDetector_10(dictionary.nativeObj, detectorParams.nativeObj, refineParams.nativeObj)))
  53. {
  54. }
  55. /**
  56. * Basic ArucoDetector constructor
  57. *
  58. * param dictionary indicates the type of markers that will be searched
  59. * param detectorParams marker detection parameters
  60. */
  61. public ArucoDetector(Dictionary dictionary, DetectorParameters detectorParams) :
  62. base(DisposableObject.ThrowIfNullIntPtr(objdetect_ArucoDetector_ArucoDetector_11(dictionary.nativeObj, detectorParams.nativeObj)))
  63. {
  64. }
  65. /**
  66. * Basic ArucoDetector constructor
  67. *
  68. * param dictionary indicates the type of markers that will be searched
  69. */
  70. public ArucoDetector(Dictionary dictionary) :
  71. base(DisposableObject.ThrowIfNullIntPtr(objdetect_ArucoDetector_ArucoDetector_12(dictionary.nativeObj)))
  72. {
  73. }
  74. /**
  75. * Basic ArucoDetector constructor
  76. *
  77. */
  78. public ArucoDetector() :
  79. base(DisposableObject.ThrowIfNullIntPtr(objdetect_ArucoDetector_ArucoDetector_13()))
  80. {
  81. }
  82. //
  83. // C++: void cv::aruco::ArucoDetector::detectMarkers(Mat image, vector_Mat& corners, Mat& ids, vector_Mat& rejectedImgPoints = vector_Mat())
  84. //
  85. /**
  86. * Basic marker detection
  87. *
  88. * param image input image
  89. * param corners vector of detected marker corners. For each marker, its four corners
  90. * are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers,
  91. * the dimensions of this array is Nx4. The order of the corners is clockwise.
  92. * param ids vector of identifiers of the detected markers. The identifier is of type int
  93. * (e.g. std::vector<int>). For N detected markers, the size of ids is also N.
  94. * The identifiers have the same order than the markers in the imgPoints array.
  95. * param rejectedImgPoints contains the imgPoints of those squares whose inner code has not a
  96. * correct codification. Useful for debugging purposes.
  97. *
  98. * Performs marker detection in the input image. Only markers included in the specific dictionary
  99. * are searched. For each detected marker, it returns the 2D position of its corner in the image
  100. * and its corresponding identifier.
  101. * Note that this function does not perform pose estimation.
  102. * <b>Note:</b> The function does not correct lens distortion or takes it into account. It's recommended to undistort
  103. * input image with corresponding camera model, if camera parameters are known
  104. * SEE: undistort, estimatePoseSingleMarkers, estimatePoseBoard
  105. */
  106. public void detectMarkers(Mat image, List<Mat> corners, Mat ids, List<Mat> rejectedImgPoints)
  107. {
  108. ThrowIfDisposed();
  109. if (image != null) image.ThrowIfDisposed();
  110. if (ids != null) ids.ThrowIfDisposed();
  111. Mat corners_mat = new Mat();
  112. Mat rejectedImgPoints_mat = new Mat();
  113. objdetect_ArucoDetector_detectMarkers_10(nativeObj, image.nativeObj, corners_mat.nativeObj, ids.nativeObj, rejectedImgPoints_mat.nativeObj);
  114. Converters.Mat_to_vector_Mat(corners_mat, corners);
  115. corners_mat.release();
  116. Converters.Mat_to_vector_Mat(rejectedImgPoints_mat, rejectedImgPoints);
  117. rejectedImgPoints_mat.release();
  118. }
  119. /**
  120. * Basic marker detection
  121. *
  122. * param image input image
  123. * param corners vector of detected marker corners. For each marker, its four corners
  124. * are provided, (e.g std::vector&lt;std::vector&lt;cv::Point2f&gt; &gt; ). For N detected markers,
  125. * the dimensions of this array is Nx4. The order of the corners is clockwise.
  126. * param ids vector of identifiers of the detected markers. The identifier is of type int
  127. * (e.g. std::vector&lt;int&gt;). For N detected markers, the size of ids is also N.
  128. * The identifiers have the same order than the markers in the imgPoints array.
  129. * correct codification. Useful for debugging purposes.
  130. *
  131. * Performs marker detection in the input image. Only markers included in the specific dictionary
  132. * are searched. For each detected marker, it returns the 2D position of its corner in the image
  133. * and its corresponding identifier.
  134. * Note that this function does not perform pose estimation.
  135. * <b>Note:</b> The function does not correct lens distortion or takes it into account. It's recommended to undistort
  136. * input image with corresponding camera model, if camera parameters are known
  137. * SEE: undistort, estimatePoseSingleMarkers, estimatePoseBoard
  138. */
  139. public void detectMarkers(Mat image, List<Mat> corners, Mat ids)
  140. {
  141. ThrowIfDisposed();
  142. if (image != null) image.ThrowIfDisposed();
  143. if (ids != null) ids.ThrowIfDisposed();
  144. Mat corners_mat = new Mat();
  145. objdetect_ArucoDetector_detectMarkers_11(nativeObj, image.nativeObj, corners_mat.nativeObj, ids.nativeObj);
  146. Converters.Mat_to_vector_Mat(corners_mat, corners);
  147. corners_mat.release();
  148. }
  149. //
  150. // C++: void cv::aruco::ArucoDetector::refineDetectedMarkers(Mat image, Board board, vector_Mat& detectedCorners, Mat& detectedIds, vector_Mat& rejectedCorners, Mat cameraMatrix = Mat(), Mat distCoeffs = Mat(), Mat& recoveredIdxs = Mat())
  151. //
  152. /**
  153. * Refine not detected markers based on the already detected and the board layout
  154. *
  155. * param image input image
  156. * param board layout of markers in the board.
  157. * param detectedCorners vector of already detected marker corners.
  158. * param detectedIds vector of already detected marker identifiers.
  159. * param rejectedCorners vector of rejected candidates during the marker detection process.
  160. * param cameraMatrix optional input 3x3 floating-point camera matrix
  161. * \(A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\)
  162. * param distCoeffs optional vector of distortion coefficients
  163. * \((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
  164. * param recoveredIdxs Optional array to returns the indexes of the recovered candidates in the
  165. * original rejectedCorners array.
  166. *
  167. * This function tries to find markers that were not detected in the basic detecMarkers function.
  168. * First, based on the current detected marker and the board layout, the function interpolates
  169. * the position of the missing markers. Then it tries to find correspondence between the reprojected
  170. * markers and the rejected candidates based on the minRepDistance and errorCorrectionRate parameters.
  171. * If camera parameters and distortion coefficients are provided, missing markers are reprojected
  172. * using projectPoint function. If not, missing marker projections are interpolated using global
  173. * homography, and all the marker corners in the board must have the same Z coordinate.
  174. */
  175. public void refineDetectedMarkers(Mat image, Board board, List<Mat> detectedCorners, Mat detectedIds, List<Mat> rejectedCorners, Mat cameraMatrix, Mat distCoeffs, Mat recoveredIdxs)
  176. {
  177. ThrowIfDisposed();
  178. if (image != null) image.ThrowIfDisposed();
  179. if (board != null) board.ThrowIfDisposed();
  180. if (detectedIds != null) detectedIds.ThrowIfDisposed();
  181. if (cameraMatrix != null) cameraMatrix.ThrowIfDisposed();
  182. if (distCoeffs != null) distCoeffs.ThrowIfDisposed();
  183. if (recoveredIdxs != null) recoveredIdxs.ThrowIfDisposed();
  184. Mat detectedCorners_mat = Converters.vector_Mat_to_Mat(detectedCorners);
  185. Mat rejectedCorners_mat = Converters.vector_Mat_to_Mat(rejectedCorners);
  186. objdetect_ArucoDetector_refineDetectedMarkers_10(nativeObj, image.nativeObj, board.nativeObj, detectedCorners_mat.nativeObj, detectedIds.nativeObj, rejectedCorners_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj, recoveredIdxs.nativeObj);
  187. Converters.Mat_to_vector_Mat(detectedCorners_mat, detectedCorners);
  188. detectedCorners_mat.release();
  189. Converters.Mat_to_vector_Mat(rejectedCorners_mat, rejectedCorners);
  190. rejectedCorners_mat.release();
  191. }
  192. /**
  193. * Refine not detected markers based on the already detected and the board layout
  194. *
  195. * param image input image
  196. * param board layout of markers in the board.
  197. * param detectedCorners vector of already detected marker corners.
  198. * param detectedIds vector of already detected marker identifiers.
  199. * param rejectedCorners vector of rejected candidates during the marker detection process.
  200. * param cameraMatrix optional input 3x3 floating-point camera matrix
  201. * \(A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\)
  202. * param distCoeffs optional vector of distortion coefficients
  203. * \((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
  204. * original rejectedCorners array.
  205. *
  206. * This function tries to find markers that were not detected in the basic detecMarkers function.
  207. * First, based on the current detected marker and the board layout, the function interpolates
  208. * the position of the missing markers. Then it tries to find correspondence between the reprojected
  209. * markers and the rejected candidates based on the minRepDistance and errorCorrectionRate parameters.
  210. * If camera parameters and distortion coefficients are provided, missing markers are reprojected
  211. * using projectPoint function. If not, missing marker projections are interpolated using global
  212. * homography, and all the marker corners in the board must have the same Z coordinate.
  213. */
  214. public void refineDetectedMarkers(Mat image, Board board, List<Mat> detectedCorners, Mat detectedIds, List<Mat> rejectedCorners, Mat cameraMatrix, Mat distCoeffs)
  215. {
  216. ThrowIfDisposed();
  217. if (image != null) image.ThrowIfDisposed();
  218. if (board != null) board.ThrowIfDisposed();
  219. if (detectedIds != null) detectedIds.ThrowIfDisposed();
  220. if (cameraMatrix != null) cameraMatrix.ThrowIfDisposed();
  221. if (distCoeffs != null) distCoeffs.ThrowIfDisposed();
  222. Mat detectedCorners_mat = Converters.vector_Mat_to_Mat(detectedCorners);
  223. Mat rejectedCorners_mat = Converters.vector_Mat_to_Mat(rejectedCorners);
  224. objdetect_ArucoDetector_refineDetectedMarkers_11(nativeObj, image.nativeObj, board.nativeObj, detectedCorners_mat.nativeObj, detectedIds.nativeObj, rejectedCorners_mat.nativeObj, cameraMatrix.nativeObj, distCoeffs.nativeObj);
  225. Converters.Mat_to_vector_Mat(detectedCorners_mat, detectedCorners);
  226. detectedCorners_mat.release();
  227. Converters.Mat_to_vector_Mat(rejectedCorners_mat, rejectedCorners);
  228. rejectedCorners_mat.release();
  229. }
  230. /**
  231. * Refine not detected markers based on the already detected and the board layout
  232. *
  233. * param image input image
  234. * param board layout of markers in the board.
  235. * param detectedCorners vector of already detected marker corners.
  236. * param detectedIds vector of already detected marker identifiers.
  237. * param rejectedCorners vector of rejected candidates during the marker detection process.
  238. * param cameraMatrix optional input 3x3 floating-point camera matrix
  239. * \(A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\)
  240. * \((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
  241. * original rejectedCorners array.
  242. *
  243. * This function tries to find markers that were not detected in the basic detecMarkers function.
  244. * First, based on the current detected marker and the board layout, the function interpolates
  245. * the position of the missing markers. Then it tries to find correspondence between the reprojected
  246. * markers and the rejected candidates based on the minRepDistance and errorCorrectionRate parameters.
  247. * If camera parameters and distortion coefficients are provided, missing markers are reprojected
  248. * using projectPoint function. If not, missing marker projections are interpolated using global
  249. * homography, and all the marker corners in the board must have the same Z coordinate.
  250. */
  251. public void refineDetectedMarkers(Mat image, Board board, List<Mat> detectedCorners, Mat detectedIds, List<Mat> rejectedCorners, Mat cameraMatrix)
  252. {
  253. ThrowIfDisposed();
  254. if (image != null) image.ThrowIfDisposed();
  255. if (board != null) board.ThrowIfDisposed();
  256. if (detectedIds != null) detectedIds.ThrowIfDisposed();
  257. if (cameraMatrix != null) cameraMatrix.ThrowIfDisposed();
  258. Mat detectedCorners_mat = Converters.vector_Mat_to_Mat(detectedCorners);
  259. Mat rejectedCorners_mat = Converters.vector_Mat_to_Mat(rejectedCorners);
  260. objdetect_ArucoDetector_refineDetectedMarkers_12(nativeObj, image.nativeObj, board.nativeObj, detectedCorners_mat.nativeObj, detectedIds.nativeObj, rejectedCorners_mat.nativeObj, cameraMatrix.nativeObj);
  261. Converters.Mat_to_vector_Mat(detectedCorners_mat, detectedCorners);
  262. detectedCorners_mat.release();
  263. Converters.Mat_to_vector_Mat(rejectedCorners_mat, rejectedCorners);
  264. rejectedCorners_mat.release();
  265. }
  266. /**
  267. * Refine not detected markers based on the already detected and the board layout
  268. *
  269. * param image input image
  270. * param board layout of markers in the board.
  271. * param detectedCorners vector of already detected marker corners.
  272. * param detectedIds vector of already detected marker identifiers.
  273. * param rejectedCorners vector of rejected candidates during the marker detection process.
  274. * \(A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\)
  275. * \((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
  276. * original rejectedCorners array.
  277. *
  278. * This function tries to find markers that were not detected in the basic detecMarkers function.
  279. * First, based on the current detected marker and the board layout, the function interpolates
  280. * the position of the missing markers. Then it tries to find correspondence between the reprojected
  281. * markers and the rejected candidates based on the minRepDistance and errorCorrectionRate parameters.
  282. * If camera parameters and distortion coefficients are provided, missing markers are reprojected
  283. * using projectPoint function. If not, missing marker projections are interpolated using global
  284. * homography, and all the marker corners in the board must have the same Z coordinate.
  285. */
  286. public void refineDetectedMarkers(Mat image, Board board, List<Mat> detectedCorners, Mat detectedIds, List<Mat> rejectedCorners)
  287. {
  288. ThrowIfDisposed();
  289. if (image != null) image.ThrowIfDisposed();
  290. if (board != null) board.ThrowIfDisposed();
  291. if (detectedIds != null) detectedIds.ThrowIfDisposed();
  292. Mat detectedCorners_mat = Converters.vector_Mat_to_Mat(detectedCorners);
  293. Mat rejectedCorners_mat = Converters.vector_Mat_to_Mat(rejectedCorners);
  294. objdetect_ArucoDetector_refineDetectedMarkers_13(nativeObj, image.nativeObj, board.nativeObj, detectedCorners_mat.nativeObj, detectedIds.nativeObj, rejectedCorners_mat.nativeObj);
  295. Converters.Mat_to_vector_Mat(detectedCorners_mat, detectedCorners);
  296. detectedCorners_mat.release();
  297. Converters.Mat_to_vector_Mat(rejectedCorners_mat, rejectedCorners);
  298. rejectedCorners_mat.release();
  299. }
  300. //
  301. // C++: Dictionary cv::aruco::ArucoDetector::getDictionary()
  302. //
  303. public Dictionary getDictionary()
  304. {
  305. ThrowIfDisposed();
  306. return new Dictionary(DisposableObject.ThrowIfNullIntPtr(objdetect_ArucoDetector_getDictionary_10(nativeObj)));
  307. }
  308. //
  309. // C++: void cv::aruco::ArucoDetector::setDictionary(Dictionary dictionary)
  310. //
  311. public void setDictionary(Dictionary dictionary)
  312. {
  313. ThrowIfDisposed();
  314. if (dictionary != null) dictionary.ThrowIfDisposed();
  315. objdetect_ArucoDetector_setDictionary_10(nativeObj, dictionary.nativeObj);
  316. }
  317. //
  318. // C++: DetectorParameters cv::aruco::ArucoDetector::getDetectorParameters()
  319. //
  320. public DetectorParameters getDetectorParameters()
  321. {
  322. ThrowIfDisposed();
  323. return new DetectorParameters(DisposableObject.ThrowIfNullIntPtr(objdetect_ArucoDetector_getDetectorParameters_10(nativeObj)));
  324. }
  325. //
  326. // C++: void cv::aruco::ArucoDetector::setDetectorParameters(DetectorParameters detectorParameters)
  327. //
  328. public void setDetectorParameters(DetectorParameters detectorParameters)
  329. {
  330. ThrowIfDisposed();
  331. if (detectorParameters != null) detectorParameters.ThrowIfDisposed();
  332. objdetect_ArucoDetector_setDetectorParameters_10(nativeObj, detectorParameters.nativeObj);
  333. }
  334. //
  335. // C++: RefineParameters cv::aruco::ArucoDetector::getRefineParameters()
  336. //
  337. public RefineParameters getRefineParameters()
  338. {
  339. ThrowIfDisposed();
  340. return new RefineParameters(DisposableObject.ThrowIfNullIntPtr(objdetect_ArucoDetector_getRefineParameters_10(nativeObj)));
  341. }
  342. //
  343. // C++: void cv::aruco::ArucoDetector::setRefineParameters(RefineParameters refineParameters)
  344. //
  345. public void setRefineParameters(RefineParameters refineParameters)
  346. {
  347. ThrowIfDisposed();
  348. if (refineParameters != null) refineParameters.ThrowIfDisposed();
  349. objdetect_ArucoDetector_setRefineParameters_10(nativeObj, refineParameters.nativeObj);
  350. }
  351. //
  352. // C++: void cv::aruco::ArucoDetector::write(FileStorage fs, String name)
  353. //
  354. // Unknown type 'FileStorage' (I), skipping the function
  355. //
  356. // C++: void cv::aruco::ArucoDetector::read(FileNode fn)
  357. //
  358. // Unknown type 'FileNode' (I), skipping the function
  359. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  360. const string LIBNAME = "__Internal";
  361. #else
  362. const string LIBNAME = "opencvforunity";
  363. #endif
  364. // C++: cv::aruco::ArucoDetector::ArucoDetector(Dictionary dictionary = getPredefinedDictionary(cv::aruco::DICT_4X4_50), DetectorParameters detectorParams = DetectorParameters(), RefineParameters refineParams = RefineParameters())
  365. [DllImport(LIBNAME)]
  366. private static extern IntPtr objdetect_ArucoDetector_ArucoDetector_10(IntPtr dictionary_nativeObj, IntPtr detectorParams_nativeObj, IntPtr refineParams_nativeObj);
  367. [DllImport(LIBNAME)]
  368. private static extern IntPtr objdetect_ArucoDetector_ArucoDetector_11(IntPtr dictionary_nativeObj, IntPtr detectorParams_nativeObj);
  369. [DllImport(LIBNAME)]
  370. private static extern IntPtr objdetect_ArucoDetector_ArucoDetector_12(IntPtr dictionary_nativeObj);
  371. [DllImport(LIBNAME)]
  372. private static extern IntPtr objdetect_ArucoDetector_ArucoDetector_13();
  373. // C++: void cv::aruco::ArucoDetector::detectMarkers(Mat image, vector_Mat& corners, Mat& ids, vector_Mat& rejectedImgPoints = vector_Mat())
  374. [DllImport(LIBNAME)]
  375. private static extern void objdetect_ArucoDetector_detectMarkers_10(IntPtr nativeObj, IntPtr image_nativeObj, IntPtr corners_mat_nativeObj, IntPtr ids_nativeObj, IntPtr rejectedImgPoints_mat_nativeObj);
  376. [DllImport(LIBNAME)]
  377. private static extern void objdetect_ArucoDetector_detectMarkers_11(IntPtr nativeObj, IntPtr image_nativeObj, IntPtr corners_mat_nativeObj, IntPtr ids_nativeObj);
  378. // C++: void cv::aruco::ArucoDetector::refineDetectedMarkers(Mat image, Board board, vector_Mat& detectedCorners, Mat& detectedIds, vector_Mat& rejectedCorners, Mat cameraMatrix = Mat(), Mat distCoeffs = Mat(), Mat& recoveredIdxs = Mat())
  379. [DllImport(LIBNAME)]
  380. private static extern void objdetect_ArucoDetector_refineDetectedMarkers_10(IntPtr nativeObj, IntPtr image_nativeObj, IntPtr board_nativeObj, IntPtr detectedCorners_mat_nativeObj, IntPtr detectedIds_nativeObj, IntPtr rejectedCorners_mat_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj, IntPtr recoveredIdxs_nativeObj);
  381. [DllImport(LIBNAME)]
  382. private static extern void objdetect_ArucoDetector_refineDetectedMarkers_11(IntPtr nativeObj, IntPtr image_nativeObj, IntPtr board_nativeObj, IntPtr detectedCorners_mat_nativeObj, IntPtr detectedIds_nativeObj, IntPtr rejectedCorners_mat_nativeObj, IntPtr cameraMatrix_nativeObj, IntPtr distCoeffs_nativeObj);
  383. [DllImport(LIBNAME)]
  384. private static extern void objdetect_ArucoDetector_refineDetectedMarkers_12(IntPtr nativeObj, IntPtr image_nativeObj, IntPtr board_nativeObj, IntPtr detectedCorners_mat_nativeObj, IntPtr detectedIds_nativeObj, IntPtr rejectedCorners_mat_nativeObj, IntPtr cameraMatrix_nativeObj);
  385. [DllImport(LIBNAME)]
  386. private static extern void objdetect_ArucoDetector_refineDetectedMarkers_13(IntPtr nativeObj, IntPtr image_nativeObj, IntPtr board_nativeObj, IntPtr detectedCorners_mat_nativeObj, IntPtr detectedIds_nativeObj, IntPtr rejectedCorners_mat_nativeObj);
  387. // C++: Dictionary cv::aruco::ArucoDetector::getDictionary()
  388. [DllImport(LIBNAME)]
  389. private static extern IntPtr objdetect_ArucoDetector_getDictionary_10(IntPtr nativeObj);
  390. // C++: void cv::aruco::ArucoDetector::setDictionary(Dictionary dictionary)
  391. [DllImport(LIBNAME)]
  392. private static extern void objdetect_ArucoDetector_setDictionary_10(IntPtr nativeObj, IntPtr dictionary_nativeObj);
  393. // C++: DetectorParameters cv::aruco::ArucoDetector::getDetectorParameters()
  394. [DllImport(LIBNAME)]
  395. private static extern IntPtr objdetect_ArucoDetector_getDetectorParameters_10(IntPtr nativeObj);
  396. // C++: void cv::aruco::ArucoDetector::setDetectorParameters(DetectorParameters detectorParameters)
  397. [DllImport(LIBNAME)]
  398. private static extern void objdetect_ArucoDetector_setDetectorParameters_10(IntPtr nativeObj, IntPtr detectorParameters_nativeObj);
  399. // C++: RefineParameters cv::aruco::ArucoDetector::getRefineParameters()
  400. [DllImport(LIBNAME)]
  401. private static extern IntPtr objdetect_ArucoDetector_getRefineParameters_10(IntPtr nativeObj);
  402. // C++: void cv::aruco::ArucoDetector::setRefineParameters(RefineParameters refineParameters)
  403. [DllImport(LIBNAME)]
  404. private static extern void objdetect_ArucoDetector_setRefineParameters_10(IntPtr nativeObj, IntPtr refineParameters_nativeObj);
  405. // native support for java finalize()
  406. [DllImport(LIBNAME)]
  407. private static extern void objdetect_ArucoDetector_delete(IntPtr nativeObj);
  408. }
  409. }