CharucoDetector.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. //
  2. // This file is auto-generated. Please don't modify it!
  3. //
  4. #pragma once
  5. #ifdef __cplusplus
  6. //#import "opencv.hpp"
  7. #import "opencv2/objdetect.hpp"
  8. #import "opencv2/objdetect/charuco_detector.hpp"
  9. #else
  10. #define CV_EXPORTS
  11. #endif
  12. #import <Foundation/Foundation.h>
  13. #import "Algorithm.h"
  14. @class CharucoBoard;
  15. @class CharucoParameters;
  16. @class DetectorParameters;
  17. @class Mat;
  18. @class RefineParameters;
  19. NS_ASSUME_NONNULL_BEGIN
  20. // C++: class CharucoDetector
  21. /**
  22. * The CharucoDetector module
  23. *
  24. * Member of `Objdetect`
  25. */
  26. CV_EXPORTS @interface CharucoDetector : Algorithm
  27. #ifdef __cplusplus
  28. @property(readonly)cv::Ptr<cv::aruco::CharucoDetector> nativePtrCharucoDetector;
  29. #endif
  30. #ifdef __cplusplus
  31. - (instancetype)initWithNativePtr:(cv::Ptr<cv::aruco::CharucoDetector>)nativePtr;
  32. + (instancetype)fromNative:(cv::Ptr<cv::aruco::CharucoDetector>)nativePtr;
  33. #endif
  34. #pragma mark - Methods
  35. //
  36. // cv::aruco::CharucoDetector::CharucoDetector(CharucoBoard board, CharucoParameters charucoParams = CharucoParameters(), DetectorParameters detectorParams = DetectorParameters(), RefineParameters refineParams = RefineParameters())
  37. //
  38. /**
  39. * Basic CharucoDetector constructor
  40. *
  41. * @param board ChAruco board
  42. * @param charucoParams charuco detection parameters
  43. * @param detectorParams marker detection parameters
  44. * @param refineParams marker refine detection parameters
  45. */
  46. - (instancetype)initWithBoard:(CharucoBoard*)board charucoParams:(CharucoParameters*)charucoParams detectorParams:(DetectorParameters*)detectorParams refineParams:(RefineParameters*)refineParams;
  47. /**
  48. * Basic CharucoDetector constructor
  49. *
  50. * @param board ChAruco board
  51. * @param charucoParams charuco detection parameters
  52. * @param detectorParams marker detection parameters
  53. */
  54. - (instancetype)initWithBoard:(CharucoBoard*)board charucoParams:(CharucoParameters*)charucoParams detectorParams:(DetectorParameters*)detectorParams;
  55. /**
  56. * Basic CharucoDetector constructor
  57. *
  58. * @param board ChAruco board
  59. * @param charucoParams charuco detection parameters
  60. */
  61. - (instancetype)initWithBoard:(CharucoBoard*)board charucoParams:(CharucoParameters*)charucoParams;
  62. /**
  63. * Basic CharucoDetector constructor
  64. *
  65. * @param board ChAruco board
  66. */
  67. - (instancetype)initWithBoard:(CharucoBoard*)board;
  68. //
  69. // CharucoBoard cv::aruco::CharucoDetector::getBoard()
  70. //
  71. - (CharucoBoard*)getBoard NS_SWIFT_NAME(getBoard());
  72. //
  73. // void cv::aruco::CharucoDetector::setBoard(CharucoBoard board)
  74. //
  75. - (void)setBoard:(CharucoBoard*)board NS_SWIFT_NAME(setBoard(board:));
  76. //
  77. // CharucoParameters cv::aruco::CharucoDetector::getCharucoParameters()
  78. //
  79. - (CharucoParameters*)getCharucoParameters NS_SWIFT_NAME(getCharucoParameters());
  80. //
  81. // void cv::aruco::CharucoDetector::setCharucoParameters(CharucoParameters charucoParameters)
  82. //
  83. - (void)setCharucoParameters:(CharucoParameters*)charucoParameters NS_SWIFT_NAME(setCharucoParameters(charucoParameters:));
  84. //
  85. // DetectorParameters cv::aruco::CharucoDetector::getDetectorParameters()
  86. //
  87. - (DetectorParameters*)getDetectorParameters NS_SWIFT_NAME(getDetectorParameters());
  88. //
  89. // void cv::aruco::CharucoDetector::setDetectorParameters(DetectorParameters detectorParameters)
  90. //
  91. - (void)setDetectorParameters:(DetectorParameters*)detectorParameters NS_SWIFT_NAME(setDetectorParameters(detectorParameters:));
  92. //
  93. // RefineParameters cv::aruco::CharucoDetector::getRefineParameters()
  94. //
  95. - (RefineParameters*)getRefineParameters NS_SWIFT_NAME(getRefineParameters());
  96. //
  97. // void cv::aruco::CharucoDetector::setRefineParameters(RefineParameters refineParameters)
  98. //
  99. - (void)setRefineParameters:(RefineParameters*)refineParameters NS_SWIFT_NAME(setRefineParameters(refineParameters:));
  100. //
  101. // void cv::aruco::CharucoDetector::detectBoard(Mat image, Mat& charucoCorners, Mat& charucoIds, vector_Mat& markerCorners = vector_Mat(), Mat& markerIds = Mat())
  102. //
  103. /**
  104. * detect aruco markers and interpolate position of ChArUco board corners
  105. * @param image input image necesary for corner refinement. Note that markers are not detected and
  106. * should be sent in corners and ids parameters.
  107. * @param charucoCorners interpolated chessboard corners.
  108. * @param charucoIds interpolated chessboard corners identifiers.
  109. * @param markerCorners vector of already detected markers corners. For each marker, its four
  110. * corners are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the
  111. * dimensions of this array should be Nx4. The order of the corners should be clockwise.
  112. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  113. * @param markerIds list of identifiers for each marker in corners.
  114. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  115. *
  116. * This function receives the detected markers and returns the 2D position of the chessboard corners
  117. * from a ChArUco board using the detected Aruco markers.
  118. *
  119. * If markerCorners and markerCorners are empty, the detectMarkers() will run and detect aruco markers and ids.
  120. *
  121. * If camera parameters are provided, the process is based in an approximated pose estimation, else it is based on local homography.
  122. * Only visible corners are returned. For each corner, its corresponding identifier is also returned in charucoIds.
  123. * @see `findChessboardCorners`
  124. */
  125. - (void)detectBoard:(Mat*)image charucoCorners:(Mat*)charucoCorners charucoIds:(Mat*)charucoIds markerCorners:(NSMutableArray<Mat*>*)markerCorners markerIds:(Mat*)markerIds NS_SWIFT_NAME(detectBoard(image:charucoCorners:charucoIds:markerCorners:markerIds:));
  126. /**
  127. * detect aruco markers and interpolate position of ChArUco board corners
  128. * @param image input image necesary for corner refinement. Note that markers are not detected and
  129. * should be sent in corners and ids parameters.
  130. * @param charucoCorners interpolated chessboard corners.
  131. * @param charucoIds interpolated chessboard corners identifiers.
  132. * @param markerCorners vector of already detected markers corners. For each marker, its four
  133. * corners are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the
  134. * dimensions of this array should be Nx4. The order of the corners should be clockwise.
  135. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  136. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  137. *
  138. * This function receives the detected markers and returns the 2D position of the chessboard corners
  139. * from a ChArUco board using the detected Aruco markers.
  140. *
  141. * If markerCorners and markerCorners are empty, the detectMarkers() will run and detect aruco markers and ids.
  142. *
  143. * If camera parameters are provided, the process is based in an approximated pose estimation, else it is based on local homography.
  144. * Only visible corners are returned. For each corner, its corresponding identifier is also returned in charucoIds.
  145. * @see `findChessboardCorners`
  146. */
  147. - (void)detectBoard:(Mat*)image charucoCorners:(Mat*)charucoCorners charucoIds:(Mat*)charucoIds markerCorners:(NSMutableArray<Mat*>*)markerCorners NS_SWIFT_NAME(detectBoard(image:charucoCorners:charucoIds:markerCorners:));
  148. /**
  149. * detect aruco markers and interpolate position of ChArUco board corners
  150. * @param image input image necesary for corner refinement. Note that markers are not detected and
  151. * should be sent in corners and ids parameters.
  152. * @param charucoCorners interpolated chessboard corners.
  153. * @param charucoIds interpolated chessboard corners identifiers.
  154. * corners are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the
  155. * dimensions of this array should be Nx4. The order of the corners should be clockwise.
  156. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  157. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  158. *
  159. * This function receives the detected markers and returns the 2D position of the chessboard corners
  160. * from a ChArUco board using the detected Aruco markers.
  161. *
  162. * If markerCorners and markerCorners are empty, the detectMarkers() will run and detect aruco markers and ids.
  163. *
  164. * If camera parameters are provided, the process is based in an approximated pose estimation, else it is based on local homography.
  165. * Only visible corners are returned. For each corner, its corresponding identifier is also returned in charucoIds.
  166. * @see `findChessboardCorners`
  167. */
  168. - (void)detectBoard:(Mat*)image charucoCorners:(Mat*)charucoCorners charucoIds:(Mat*)charucoIds NS_SWIFT_NAME(detectBoard(image:charucoCorners:charucoIds:));
  169. //
  170. // void cv::aruco::CharucoDetector::detectDiamonds(Mat image, vector_Mat& diamondCorners, Mat& diamondIds, vector_Mat& markerCorners = vector_Mat(), Mat& markerIds = Mat())
  171. //
  172. /**
  173. * Detect ChArUco Diamond markers
  174. *
  175. * @param image input image necessary for corner subpixel.
  176. * @param diamondCorners output list of detected diamond corners (4 corners per diamond). The order
  177. * is the same than in marker corners: top left, top right, bottom right and bottom left. Similar
  178. * format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).
  179. * @param diamondIds ids of the diamonds in diamondCorners. The id of each diamond is in fact of
  180. * type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the
  181. * diamond.
  182. * @param markerCorners list of detected marker corners from detectMarkers function.
  183. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  184. * @param markerIds list of marker ids in markerCorners.
  185. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  186. *
  187. * This function detects Diamond markers from the previous detected ArUco markers. The diamonds
  188. * are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters
  189. * are provided, the diamond search is based on reprojection. If not, diamond search is based on
  190. * homography. Homography is faster than reprojection, but less accurate.
  191. */
  192. - (void)detectDiamonds:(Mat*)image diamondCorners:(NSMutableArray<Mat*>*)diamondCorners diamondIds:(Mat*)diamondIds markerCorners:(NSMutableArray<Mat*>*)markerCorners markerIds:(Mat*)markerIds NS_SWIFT_NAME(detectDiamonds(image:diamondCorners:diamondIds:markerCorners:markerIds:));
  193. /**
  194. * Detect ChArUco Diamond markers
  195. *
  196. * @param image input image necessary for corner subpixel.
  197. * @param diamondCorners output list of detected diamond corners (4 corners per diamond). The order
  198. * is the same than in marker corners: top left, top right, bottom right and bottom left. Similar
  199. * format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).
  200. * @param diamondIds ids of the diamonds in diamondCorners. The id of each diamond is in fact of
  201. * type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the
  202. * diamond.
  203. * @param markerCorners list of detected marker corners from detectMarkers function.
  204. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  205. * If markerCorners and markerCorners are empty, the function detect aruco markers and ids.
  206. *
  207. * This function detects Diamond markers from the previous detected ArUco markers. The diamonds
  208. * are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters
  209. * are provided, the diamond search is based on reprojection. If not, diamond search is based on
  210. * homography. Homography is faster than reprojection, but less accurate.
  211. */
  212. - (void)detectDiamonds:(Mat*)image diamondCorners:(NSMutableArray<Mat*>*)diamondCorners diamondIds:(Mat*)diamondIds markerCorners:(NSMutableArray<Mat*>*)markerCorners NS_SWIFT_NAME(detectDiamonds(image:diamondCorners:diamondIds:markerCorners:));
  213. /**
  214. * Detect ChArUco Diamond markers
  215. *
  216. * @param image input image necessary for corner subpixel.
  217. * @param diamondCorners output list of detected diamond corners (4 corners per diamond). The order
  218. * is the same than in marker corners: top left, top right, bottom right and bottom left. Similar
  219. * format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).
  220. * @param diamondIds ids of the diamonds in diamondCorners. The id of each diamond is in fact of
  221. * type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the
  222. * diamond.
  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 detects Diamond markers from the previous detected ArUco markers. The diamonds
  227. * are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters
  228. * are provided, the diamond search is based on reprojection. If not, diamond search is based on
  229. * homography. Homography is faster than reprojection, but less accurate.
  230. */
  231. - (void)detectDiamonds:(Mat*)image diamondCorners:(NSMutableArray<Mat*>*)diamondCorners diamondIds:(Mat*)diamondIds NS_SWIFT_NAME(detectDiamonds(image:diamondCorners:diamondIds:));
  232. @end
  233. NS_ASSUME_NONNULL_END