CharucoDetector.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506
  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 CharucoDetector
  9. public class CharucoDetector : Algorithm
  10. {
  11. protected override void Dispose(bool disposing)
  12. {
  13. try
  14. {
  15. if (disposing)
  16. {
  17. }
  18. if (IsEnabledDispose)
  19. {
  20. if (nativeObj != IntPtr.Zero)
  21. objdetect_CharucoDetector_delete(nativeObj);
  22. nativeObj = IntPtr.Zero;
  23. }
  24. }
  25. finally
  26. {
  27. base.Dispose(disposing);
  28. }
  29. }
  30. protected internal CharucoDetector(IntPtr addr) : base(addr) { }
  31. // internal usage only
  32. public static new CharucoDetector __fromPtr__(IntPtr addr) { return new CharucoDetector(addr); }
  33. //
  34. // C++: cv::aruco::CharucoDetector::CharucoDetector(CharucoBoard board, CharucoParameters charucoParams = CharucoParameters(), DetectorParameters detectorParams = DetectorParameters(), RefineParameters refineParams = RefineParameters())
  35. //
  36. /**
  37. * Basic CharucoDetector constructor
  38. *
  39. * param board ChAruco board
  40. * param charucoParams charuco detection parameters
  41. * param detectorParams marker detection parameters
  42. * param refineParams marker refine detection parameters
  43. */
  44. public CharucoDetector(CharucoBoard board, CharucoParameters charucoParams, DetectorParameters detectorParams, RefineParameters refineParams) :
  45. base(DisposableObject.ThrowIfNullIntPtr(objdetect_CharucoDetector_CharucoDetector_10(board.nativeObj, charucoParams.nativeObj, detectorParams.nativeObj, refineParams.nativeObj)))
  46. {
  47. }
  48. /**
  49. * Basic CharucoDetector constructor
  50. *
  51. * param board ChAruco board
  52. * param charucoParams charuco detection parameters
  53. * param detectorParams marker detection parameters
  54. */
  55. public CharucoDetector(CharucoBoard board, CharucoParameters charucoParams, DetectorParameters detectorParams) :
  56. base(DisposableObject.ThrowIfNullIntPtr(objdetect_CharucoDetector_CharucoDetector_11(board.nativeObj, charucoParams.nativeObj, detectorParams.nativeObj)))
  57. {
  58. }
  59. /**
  60. * Basic CharucoDetector constructor
  61. *
  62. * param board ChAruco board
  63. * param charucoParams charuco detection parameters
  64. */
  65. public CharucoDetector(CharucoBoard board, CharucoParameters charucoParams) :
  66. base(DisposableObject.ThrowIfNullIntPtr(objdetect_CharucoDetector_CharucoDetector_12(board.nativeObj, charucoParams.nativeObj)))
  67. {
  68. }
  69. /**
  70. * Basic CharucoDetector constructor
  71. *
  72. * param board ChAruco board
  73. */
  74. public CharucoDetector(CharucoBoard board) :
  75. base(DisposableObject.ThrowIfNullIntPtr(objdetect_CharucoDetector_CharucoDetector_13(board.nativeObj)))
  76. {
  77. }
  78. //
  79. // C++: CharucoBoard cv::aruco::CharucoDetector::getBoard()
  80. //
  81. public CharucoBoard getBoard()
  82. {
  83. ThrowIfDisposed();
  84. return new CharucoBoard(DisposableObject.ThrowIfNullIntPtr(objdetect_CharucoDetector_getBoard_10(nativeObj)));
  85. }
  86. //
  87. // C++: void cv::aruco::CharucoDetector::setBoard(CharucoBoard board)
  88. //
  89. public void setBoard(CharucoBoard board)
  90. {
  91. ThrowIfDisposed();
  92. if (board != null) board.ThrowIfDisposed();
  93. objdetect_CharucoDetector_setBoard_10(nativeObj, board.nativeObj);
  94. }
  95. //
  96. // C++: CharucoParameters cv::aruco::CharucoDetector::getCharucoParameters()
  97. //
  98. public CharucoParameters getCharucoParameters()
  99. {
  100. ThrowIfDisposed();
  101. return new CharucoParameters(DisposableObject.ThrowIfNullIntPtr(objdetect_CharucoDetector_getCharucoParameters_10(nativeObj)));
  102. }
  103. //
  104. // C++: void cv::aruco::CharucoDetector::setCharucoParameters(CharucoParameters charucoParameters)
  105. //
  106. public void setCharucoParameters(CharucoParameters charucoParameters)
  107. {
  108. ThrowIfDisposed();
  109. if (charucoParameters != null) charucoParameters.ThrowIfDisposed();
  110. objdetect_CharucoDetector_setCharucoParameters_10(nativeObj, charucoParameters.nativeObj);
  111. }
  112. //
  113. // C++: DetectorParameters cv::aruco::CharucoDetector::getDetectorParameters()
  114. //
  115. public DetectorParameters getDetectorParameters()
  116. {
  117. ThrowIfDisposed();
  118. return new DetectorParameters(DisposableObject.ThrowIfNullIntPtr(objdetect_CharucoDetector_getDetectorParameters_10(nativeObj)));
  119. }
  120. //
  121. // C++: void cv::aruco::CharucoDetector::setDetectorParameters(DetectorParameters detectorParameters)
  122. //
  123. public void setDetectorParameters(DetectorParameters detectorParameters)
  124. {
  125. ThrowIfDisposed();
  126. if (detectorParameters != null) detectorParameters.ThrowIfDisposed();
  127. objdetect_CharucoDetector_setDetectorParameters_10(nativeObj, detectorParameters.nativeObj);
  128. }
  129. //
  130. // C++: RefineParameters cv::aruco::CharucoDetector::getRefineParameters()
  131. //
  132. public RefineParameters getRefineParameters()
  133. {
  134. ThrowIfDisposed();
  135. return new RefineParameters(DisposableObject.ThrowIfNullIntPtr(objdetect_CharucoDetector_getRefineParameters_10(nativeObj)));
  136. }
  137. //
  138. // C++: void cv::aruco::CharucoDetector::setRefineParameters(RefineParameters refineParameters)
  139. //
  140. public void setRefineParameters(RefineParameters refineParameters)
  141. {
  142. ThrowIfDisposed();
  143. if (refineParameters != null) refineParameters.ThrowIfDisposed();
  144. objdetect_CharucoDetector_setRefineParameters_10(nativeObj, refineParameters.nativeObj);
  145. }
  146. //
  147. // C++: void cv::aruco::CharucoDetector::detectBoard(Mat image, Mat& charucoCorners, Mat& charucoIds, vector_Mat& markerCorners = vector_Mat(), Mat& markerIds = Mat())
  148. //
  149. /**
  150. * detect aruco markers and interpolate position of ChArUco board corners
  151. * param image input image necesary for corner refinement. Note that markers are not detected and
  152. * should be sent in corners and ids parameters.
  153. * param charucoCorners interpolated chessboard corners.
  154. * param charucoIds interpolated chessboard corners identifiers.
  155. * param markerCorners vector of already detected markers corners. For each marker, its four
  156. * corners are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the
  157. * dimensions of this array should be Nx4. The order of the corners should be clockwise.
  158. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  159. * param markerIds list of identifiers for each marker in corners.
  160. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  161. *
  162. * This function receives the detected markers and returns the 2D position of the chessboard corners
  163. * from a ChArUco board using the detected Aruco markers.
  164. *
  165. * If markerCorners and markerCorners are empty, the detectMarkers() will run and detect aruco markers and ids.
  166. *
  167. * If camera parameters are provided, the process is based in an approximated pose estimation, else it is based on local homography.
  168. * Only visible corners are returned. For each corner, its corresponding identifier is also returned in charucoIds.
  169. * SEE: findChessboardCorners
  170. */
  171. public void detectBoard(Mat image, Mat charucoCorners, Mat charucoIds, List<Mat> markerCorners, Mat markerIds)
  172. {
  173. ThrowIfDisposed();
  174. if (image != null) image.ThrowIfDisposed();
  175. if (charucoCorners != null) charucoCorners.ThrowIfDisposed();
  176. if (charucoIds != null) charucoIds.ThrowIfDisposed();
  177. if (markerIds != null) markerIds.ThrowIfDisposed();
  178. Mat markerCorners_mat = Converters.vector_Mat_to_Mat(markerCorners);
  179. objdetect_CharucoDetector_detectBoard_10(nativeObj, image.nativeObj, charucoCorners.nativeObj, charucoIds.nativeObj, markerCorners_mat.nativeObj, markerIds.nativeObj);
  180. Converters.Mat_to_vector_Mat(markerCorners_mat, markerCorners);
  181. markerCorners_mat.release();
  182. }
  183. /**
  184. * detect aruco markers and interpolate position of ChArUco board corners
  185. * param image input image necesary for corner refinement. Note that markers are not detected and
  186. * should be sent in corners and ids parameters.
  187. * param charucoCorners interpolated chessboard corners.
  188. * param charucoIds interpolated chessboard corners identifiers.
  189. * param markerCorners vector of already detected markers corners. For each marker, its four
  190. * corners are provided, (e.g std::vector&lt;std::vector&lt;cv::Point2f&gt; &gt; ). For N detected markers, the
  191. * dimensions of this array should be Nx4. The order of the corners should be clockwise.
  192. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  193. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  194. *
  195. * This function receives the detected markers and returns the 2D position of the chessboard corners
  196. * from a ChArUco board using the detected Aruco markers.
  197. *
  198. * If markerCorners and markerCorners are empty, the detectMarkers() will run and detect aruco markers and ids.
  199. *
  200. * If camera parameters are provided, the process is based in an approximated pose estimation, else it is based on local homography.
  201. * Only visible corners are returned. For each corner, its corresponding identifier is also returned in charucoIds.
  202. * SEE: findChessboardCorners
  203. */
  204. public void detectBoard(Mat image, Mat charucoCorners, Mat charucoIds, List<Mat> markerCorners)
  205. {
  206. ThrowIfDisposed();
  207. if (image != null) image.ThrowIfDisposed();
  208. if (charucoCorners != null) charucoCorners.ThrowIfDisposed();
  209. if (charucoIds != null) charucoIds.ThrowIfDisposed();
  210. Mat markerCorners_mat = Converters.vector_Mat_to_Mat(markerCorners);
  211. objdetect_CharucoDetector_detectBoard_11(nativeObj, image.nativeObj, charucoCorners.nativeObj, charucoIds.nativeObj, markerCorners_mat.nativeObj);
  212. Converters.Mat_to_vector_Mat(markerCorners_mat, markerCorners);
  213. markerCorners_mat.release();
  214. }
  215. /**
  216. * detect aruco markers and interpolate position of ChArUco board corners
  217. * param image input image necesary for corner refinement. Note that markers are not detected and
  218. * should be sent in corners and ids parameters.
  219. * param charucoCorners interpolated chessboard corners.
  220. * param charucoIds interpolated chessboard corners identifiers.
  221. * corners are provided, (e.g std::vector&lt;std::vector&lt;cv::Point2f&gt; &gt; ). For N detected markers, the
  222. * dimensions of this array should be Nx4. The order of the corners should be clockwise.
  223. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  224. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  225. *
  226. * This function receives the detected markers and returns the 2D position of the chessboard corners
  227. * from a ChArUco board using the detected Aruco markers.
  228. *
  229. * If markerCorners and markerCorners are empty, the detectMarkers() will run and detect aruco markers and ids.
  230. *
  231. * If camera parameters are provided, the process is based in an approximated pose estimation, else it is based on local homography.
  232. * Only visible corners are returned. For each corner, its corresponding identifier is also returned in charucoIds.
  233. * SEE: findChessboardCorners
  234. */
  235. public void detectBoard(Mat image, Mat charucoCorners, Mat charucoIds)
  236. {
  237. ThrowIfDisposed();
  238. if (image != null) image.ThrowIfDisposed();
  239. if (charucoCorners != null) charucoCorners.ThrowIfDisposed();
  240. if (charucoIds != null) charucoIds.ThrowIfDisposed();
  241. objdetect_CharucoDetector_detectBoard_12(nativeObj, image.nativeObj, charucoCorners.nativeObj, charucoIds.nativeObj);
  242. }
  243. //
  244. // C++: void cv::aruco::CharucoDetector::detectDiamonds(Mat image, vector_Mat& diamondCorners, Mat& diamondIds, vector_Mat& markerCorners = vector_Mat(), Mat& markerIds = Mat())
  245. //
  246. /**
  247. * Detect ChArUco Diamond markers
  248. *
  249. * param image input image necessary for corner subpixel.
  250. * param diamondCorners output list of detected diamond corners (4 corners per diamond). The order
  251. * is the same than in marker corners: top left, top right, bottom right and bottom left. Similar
  252. * format than the corners returned by detectMarkers (e.g std::vector&lt;std::vector&lt;cv::Point2f&gt; &gt; ).
  253. * param diamondIds ids of the diamonds in diamondCorners. The id of each diamond is in fact of
  254. * type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the
  255. * diamond.
  256. * param markerCorners list of detected marker corners from detectMarkers function.
  257. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  258. * param markerIds list of marker ids in markerCorners.
  259. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  260. *
  261. * This function detects Diamond markers from the previous detected ArUco markers. The diamonds
  262. * are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters
  263. * are provided, the diamond search is based on reprojection. If not, diamond search is based on
  264. * homography. Homography is faster than reprojection, but less accurate.
  265. */
  266. public void detectDiamonds(Mat image, List<Mat> diamondCorners, Mat diamondIds, List<Mat> markerCorners, Mat markerIds)
  267. {
  268. ThrowIfDisposed();
  269. if (image != null) image.ThrowIfDisposed();
  270. if (diamondIds != null) diamondIds.ThrowIfDisposed();
  271. if (markerIds != null) markerIds.ThrowIfDisposed();
  272. Mat diamondCorners_mat = new Mat();
  273. Mat markerCorners_mat = Converters.vector_Mat_to_Mat(markerCorners);
  274. objdetect_CharucoDetector_detectDiamonds_10(nativeObj, image.nativeObj, diamondCorners_mat.nativeObj, diamondIds.nativeObj, markerCorners_mat.nativeObj, markerIds.nativeObj);
  275. Converters.Mat_to_vector_Mat(diamondCorners_mat, diamondCorners);
  276. diamondCorners_mat.release();
  277. Converters.Mat_to_vector_Mat(markerCorners_mat, markerCorners);
  278. markerCorners_mat.release();
  279. }
  280. /**
  281. * Detect ChArUco Diamond markers
  282. *
  283. * param image input image necessary for corner subpixel.
  284. * param diamondCorners output list of detected diamond corners (4 corners per diamond). The order
  285. * is the same than in marker corners: top left, top right, bottom right and bottom left. Similar
  286. * format than the corners returned by detectMarkers (e.g std::vector&lt;std::vector&lt;cv::Point2f&gt; &gt; ).
  287. * param diamondIds ids of the diamonds in diamondCorners. The id of each diamond is in fact of
  288. * type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the
  289. * diamond.
  290. * param markerCorners list of detected marker corners from detectMarkers function.
  291. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  292. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  293. *
  294. * This function detects Diamond markers from the previous detected ArUco markers. The diamonds
  295. * are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters
  296. * are provided, the diamond search is based on reprojection. If not, diamond search is based on
  297. * homography. Homography is faster than reprojection, but less accurate.
  298. */
  299. public void detectDiamonds(Mat image, List<Mat> diamondCorners, Mat diamondIds, List<Mat> markerCorners)
  300. {
  301. ThrowIfDisposed();
  302. if (image != null) image.ThrowIfDisposed();
  303. if (diamondIds != null) diamondIds.ThrowIfDisposed();
  304. Mat diamondCorners_mat = new Mat();
  305. Mat markerCorners_mat = Converters.vector_Mat_to_Mat(markerCorners);
  306. objdetect_CharucoDetector_detectDiamonds_11(nativeObj, image.nativeObj, diamondCorners_mat.nativeObj, diamondIds.nativeObj, markerCorners_mat.nativeObj);
  307. Converters.Mat_to_vector_Mat(diamondCorners_mat, diamondCorners);
  308. diamondCorners_mat.release();
  309. Converters.Mat_to_vector_Mat(markerCorners_mat, markerCorners);
  310. markerCorners_mat.release();
  311. }
  312. /**
  313. * Detect ChArUco Diamond markers
  314. *
  315. * param image input image necessary for corner subpixel.
  316. * param diamondCorners output list of detected diamond corners (4 corners per diamond). The order
  317. * is the same than in marker corners: top left, top right, bottom right and bottom left. Similar
  318. * format than the corners returned by detectMarkers (e.g std::vector&lt;std::vector&lt;cv::Point2f&gt; &gt; ).
  319. * param diamondIds ids of the diamonds in diamondCorners. The id of each diamond is in fact of
  320. * type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the
  321. * diamond.
  322. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  323. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  324. *
  325. * This function detects Diamond markers from the previous detected ArUco markers. The diamonds
  326. * are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters
  327. * are provided, the diamond search is based on reprojection. If not, diamond search is based on
  328. * homography. Homography is faster than reprojection, but less accurate.
  329. */
  330. public void detectDiamonds(Mat image, List<Mat> diamondCorners, Mat diamondIds)
  331. {
  332. ThrowIfDisposed();
  333. if (image != null) image.ThrowIfDisposed();
  334. if (diamondIds != null) diamondIds.ThrowIfDisposed();
  335. Mat diamondCorners_mat = new Mat();
  336. objdetect_CharucoDetector_detectDiamonds_12(nativeObj, image.nativeObj, diamondCorners_mat.nativeObj, diamondIds.nativeObj);
  337. Converters.Mat_to_vector_Mat(diamondCorners_mat, diamondCorners);
  338. diamondCorners_mat.release();
  339. }
  340. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  341. const string LIBNAME = "__Internal";
  342. #else
  343. const string LIBNAME = "opencvforunity";
  344. #endif
  345. // C++: cv::aruco::CharucoDetector::CharucoDetector(CharucoBoard board, CharucoParameters charucoParams = CharucoParameters(), DetectorParameters detectorParams = DetectorParameters(), RefineParameters refineParams = RefineParameters())
  346. [DllImport(LIBNAME)]
  347. private static extern IntPtr objdetect_CharucoDetector_CharucoDetector_10(IntPtr board_nativeObj, IntPtr charucoParams_nativeObj, IntPtr detectorParams_nativeObj, IntPtr refineParams_nativeObj);
  348. [DllImport(LIBNAME)]
  349. private static extern IntPtr objdetect_CharucoDetector_CharucoDetector_11(IntPtr board_nativeObj, IntPtr charucoParams_nativeObj, IntPtr detectorParams_nativeObj);
  350. [DllImport(LIBNAME)]
  351. private static extern IntPtr objdetect_CharucoDetector_CharucoDetector_12(IntPtr board_nativeObj, IntPtr charucoParams_nativeObj);
  352. [DllImport(LIBNAME)]
  353. private static extern IntPtr objdetect_CharucoDetector_CharucoDetector_13(IntPtr board_nativeObj);
  354. // C++: CharucoBoard cv::aruco::CharucoDetector::getBoard()
  355. [DllImport(LIBNAME)]
  356. private static extern IntPtr objdetect_CharucoDetector_getBoard_10(IntPtr nativeObj);
  357. // C++: void cv::aruco::CharucoDetector::setBoard(CharucoBoard board)
  358. [DllImport(LIBNAME)]
  359. private static extern void objdetect_CharucoDetector_setBoard_10(IntPtr nativeObj, IntPtr board_nativeObj);
  360. // C++: CharucoParameters cv::aruco::CharucoDetector::getCharucoParameters()
  361. [DllImport(LIBNAME)]
  362. private static extern IntPtr objdetect_CharucoDetector_getCharucoParameters_10(IntPtr nativeObj);
  363. // C++: void cv::aruco::CharucoDetector::setCharucoParameters(CharucoParameters charucoParameters)
  364. [DllImport(LIBNAME)]
  365. private static extern void objdetect_CharucoDetector_setCharucoParameters_10(IntPtr nativeObj, IntPtr charucoParameters_nativeObj);
  366. // C++: DetectorParameters cv::aruco::CharucoDetector::getDetectorParameters()
  367. [DllImport(LIBNAME)]
  368. private static extern IntPtr objdetect_CharucoDetector_getDetectorParameters_10(IntPtr nativeObj);
  369. // C++: void cv::aruco::CharucoDetector::setDetectorParameters(DetectorParameters detectorParameters)
  370. [DllImport(LIBNAME)]
  371. private static extern void objdetect_CharucoDetector_setDetectorParameters_10(IntPtr nativeObj, IntPtr detectorParameters_nativeObj);
  372. // C++: RefineParameters cv::aruco::CharucoDetector::getRefineParameters()
  373. [DllImport(LIBNAME)]
  374. private static extern IntPtr objdetect_CharucoDetector_getRefineParameters_10(IntPtr nativeObj);
  375. // C++: void cv::aruco::CharucoDetector::setRefineParameters(RefineParameters refineParameters)
  376. [DllImport(LIBNAME)]
  377. private static extern void objdetect_CharucoDetector_setRefineParameters_10(IntPtr nativeObj, IntPtr refineParameters_nativeObj);
  378. // C++: void cv::aruco::CharucoDetector::detectBoard(Mat image, Mat& charucoCorners, Mat& charucoIds, vector_Mat& markerCorners = vector_Mat(), Mat& markerIds = Mat())
  379. [DllImport(LIBNAME)]
  380. private static extern void objdetect_CharucoDetector_detectBoard_10(IntPtr nativeObj, IntPtr image_nativeObj, IntPtr charucoCorners_nativeObj, IntPtr charucoIds_nativeObj, IntPtr markerCorners_mat_nativeObj, IntPtr markerIds_nativeObj);
  381. [DllImport(LIBNAME)]
  382. private static extern void objdetect_CharucoDetector_detectBoard_11(IntPtr nativeObj, IntPtr image_nativeObj, IntPtr charucoCorners_nativeObj, IntPtr charucoIds_nativeObj, IntPtr markerCorners_mat_nativeObj);
  383. [DllImport(LIBNAME)]
  384. private static extern void objdetect_CharucoDetector_detectBoard_12(IntPtr nativeObj, IntPtr image_nativeObj, IntPtr charucoCorners_nativeObj, IntPtr charucoIds_nativeObj);
  385. // C++: void cv::aruco::CharucoDetector::detectDiamonds(Mat image, vector_Mat& diamondCorners, Mat& diamondIds, vector_Mat& markerCorners = vector_Mat(), Mat& markerIds = Mat())
  386. [DllImport(LIBNAME)]
  387. private static extern void objdetect_CharucoDetector_detectDiamonds_10(IntPtr nativeObj, IntPtr image_nativeObj, IntPtr diamondCorners_mat_nativeObj, IntPtr diamondIds_nativeObj, IntPtr markerCorners_mat_nativeObj, IntPtr markerIds_nativeObj);
  388. [DllImport(LIBNAME)]
  389. private static extern void objdetect_CharucoDetector_detectDiamonds_11(IntPtr nativeObj, IntPtr image_nativeObj, IntPtr diamondCorners_mat_nativeObj, IntPtr diamondIds_nativeObj, IntPtr markerCorners_mat_nativeObj);
  390. [DllImport(LIBNAME)]
  391. private static extern void objdetect_CharucoDetector_detectDiamonds_12(IntPtr nativeObj, IntPtr image_nativeObj, IntPtr diamondCorners_mat_nativeObj, IntPtr diamondIds_nativeObj);
  392. // native support for java finalize()
  393. [DllImport(LIBNAME)]
  394. private static extern void objdetect_CharucoDetector_delete(IntPtr nativeObj);
  395. }
  396. }