Aruco.h 57 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782
  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/aruco.hpp"
  8. #import "aruco/charuco.hpp"
  9. #else
  10. #define CV_EXPORTS
  11. #endif
  12. #import <Foundation/Foundation.h>
  13. @class Board;
  14. @class CharucoBoard;
  15. @class DetectorParameters;
  16. @class Dictionary;
  17. @class Int4;
  18. @class Mat;
  19. @class Size2i;
  20. @class TermCriteria;
  21. // C++: enum PatternPositionType (cv.aruco.PatternPositionType)
  22. typedef NS_ENUM(int, PatternPositionType) {
  23. ARUCO_CCW_CENTER = 0,
  24. ARUCO_CW_TOP_LEFT_CORNER = 1
  25. };
  26. NS_ASSUME_NONNULL_BEGIN
  27. // C++: class Aruco
  28. /**
  29. * The Aruco module
  30. *
  31. * Member classes: `EstimateParameters`
  32. *
  33. * Member enums: `PatternPositionType`
  34. */
  35. CV_EXPORTS @interface Aruco : NSObject
  36. #pragma mark - Methods
  37. //
  38. // void cv::aruco::detectMarkers(Mat image, Ptr_Dictionary dictionary, vector_Mat& corners, Mat& ids, Ptr_DetectorParameters parameters = makePtr<DetectorParameters>(), vector_Mat& rejectedImgPoints = vector_Mat())
  39. //
  40. /**
  41. * detect markers
  42. * @deprecated Use class ArucoDetector::detectMarkers
  43. */
  44. + (void)detectMarkers:(Mat*)image dictionary:(Dictionary*)dictionary corners:(NSMutableArray<Mat*>*)corners ids:(Mat*)ids parameters:(DetectorParameters*)parameters rejectedImgPoints:(NSMutableArray<Mat*>*)rejectedImgPoints NS_SWIFT_NAME(detectMarkers(image:dictionary:corners:ids:parameters:rejectedImgPoints:)) DEPRECATED_ATTRIBUTE;
  45. /**
  46. * detect markers
  47. * @deprecated Use class ArucoDetector::detectMarkers
  48. */
  49. + (void)detectMarkers:(Mat*)image dictionary:(Dictionary*)dictionary corners:(NSMutableArray<Mat*>*)corners ids:(Mat*)ids parameters:(DetectorParameters*)parameters NS_SWIFT_NAME(detectMarkers(image:dictionary:corners:ids:parameters:)) DEPRECATED_ATTRIBUTE;
  50. /**
  51. * detect markers
  52. * @deprecated Use class ArucoDetector::detectMarkers
  53. */
  54. + (void)detectMarkers:(Mat*)image dictionary:(Dictionary*)dictionary corners:(NSMutableArray<Mat*>*)corners ids:(Mat*)ids NS_SWIFT_NAME(detectMarkers(image:dictionary:corners:ids:)) DEPRECATED_ATTRIBUTE;
  55. //
  56. // void cv::aruco::refineDetectedMarkers(Mat image, Ptr_Board board, vector_Mat& detectedCorners, Mat& detectedIds, vector_Mat& rejectedCorners, Mat cameraMatrix = Mat(), Mat distCoeffs = Mat(), float minRepDistance = 10.f, float errorCorrectionRate = 3.f, bool checkAllOrders = true, Mat& recoveredIdxs = Mat(), Ptr_DetectorParameters parameters = makePtr<DetectorParameters>())
  57. //
  58. /**
  59. * refine detected markers
  60. * @deprecated Use class ArucoDetector::refineDetectedMarkers
  61. */
  62. + (void)refineDetectedMarkers:(Mat*)image board:(Board*)board detectedCorners:(NSMutableArray<Mat*>*)detectedCorners detectedIds:(Mat*)detectedIds rejectedCorners:(NSMutableArray<Mat*>*)rejectedCorners cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs minRepDistance:(float)minRepDistance errorCorrectionRate:(float)errorCorrectionRate checkAllOrders:(BOOL)checkAllOrders recoveredIdxs:(Mat*)recoveredIdxs parameters:(DetectorParameters*)parameters NS_SWIFT_NAME(refineDetectedMarkers(image:board:detectedCorners:detectedIds:rejectedCorners:cameraMatrix:distCoeffs:minRepDistance:errorCorrectionRate:checkAllOrders:recoveredIdxs:parameters:)) DEPRECATED_ATTRIBUTE;
  63. /**
  64. * refine detected markers
  65. * @deprecated Use class ArucoDetector::refineDetectedMarkers
  66. */
  67. + (void)refineDetectedMarkers:(Mat*)image board:(Board*)board detectedCorners:(NSMutableArray<Mat*>*)detectedCorners detectedIds:(Mat*)detectedIds rejectedCorners:(NSMutableArray<Mat*>*)rejectedCorners cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs minRepDistance:(float)minRepDistance errorCorrectionRate:(float)errorCorrectionRate checkAllOrders:(BOOL)checkAllOrders recoveredIdxs:(Mat*)recoveredIdxs NS_SWIFT_NAME(refineDetectedMarkers(image:board:detectedCorners:detectedIds:rejectedCorners:cameraMatrix:distCoeffs:minRepDistance:errorCorrectionRate:checkAllOrders:recoveredIdxs:)) DEPRECATED_ATTRIBUTE;
  68. /**
  69. * refine detected markers
  70. * @deprecated Use class ArucoDetector::refineDetectedMarkers
  71. */
  72. + (void)refineDetectedMarkers:(Mat*)image board:(Board*)board detectedCorners:(NSMutableArray<Mat*>*)detectedCorners detectedIds:(Mat*)detectedIds rejectedCorners:(NSMutableArray<Mat*>*)rejectedCorners cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs minRepDistance:(float)minRepDistance errorCorrectionRate:(float)errorCorrectionRate checkAllOrders:(BOOL)checkAllOrders NS_SWIFT_NAME(refineDetectedMarkers(image:board:detectedCorners:detectedIds:rejectedCorners:cameraMatrix:distCoeffs:minRepDistance:errorCorrectionRate:checkAllOrders:)) DEPRECATED_ATTRIBUTE;
  73. /**
  74. * refine detected markers
  75. * @deprecated Use class ArucoDetector::refineDetectedMarkers
  76. */
  77. + (void)refineDetectedMarkers:(Mat*)image board:(Board*)board detectedCorners:(NSMutableArray<Mat*>*)detectedCorners detectedIds:(Mat*)detectedIds rejectedCorners:(NSMutableArray<Mat*>*)rejectedCorners cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs minRepDistance:(float)minRepDistance errorCorrectionRate:(float)errorCorrectionRate NS_SWIFT_NAME(refineDetectedMarkers(image:board:detectedCorners:detectedIds:rejectedCorners:cameraMatrix:distCoeffs:minRepDistance:errorCorrectionRate:)) DEPRECATED_ATTRIBUTE;
  78. /**
  79. * refine detected markers
  80. * @deprecated Use class ArucoDetector::refineDetectedMarkers
  81. */
  82. + (void)refineDetectedMarkers:(Mat*)image board:(Board*)board detectedCorners:(NSMutableArray<Mat*>*)detectedCorners detectedIds:(Mat*)detectedIds rejectedCorners:(NSMutableArray<Mat*>*)rejectedCorners cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs minRepDistance:(float)minRepDistance NS_SWIFT_NAME(refineDetectedMarkers(image:board:detectedCorners:detectedIds:rejectedCorners:cameraMatrix:distCoeffs:minRepDistance:)) DEPRECATED_ATTRIBUTE;
  83. /**
  84. * refine detected markers
  85. * @deprecated Use class ArucoDetector::refineDetectedMarkers
  86. */
  87. + (void)refineDetectedMarkers:(Mat*)image board:(Board*)board detectedCorners:(NSMutableArray<Mat*>*)detectedCorners detectedIds:(Mat*)detectedIds rejectedCorners:(NSMutableArray<Mat*>*)rejectedCorners cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs NS_SWIFT_NAME(refineDetectedMarkers(image:board:detectedCorners:detectedIds:rejectedCorners:cameraMatrix:distCoeffs:)) DEPRECATED_ATTRIBUTE;
  88. /**
  89. * refine detected markers
  90. * @deprecated Use class ArucoDetector::refineDetectedMarkers
  91. */
  92. + (void)refineDetectedMarkers:(Mat*)image board:(Board*)board detectedCorners:(NSMutableArray<Mat*>*)detectedCorners detectedIds:(Mat*)detectedIds rejectedCorners:(NSMutableArray<Mat*>*)rejectedCorners cameraMatrix:(Mat*)cameraMatrix NS_SWIFT_NAME(refineDetectedMarkers(image:board:detectedCorners:detectedIds:rejectedCorners:cameraMatrix:)) DEPRECATED_ATTRIBUTE;
  93. /**
  94. * refine detected markers
  95. * @deprecated Use class ArucoDetector::refineDetectedMarkers
  96. */
  97. + (void)refineDetectedMarkers:(Mat*)image board:(Board*)board detectedCorners:(NSMutableArray<Mat*>*)detectedCorners detectedIds:(Mat*)detectedIds rejectedCorners:(NSMutableArray<Mat*>*)rejectedCorners NS_SWIFT_NAME(refineDetectedMarkers(image:board:detectedCorners:detectedIds:rejectedCorners:)) DEPRECATED_ATTRIBUTE;
  98. //
  99. // void cv::aruco::drawPlanarBoard(Ptr_Board board, Size outSize, Mat& img, int marginSize, int borderBits)
  100. //
  101. /**
  102. * draw planar board
  103. * @deprecated Use Board::generateImage
  104. */
  105. + (void)drawPlanarBoard:(Board*)board outSize:(Size2i*)outSize img:(Mat*)img marginSize:(int)marginSize borderBits:(int)borderBits NS_SWIFT_NAME(drawPlanarBoard(board:outSize:img:marginSize:borderBits:)) DEPRECATED_ATTRIBUTE;
  106. //
  107. // void cv::aruco::getBoardObjectAndImagePoints(Ptr_Board board, vector_Mat detectedCorners, Mat detectedIds, Mat& objPoints, Mat& imgPoints)
  108. //
  109. /**
  110. * get board object and image points
  111. * @deprecated Use Board::matchImagePoints
  112. */
  113. + (void)getBoardObjectAndImagePoints:(Board*)board detectedCorners:(NSArray<Mat*>*)detectedCorners detectedIds:(Mat*)detectedIds objPoints:(Mat*)objPoints imgPoints:(Mat*)imgPoints NS_SWIFT_NAME(getBoardObjectAndImagePoints(board:detectedCorners:detectedIds:objPoints:imgPoints:)) DEPRECATED_ATTRIBUTE;
  114. //
  115. // int cv::aruco::estimatePoseBoard(vector_Mat corners, Mat ids, Ptr_Board board, Mat cameraMatrix, Mat distCoeffs, Mat& rvec, Mat& tvec, bool useExtrinsicGuess = false)
  116. //
  117. /**
  118. * @deprecated Use cv::solvePnP
  119. */
  120. + (int)estimatePoseBoard:(NSArray<Mat*>*)corners ids:(Mat*)ids board:(Board*)board cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs rvec:(Mat*)rvec tvec:(Mat*)tvec useExtrinsicGuess:(BOOL)useExtrinsicGuess NS_SWIFT_NAME(estimatePoseBoard(corners:ids:board:cameraMatrix:distCoeffs:rvec:tvec:useExtrinsicGuess:)) DEPRECATED_ATTRIBUTE;
  121. /**
  122. * @deprecated Use cv::solvePnP
  123. */
  124. + (int)estimatePoseBoard:(NSArray<Mat*>*)corners ids:(Mat*)ids board:(Board*)board cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs rvec:(Mat*)rvec tvec:(Mat*)tvec NS_SWIFT_NAME(estimatePoseBoard(corners:ids:board:cameraMatrix:distCoeffs:rvec:tvec:)) DEPRECATED_ATTRIBUTE;
  125. //
  126. // bool cv::aruco::estimatePoseCharucoBoard(Mat charucoCorners, Mat charucoIds, Ptr_CharucoBoard board, Mat cameraMatrix, Mat distCoeffs, Mat& rvec, Mat& tvec, bool useExtrinsicGuess = false)
  127. //
  128. /**
  129. * Pose estimation for a ChArUco board given some of their corners
  130. * @param charucoCorners vector of detected charuco corners
  131. * @param charucoIds list of identifiers for each corner in charucoCorners
  132. * @param board layout of ChArUco board.
  133. * @param cameraMatrix input 3x3 floating-point camera matrix
  134. * `$$\newcommand{\vecthreethree}[9]{ \begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \end{bmatrix} } A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}$$`
  135. * @param distCoeffs vector of distortion coefficients
  136. * `$$(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
  137. * @param rvec Output vector (e.g. cv::Mat) corresponding to the rotation vector of the board
  138. * (see cv::Rodrigues).
  139. * @param tvec Output vector (e.g. cv::Mat) corresponding to the translation vector of the board.
  140. * @param useExtrinsicGuess defines whether initial guess for \b rvec and \b tvec will be used or not.
  141. *
  142. * This function estimates a Charuco board pose from some detected corners.
  143. * The function checks if the input corners are enough and valid to perform pose estimation.
  144. * If pose estimation is valid, returns true, else returns false.
  145. * @see `use cv::drawFrameAxes to get world coordinate system axis for object points`
  146. */
  147. + (BOOL)estimatePoseCharucoBoard:(Mat*)charucoCorners charucoIds:(Mat*)charucoIds board:(CharucoBoard*)board cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs rvec:(Mat*)rvec tvec:(Mat*)tvec useExtrinsicGuess:(BOOL)useExtrinsicGuess NS_SWIFT_NAME(estimatePoseCharucoBoard(charucoCorners:charucoIds:board:cameraMatrix:distCoeffs:rvec:tvec:useExtrinsicGuess:));
  148. /**
  149. * Pose estimation for a ChArUco board given some of their corners
  150. * @param charucoCorners vector of detected charuco corners
  151. * @param charucoIds list of identifiers for each corner in charucoCorners
  152. * @param board layout of ChArUco board.
  153. * @param cameraMatrix input 3x3 floating-point camera matrix
  154. * `$$\newcommand{\vecthreethree}[9]{ \begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \end{bmatrix} } A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}$$`
  155. * @param distCoeffs vector of distortion coefficients
  156. * `$$(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
  157. * @param rvec Output vector (e.g. cv::Mat) corresponding to the rotation vector of the board
  158. * (see cv::Rodrigues).
  159. * @param tvec Output vector (e.g. cv::Mat) corresponding to the translation vector of the board.
  160. *
  161. * This function estimates a Charuco board pose from some detected corners.
  162. * The function checks if the input corners are enough and valid to perform pose estimation.
  163. * If pose estimation is valid, returns true, else returns false.
  164. * @see `use cv::drawFrameAxes to get world coordinate system axis for object points`
  165. */
  166. + (BOOL)estimatePoseCharucoBoard:(Mat*)charucoCorners charucoIds:(Mat*)charucoIds board:(CharucoBoard*)board cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs rvec:(Mat*)rvec tvec:(Mat*)tvec NS_SWIFT_NAME(estimatePoseCharucoBoard(charucoCorners:charucoIds:board:cameraMatrix:distCoeffs:rvec:tvec:));
  167. //
  168. // void cv::aruco::estimatePoseSingleMarkers(vector_Mat corners, float markerLength, Mat cameraMatrix, Mat distCoeffs, Mat& rvecs, Mat& tvecs, Mat& objPoints = Mat(), _hidden_ estimateParameters = cv::makePtr<cv::aruco::EstimateParameters>())
  169. //
  170. /**
  171. * @deprecated Use cv::solvePnP
  172. */
  173. + (void)estimatePoseSingleMarkers:(NSArray<Mat*>*)corners markerLength:(float)markerLength cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs rvecs:(Mat*)rvecs tvecs:(Mat*)tvecs objPoints:(Mat*)objPoints NS_SWIFT_NAME(estimatePoseSingleMarkers(corners:markerLength:cameraMatrix:distCoeffs:rvecs:tvecs:objPoints:)) DEPRECATED_ATTRIBUTE;
  174. /**
  175. * @deprecated Use cv::solvePnP
  176. */
  177. + (void)estimatePoseSingleMarkers:(NSArray<Mat*>*)corners markerLength:(float)markerLength cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs rvecs:(Mat*)rvecs tvecs:(Mat*)tvecs NS_SWIFT_NAME(estimatePoseSingleMarkers(corners:markerLength:cameraMatrix:distCoeffs:rvecs:tvecs:)) DEPRECATED_ATTRIBUTE;
  178. //
  179. // bool cv::aruco::testCharucoCornersCollinear(Ptr_CharucoBoard board, Mat charucoIds)
  180. //
  181. /**
  182. * @deprecated Use CharucoBoard::checkCharucoCornersCollinear
  183. */
  184. + (BOOL)testCharucoCornersCollinear:(CharucoBoard*)board charucoIds:(Mat*)charucoIds NS_SWIFT_NAME(testCharucoCornersCollinear(board:charucoIds:)) DEPRECATED_ATTRIBUTE;
  185. //
  186. // double cv::aruco::calibrateCameraAruco(vector_Mat corners, Mat ids, Mat counter, Ptr_Board board, Size imageSize, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, Mat& stdDeviationsIntrinsics, Mat& stdDeviationsExtrinsics, Mat& perViewErrors, int flags = 0, TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
  187. //
  188. /**
  189. * Calibrate a camera using aruco markers
  190. *
  191. * @param corners vector of detected marker corners in all frames.
  192. * The corners should have the same format returned by detectMarkers (see #detectMarkers).
  193. * @param ids list of identifiers for each marker in corners
  194. * @param counter number of markers in each frame so that corners and ids can be split
  195. * @param board Marker Board layout
  196. * @param imageSize Size of the image used only to initialize the intrinsic camera matrix.
  197. * @param cameraMatrix Output 3x3 floating-point camera matrix
  198. * `$$\newcommand{\vecthreethree}[9]{ \begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \end{bmatrix} } A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}$$` . If CV\_CALIB\_USE\_INTRINSIC\_GUESS
  199. * and/or CV_CALIB_FIX_ASPECT_RATIO are specified, some or all of fx, fy, cx, cy must be
  200. * initialized before calling the function.
  201. * @param distCoeffs Output vector of distortion coefficients
  202. * `$$(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
  203. * @param rvecs Output vector of rotation vectors (see Rodrigues ) estimated for each board view
  204. * (e.g. std::vector<cv::Mat>>). That is, each k-th rotation vector together with the corresponding
  205. * k-th translation vector (see the next output parameter description) brings the board pattern
  206. * from the model coordinate space (in which object points are specified) to the world coordinate
  207. * space, that is, a real position of the board pattern in the k-th pattern view (k=0.. *M* -1).
  208. * @param tvecs Output vector of translation vectors estimated for each pattern view.
  209. * @param stdDeviationsIntrinsics Output vector of standard deviations estimated for intrinsic parameters.
  210. * Order of deviations values:
  211. * `$$(f_x, f_y, c_x, c_y, k_1, k_2, p_1, p_2, k_3, k_4, k_5, k_6 , s_1, s_2, s_3,
  212. * s_4, \tau_x, \tau_y)$$` If one of parameters is not estimated, it's deviation is equals to zero.
  213. * @param stdDeviationsExtrinsics Output vector of standard deviations estimated for extrinsic parameters.
  214. * Order of deviations values: `$$(R_1, T_1, \dotsc , R_M, T_M)$$` where M is number of pattern views,
  215. * `$$R_i, T_i$$` are concatenated 1x3 vectors.
  216. * @param perViewErrors Output vector of average re-projection errors estimated for each pattern view.
  217. * @param flags flags Different flags for the calibration process (see #calibrateCamera for details).
  218. * @param criteria Termination criteria for the iterative optimization algorithm.
  219. *
  220. * This function calibrates a camera using an Aruco Board. The function receives a list of
  221. * detected markers from several views of the Board. The process is similar to the chessboard
  222. * calibration in calibrateCamera(). The function returns the final re-projection error.
  223. */
  224. + (double)calibrateCameraArucoExtended:(NSArray<Mat*>*)corners ids:(Mat*)ids counter:(Mat*)counter board:(Board*)board imageSize:(Size2i*)imageSize cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs rvecs:(NSMutableArray<Mat*>*)rvecs tvecs:(NSMutableArray<Mat*>*)tvecs stdDeviationsIntrinsics:(Mat*)stdDeviationsIntrinsics stdDeviationsExtrinsics:(Mat*)stdDeviationsExtrinsics perViewErrors:(Mat*)perViewErrors flags:(int)flags criteria:(TermCriteria*)criteria NS_SWIFT_NAME(calibrateCameraAruco(corners:ids:counter:board:imageSize:cameraMatrix:distCoeffs:rvecs:tvecs:stdDeviationsIntrinsics:stdDeviationsExtrinsics:perViewErrors:flags:criteria:));
  225. /**
  226. * Calibrate a camera using aruco markers
  227. *
  228. * @param corners vector of detected marker corners in all frames.
  229. * The corners should have the same format returned by detectMarkers (see #detectMarkers).
  230. * @param ids list of identifiers for each marker in corners
  231. * @param counter number of markers in each frame so that corners and ids can be split
  232. * @param board Marker Board layout
  233. * @param imageSize Size of the image used only to initialize the intrinsic camera matrix.
  234. * @param cameraMatrix Output 3x3 floating-point camera matrix
  235. * `$$\newcommand{\vecthreethree}[9]{ \begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \end{bmatrix} } A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}$$` . If CV\_CALIB\_USE\_INTRINSIC\_GUESS
  236. * and/or CV_CALIB_FIX_ASPECT_RATIO are specified, some or all of fx, fy, cx, cy must be
  237. * initialized before calling the function.
  238. * @param distCoeffs Output vector of distortion coefficients
  239. * `$$(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
  240. * @param rvecs Output vector of rotation vectors (see Rodrigues ) estimated for each board view
  241. * (e.g. std::vector<cv::Mat>>). That is, each k-th rotation vector together with the corresponding
  242. * k-th translation vector (see the next output parameter description) brings the board pattern
  243. * from the model coordinate space (in which object points are specified) to the world coordinate
  244. * space, that is, a real position of the board pattern in the k-th pattern view (k=0.. *M* -1).
  245. * @param tvecs Output vector of translation vectors estimated for each pattern view.
  246. * @param stdDeviationsIntrinsics Output vector of standard deviations estimated for intrinsic parameters.
  247. * Order of deviations values:
  248. * `$$(f_x, f_y, c_x, c_y, k_1, k_2, p_1, p_2, k_3, k_4, k_5, k_6 , s_1, s_2, s_3,
  249. * s_4, \tau_x, \tau_y)$$` If one of parameters is not estimated, it's deviation is equals to zero.
  250. * @param stdDeviationsExtrinsics Output vector of standard deviations estimated for extrinsic parameters.
  251. * Order of deviations values: `$$(R_1, T_1, \dotsc , R_M, T_M)$$` where M is number of pattern views,
  252. * `$$R_i, T_i$$` are concatenated 1x3 vectors.
  253. * @param perViewErrors Output vector of average re-projection errors estimated for each pattern view.
  254. * @param flags flags Different flags for the calibration process (see #calibrateCamera for details).
  255. *
  256. * This function calibrates a camera using an Aruco Board. The function receives a list of
  257. * detected markers from several views of the Board. The process is similar to the chessboard
  258. * calibration in calibrateCamera(). The function returns the final re-projection error.
  259. */
  260. + (double)calibrateCameraArucoExtended:(NSArray<Mat*>*)corners ids:(Mat*)ids counter:(Mat*)counter board:(Board*)board imageSize:(Size2i*)imageSize cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs rvecs:(NSMutableArray<Mat*>*)rvecs tvecs:(NSMutableArray<Mat*>*)tvecs stdDeviationsIntrinsics:(Mat*)stdDeviationsIntrinsics stdDeviationsExtrinsics:(Mat*)stdDeviationsExtrinsics perViewErrors:(Mat*)perViewErrors flags:(int)flags NS_SWIFT_NAME(calibrateCameraAruco(corners:ids:counter:board:imageSize:cameraMatrix:distCoeffs:rvecs:tvecs:stdDeviationsIntrinsics:stdDeviationsExtrinsics:perViewErrors:flags:));
  261. /**
  262. * Calibrate a camera using aruco markers
  263. *
  264. * @param corners vector of detected marker corners in all frames.
  265. * The corners should have the same format returned by detectMarkers (see #detectMarkers).
  266. * @param ids list of identifiers for each marker in corners
  267. * @param counter number of markers in each frame so that corners and ids can be split
  268. * @param board Marker Board layout
  269. * @param imageSize Size of the image used only to initialize the intrinsic camera matrix.
  270. * @param cameraMatrix Output 3x3 floating-point camera matrix
  271. * `$$\newcommand{\vecthreethree}[9]{ \begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \end{bmatrix} } A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}$$` . If CV\_CALIB\_USE\_INTRINSIC\_GUESS
  272. * and/or CV_CALIB_FIX_ASPECT_RATIO are specified, some or all of fx, fy, cx, cy must be
  273. * initialized before calling the function.
  274. * @param distCoeffs Output vector of distortion coefficients
  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. * @param rvecs Output vector of rotation vectors (see Rodrigues ) estimated for each board view
  277. * (e.g. std::vector<cv::Mat>>). That is, each k-th rotation vector together with the corresponding
  278. * k-th translation vector (see the next output parameter description) brings the board pattern
  279. * from the model coordinate space (in which object points are specified) to the world coordinate
  280. * space, that is, a real position of the board pattern in the k-th pattern view (k=0.. *M* -1).
  281. * @param tvecs Output vector of translation vectors estimated for each pattern view.
  282. * @param stdDeviationsIntrinsics Output vector of standard deviations estimated for intrinsic parameters.
  283. * Order of deviations values:
  284. * `$$(f_x, f_y, c_x, c_y, k_1, k_2, p_1, p_2, k_3, k_4, k_5, k_6 , s_1, s_2, s_3,
  285. * s_4, \tau_x, \tau_y)$$` If one of parameters is not estimated, it's deviation is equals to zero.
  286. * @param stdDeviationsExtrinsics Output vector of standard deviations estimated for extrinsic parameters.
  287. * Order of deviations values: `$$(R_1, T_1, \dotsc , R_M, T_M)$$` where M is number of pattern views,
  288. * `$$R_i, T_i$$` are concatenated 1x3 vectors.
  289. * @param perViewErrors Output vector of average re-projection errors estimated for each pattern view.
  290. *
  291. * This function calibrates a camera using an Aruco Board. The function receives a list of
  292. * detected markers from several views of the Board. The process is similar to the chessboard
  293. * calibration in calibrateCamera(). The function returns the final re-projection error.
  294. */
  295. + (double)calibrateCameraArucoExtended:(NSArray<Mat*>*)corners ids:(Mat*)ids counter:(Mat*)counter board:(Board*)board imageSize:(Size2i*)imageSize cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs rvecs:(NSMutableArray<Mat*>*)rvecs tvecs:(NSMutableArray<Mat*>*)tvecs stdDeviationsIntrinsics:(Mat*)stdDeviationsIntrinsics stdDeviationsExtrinsics:(Mat*)stdDeviationsExtrinsics perViewErrors:(Mat*)perViewErrors NS_SWIFT_NAME(calibrateCameraAruco(corners:ids:counter:board:imageSize:cameraMatrix:distCoeffs:rvecs:tvecs:stdDeviationsIntrinsics:stdDeviationsExtrinsics:perViewErrors:));
  296. //
  297. // double cv::aruco::calibrateCameraAruco(vector_Mat corners, Mat ids, Mat counter, Ptr_Board board, Size imageSize, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs = vector_Mat(), vector_Mat& tvecs = vector_Mat(), int flags = 0, TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
  298. //
  299. /**
  300. *
  301. * It's the same function as #calibrateCameraAruco but without calibration error estimation.
  302. */
  303. + (double)calibrateCameraAruco:(NSArray<Mat*>*)corners ids:(Mat*)ids counter:(Mat*)counter board:(Board*)board imageSize:(Size2i*)imageSize cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs rvecs:(NSMutableArray<Mat*>*)rvecs tvecs:(NSMutableArray<Mat*>*)tvecs flags:(int)flags criteria:(TermCriteria*)criteria NS_SWIFT_NAME(calibrateCameraAruco(corners:ids:counter:board:imageSize:cameraMatrix:distCoeffs:rvecs:tvecs:flags:criteria:));
  304. /**
  305. *
  306. * It's the same function as #calibrateCameraAruco but without calibration error estimation.
  307. */
  308. + (double)calibrateCameraAruco:(NSArray<Mat*>*)corners ids:(Mat*)ids counter:(Mat*)counter board:(Board*)board imageSize:(Size2i*)imageSize cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs rvecs:(NSMutableArray<Mat*>*)rvecs tvecs:(NSMutableArray<Mat*>*)tvecs flags:(int)flags NS_SWIFT_NAME(calibrateCameraAruco(corners:ids:counter:board:imageSize:cameraMatrix:distCoeffs:rvecs:tvecs:flags:));
  309. /**
  310. *
  311. * It's the same function as #calibrateCameraAruco but without calibration error estimation.
  312. */
  313. + (double)calibrateCameraAruco:(NSArray<Mat*>*)corners ids:(Mat*)ids counter:(Mat*)counter board:(Board*)board imageSize:(Size2i*)imageSize cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs rvecs:(NSMutableArray<Mat*>*)rvecs tvecs:(NSMutableArray<Mat*>*)tvecs NS_SWIFT_NAME(calibrateCameraAruco(corners:ids:counter:board:imageSize:cameraMatrix:distCoeffs:rvecs:tvecs:));
  314. /**
  315. *
  316. * It's the same function as #calibrateCameraAruco but without calibration error estimation.
  317. */
  318. + (double)calibrateCameraAruco:(NSArray<Mat*>*)corners ids:(Mat*)ids counter:(Mat*)counter board:(Board*)board imageSize:(Size2i*)imageSize cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs rvecs:(NSMutableArray<Mat*>*)rvecs NS_SWIFT_NAME(calibrateCameraAruco(corners:ids:counter:board:imageSize:cameraMatrix:distCoeffs:rvecs:));
  319. /**
  320. *
  321. * It's the same function as #calibrateCameraAruco but without calibration error estimation.
  322. */
  323. + (double)calibrateCameraAruco:(NSArray<Mat*>*)corners ids:(Mat*)ids counter:(Mat*)counter board:(Board*)board imageSize:(Size2i*)imageSize cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs NS_SWIFT_NAME(calibrateCameraAruco(corners:ids:counter:board:imageSize:cameraMatrix:distCoeffs:));
  324. //
  325. // double cv::aruco::calibrateCameraCharuco(vector_Mat charucoCorners, vector_Mat charucoIds, Ptr_CharucoBoard board, Size imageSize, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs, vector_Mat& tvecs, Mat& stdDeviationsIntrinsics, Mat& stdDeviationsExtrinsics, Mat& perViewErrors, int flags = 0, TermCriteria criteria = TermCriteria( TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
  326. //
  327. /**
  328. * Calibrate a camera using Charuco corners
  329. *
  330. * @param charucoCorners vector of detected charuco corners per frame
  331. * @param charucoIds list of identifiers for each corner in charucoCorners per frame
  332. * @param board Marker Board layout
  333. * @param imageSize input image size
  334. * @param cameraMatrix Output 3x3 floating-point camera matrix
  335. * `$$\newcommand{\vecthreethree}[9]{ \begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \end{bmatrix} } A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}$$` . If CV\_CALIB\_USE\_INTRINSIC\_GUESS
  336. * and/or CV_CALIB_FIX_ASPECT_RATIO are specified, some or all of fx, fy, cx, cy must be
  337. * initialized before calling the function.
  338. * @param distCoeffs Output vector of distortion coefficients
  339. * `$$(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
  340. * @param rvecs Output vector of rotation vectors (see Rodrigues ) estimated for each board view
  341. * (e.g. std::vector<cv::Mat>>). That is, each k-th rotation vector together with the corresponding
  342. * k-th translation vector (see the next output parameter description) brings the board pattern
  343. * from the model coordinate space (in which object points are specified) to the world coordinate
  344. * space, that is, a real position of the board pattern in the k-th pattern view (k=0.. *M* -1).
  345. * @param tvecs Output vector of translation vectors estimated for each pattern view.
  346. * @param stdDeviationsIntrinsics Output vector of standard deviations estimated for intrinsic parameters.
  347. * Order of deviations values:
  348. * `$$(f_x, f_y, c_x, c_y, k_1, k_2, p_1, p_2, k_3, k_4, k_5, k_6 , s_1, s_2, s_3,
  349. * s_4, \tau_x, \tau_y)$$` If one of parameters is not estimated, it's deviation is equals to zero.
  350. * @param stdDeviationsExtrinsics Output vector of standard deviations estimated for extrinsic parameters.
  351. * Order of deviations values: `$$(R_1, T_1, \dotsc , R_M, T_M)$$` where M is number of pattern views,
  352. * `$$R_i, T_i$$` are concatenated 1x3 vectors.
  353. * @param perViewErrors Output vector of average re-projection errors estimated for each pattern view.
  354. * @param flags flags Different flags for the calibration process (see #calibrateCamera for details).
  355. * @param criteria Termination criteria for the iterative optimization algorithm.
  356. *
  357. * This function calibrates a camera using a set of corners of a Charuco Board. The function
  358. * receives a list of detected corners and its identifiers from several views of the Board.
  359. * The function returns the final re-projection error.
  360. */
  361. + (double)calibrateCameraCharucoExtended:(NSArray<Mat*>*)charucoCorners charucoIds:(NSArray<Mat*>*)charucoIds board:(CharucoBoard*)board imageSize:(Size2i*)imageSize cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs rvecs:(NSMutableArray<Mat*>*)rvecs tvecs:(NSMutableArray<Mat*>*)tvecs stdDeviationsIntrinsics:(Mat*)stdDeviationsIntrinsics stdDeviationsExtrinsics:(Mat*)stdDeviationsExtrinsics perViewErrors:(Mat*)perViewErrors flags:(int)flags criteria:(TermCriteria*)criteria NS_SWIFT_NAME(calibrateCameraCharuco(charucoCorners:charucoIds:board:imageSize:cameraMatrix:distCoeffs:rvecs:tvecs:stdDeviationsIntrinsics:stdDeviationsExtrinsics:perViewErrors:flags:criteria:));
  362. /**
  363. * Calibrate a camera using Charuco corners
  364. *
  365. * @param charucoCorners vector of detected charuco corners per frame
  366. * @param charucoIds list of identifiers for each corner in charucoCorners per frame
  367. * @param board Marker Board layout
  368. * @param imageSize input image size
  369. * @param cameraMatrix Output 3x3 floating-point camera matrix
  370. * `$$\newcommand{\vecthreethree}[9]{ \begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \end{bmatrix} } A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}$$` . If CV\_CALIB\_USE\_INTRINSIC\_GUESS
  371. * and/or CV_CALIB_FIX_ASPECT_RATIO are specified, some or all of fx, fy, cx, cy must be
  372. * initialized before calling the function.
  373. * @param distCoeffs Output vector of distortion coefficients
  374. * `$$(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
  375. * @param rvecs Output vector of rotation vectors (see Rodrigues ) estimated for each board view
  376. * (e.g. std::vector<cv::Mat>>). That is, each k-th rotation vector together with the corresponding
  377. * k-th translation vector (see the next output parameter description) brings the board pattern
  378. * from the model coordinate space (in which object points are specified) to the world coordinate
  379. * space, that is, a real position of the board pattern in the k-th pattern view (k=0.. *M* -1).
  380. * @param tvecs Output vector of translation vectors estimated for each pattern view.
  381. * @param stdDeviationsIntrinsics Output vector of standard deviations estimated for intrinsic parameters.
  382. * Order of deviations values:
  383. * `$$(f_x, f_y, c_x, c_y, k_1, k_2, p_1, p_2, k_3, k_4, k_5, k_6 , s_1, s_2, s_3,
  384. * s_4, \tau_x, \tau_y)$$` If one of parameters is not estimated, it's deviation is equals to zero.
  385. * @param stdDeviationsExtrinsics Output vector of standard deviations estimated for extrinsic parameters.
  386. * Order of deviations values: `$$(R_1, T_1, \dotsc , R_M, T_M)$$` where M is number of pattern views,
  387. * `$$R_i, T_i$$` are concatenated 1x3 vectors.
  388. * @param perViewErrors Output vector of average re-projection errors estimated for each pattern view.
  389. * @param flags flags Different flags for the calibration process (see #calibrateCamera for details).
  390. *
  391. * This function calibrates a camera using a set of corners of a Charuco Board. The function
  392. * receives a list of detected corners and its identifiers from several views of the Board.
  393. * The function returns the final re-projection error.
  394. */
  395. + (double)calibrateCameraCharucoExtended:(NSArray<Mat*>*)charucoCorners charucoIds:(NSArray<Mat*>*)charucoIds board:(CharucoBoard*)board imageSize:(Size2i*)imageSize cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs rvecs:(NSMutableArray<Mat*>*)rvecs tvecs:(NSMutableArray<Mat*>*)tvecs stdDeviationsIntrinsics:(Mat*)stdDeviationsIntrinsics stdDeviationsExtrinsics:(Mat*)stdDeviationsExtrinsics perViewErrors:(Mat*)perViewErrors flags:(int)flags NS_SWIFT_NAME(calibrateCameraCharuco(charucoCorners:charucoIds:board:imageSize:cameraMatrix:distCoeffs:rvecs:tvecs:stdDeviationsIntrinsics:stdDeviationsExtrinsics:perViewErrors:flags:));
  396. /**
  397. * Calibrate a camera using Charuco corners
  398. *
  399. * @param charucoCorners vector of detected charuco corners per frame
  400. * @param charucoIds list of identifiers for each corner in charucoCorners per frame
  401. * @param board Marker Board layout
  402. * @param imageSize input image size
  403. * @param cameraMatrix Output 3x3 floating-point camera matrix
  404. * `$$\newcommand{\vecthreethree}[9]{ \begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \end{bmatrix} } A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}$$` . If CV\_CALIB\_USE\_INTRINSIC\_GUESS
  405. * and/or CV_CALIB_FIX_ASPECT_RATIO are specified, some or all of fx, fy, cx, cy must be
  406. * initialized before calling the function.
  407. * @param distCoeffs Output vector of distortion coefficients
  408. * `$$(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
  409. * @param rvecs Output vector of rotation vectors (see Rodrigues ) estimated for each board view
  410. * (e.g. std::vector<cv::Mat>>). That is, each k-th rotation vector together with the corresponding
  411. * k-th translation vector (see the next output parameter description) brings the board pattern
  412. * from the model coordinate space (in which object points are specified) to the world coordinate
  413. * space, that is, a real position of the board pattern in the k-th pattern view (k=0.. *M* -1).
  414. * @param tvecs Output vector of translation vectors estimated for each pattern view.
  415. * @param stdDeviationsIntrinsics Output vector of standard deviations estimated for intrinsic parameters.
  416. * Order of deviations values:
  417. * `$$(f_x, f_y, c_x, c_y, k_1, k_2, p_1, p_2, k_3, k_4, k_5, k_6 , s_1, s_2, s_3,
  418. * s_4, \tau_x, \tau_y)$$` If one of parameters is not estimated, it's deviation is equals to zero.
  419. * @param stdDeviationsExtrinsics Output vector of standard deviations estimated for extrinsic parameters.
  420. * Order of deviations values: `$$(R_1, T_1, \dotsc , R_M, T_M)$$` where M is number of pattern views,
  421. * `$$R_i, T_i$$` are concatenated 1x3 vectors.
  422. * @param perViewErrors Output vector of average re-projection errors estimated for each pattern view.
  423. *
  424. * This function calibrates a camera using a set of corners of a Charuco Board. The function
  425. * receives a list of detected corners and its identifiers from several views of the Board.
  426. * The function returns the final re-projection error.
  427. */
  428. + (double)calibrateCameraCharucoExtended:(NSArray<Mat*>*)charucoCorners charucoIds:(NSArray<Mat*>*)charucoIds board:(CharucoBoard*)board imageSize:(Size2i*)imageSize cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs rvecs:(NSMutableArray<Mat*>*)rvecs tvecs:(NSMutableArray<Mat*>*)tvecs stdDeviationsIntrinsics:(Mat*)stdDeviationsIntrinsics stdDeviationsExtrinsics:(Mat*)stdDeviationsExtrinsics perViewErrors:(Mat*)perViewErrors NS_SWIFT_NAME(calibrateCameraCharuco(charucoCorners:charucoIds:board:imageSize:cameraMatrix:distCoeffs:rvecs:tvecs:stdDeviationsIntrinsics:stdDeviationsExtrinsics:perViewErrors:));
  429. //
  430. // double cv::aruco::calibrateCameraCharuco(vector_Mat charucoCorners, vector_Mat charucoIds, Ptr_CharucoBoard board, Size imageSize, Mat& cameraMatrix, Mat& distCoeffs, vector_Mat& rvecs = vector_Mat(), vector_Mat& tvecs = vector_Mat(), int flags = 0, TermCriteria criteria = TermCriteria(TermCriteria::COUNT + TermCriteria::EPS, 30, DBL_EPSILON))
  431. //
  432. /**
  433. * It's the same function as #calibrateCameraCharuco but without calibration error estimation.
  434. */
  435. + (double)calibrateCameraCharuco:(NSArray<Mat*>*)charucoCorners charucoIds:(NSArray<Mat*>*)charucoIds board:(CharucoBoard*)board imageSize:(Size2i*)imageSize cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs rvecs:(NSMutableArray<Mat*>*)rvecs tvecs:(NSMutableArray<Mat*>*)tvecs flags:(int)flags criteria:(TermCriteria*)criteria NS_SWIFT_NAME(calibrateCameraCharuco(charucoCorners:charucoIds:board:imageSize:cameraMatrix:distCoeffs:rvecs:tvecs:flags:criteria:));
  436. /**
  437. * It's the same function as #calibrateCameraCharuco but without calibration error estimation.
  438. */
  439. + (double)calibrateCameraCharuco:(NSArray<Mat*>*)charucoCorners charucoIds:(NSArray<Mat*>*)charucoIds board:(CharucoBoard*)board imageSize:(Size2i*)imageSize cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs rvecs:(NSMutableArray<Mat*>*)rvecs tvecs:(NSMutableArray<Mat*>*)tvecs flags:(int)flags NS_SWIFT_NAME(calibrateCameraCharuco(charucoCorners:charucoIds:board:imageSize:cameraMatrix:distCoeffs:rvecs:tvecs:flags:));
  440. /**
  441. * It's the same function as #calibrateCameraCharuco but without calibration error estimation.
  442. */
  443. + (double)calibrateCameraCharuco:(NSArray<Mat*>*)charucoCorners charucoIds:(NSArray<Mat*>*)charucoIds board:(CharucoBoard*)board imageSize:(Size2i*)imageSize cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs rvecs:(NSMutableArray<Mat*>*)rvecs tvecs:(NSMutableArray<Mat*>*)tvecs NS_SWIFT_NAME(calibrateCameraCharuco(charucoCorners:charucoIds:board:imageSize:cameraMatrix:distCoeffs:rvecs:tvecs:));
  444. /**
  445. * It's the same function as #calibrateCameraCharuco but without calibration error estimation.
  446. */
  447. + (double)calibrateCameraCharuco:(NSArray<Mat*>*)charucoCorners charucoIds:(NSArray<Mat*>*)charucoIds board:(CharucoBoard*)board imageSize:(Size2i*)imageSize cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs rvecs:(NSMutableArray<Mat*>*)rvecs NS_SWIFT_NAME(calibrateCameraCharuco(charucoCorners:charucoIds:board:imageSize:cameraMatrix:distCoeffs:rvecs:));
  448. /**
  449. * It's the same function as #calibrateCameraCharuco but without calibration error estimation.
  450. */
  451. + (double)calibrateCameraCharuco:(NSArray<Mat*>*)charucoCorners charucoIds:(NSArray<Mat*>*)charucoIds board:(CharucoBoard*)board imageSize:(Size2i*)imageSize cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs NS_SWIFT_NAME(calibrateCameraCharuco(charucoCorners:charucoIds:board:imageSize:cameraMatrix:distCoeffs:));
  452. //
  453. // int cv::aruco::interpolateCornersCharuco(vector_Mat markerCorners, Mat markerIds, Mat image, Ptr_CharucoBoard board, Mat& charucoCorners, Mat& charucoIds, Mat cameraMatrix = Mat(), Mat distCoeffs = Mat(), int minMarkers = 2)
  454. //
  455. /**
  456. * Interpolate position of ChArUco board corners
  457. * @param markerCorners vector of already detected markers corners. For each marker, its four
  458. * corners are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the
  459. * dimensions of this array should be Nx4. The order of the corners should be clockwise.
  460. * @param markerIds list of identifiers for each marker in corners
  461. * @param image input image necesary for corner refinement. Note that markers are not detected and
  462. * should be sent in corners and ids parameters.
  463. * @param board layout of ChArUco board.
  464. * @param charucoCorners interpolated chessboard corners
  465. * @param charucoIds interpolated chessboard corners identifiers
  466. * @param cameraMatrix optional 3x3 floating-point camera matrix
  467. * `$$\newcommand{\vecthreethree}[9]{ \begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \end{bmatrix} } A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}$$`
  468. * @param distCoeffs optional vector of distortion coefficients
  469. * `$$(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
  470. * @param minMarkers number of adjacent markers that must be detected to return a charuco corner
  471. *
  472. * This function receives the detected markers and returns the 2D position of the chessboard corners
  473. * from a ChArUco board using the detected Aruco markers. If camera parameters are provided,
  474. * the process is based in an approximated pose estimation, else it is based on local homography.
  475. * Only visible corners are returned. For each corner, its corresponding identifier is
  476. * also returned in charucoIds.
  477. * The function returns the number of interpolated corners.
  478. *
  479. * @deprecated Use CharucoDetector::detectBoard
  480. */
  481. + (int)interpolateCornersCharuco:(NSArray<Mat*>*)markerCorners markerIds:(Mat*)markerIds image:(Mat*)image board:(CharucoBoard*)board charucoCorners:(Mat*)charucoCorners charucoIds:(Mat*)charucoIds cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs minMarkers:(int)minMarkers NS_SWIFT_NAME(interpolateCornersCharuco(markerCorners:markerIds:image:board:charucoCorners:charucoIds:cameraMatrix:distCoeffs:minMarkers:)) DEPRECATED_ATTRIBUTE;
  482. /**
  483. * Interpolate position of ChArUco board corners
  484. * @param markerCorners vector of already detected markers corners. For each marker, its four
  485. * corners are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the
  486. * dimensions of this array should be Nx4. The order of the corners should be clockwise.
  487. * @param markerIds list of identifiers for each marker in corners
  488. * @param image input image necesary for corner refinement. Note that markers are not detected and
  489. * should be sent in corners and ids parameters.
  490. * @param board layout of ChArUco board.
  491. * @param charucoCorners interpolated chessboard corners
  492. * @param charucoIds interpolated chessboard corners identifiers
  493. * @param cameraMatrix optional 3x3 floating-point camera matrix
  494. * `$$\newcommand{\vecthreethree}[9]{ \begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \end{bmatrix} } A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}$$`
  495. * @param distCoeffs optional vector of distortion coefficients
  496. * `$$(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
  497. *
  498. * This function receives the detected markers and returns the 2D position of the chessboard corners
  499. * from a ChArUco board using the detected Aruco markers. If camera parameters are provided,
  500. * the process is based in an approximated pose estimation, else it is based on local homography.
  501. * Only visible corners are returned. For each corner, its corresponding identifier is
  502. * also returned in charucoIds.
  503. * The function returns the number of interpolated corners.
  504. *
  505. * @deprecated Use CharucoDetector::detectBoard
  506. */
  507. + (int)interpolateCornersCharuco:(NSArray<Mat*>*)markerCorners markerIds:(Mat*)markerIds image:(Mat*)image board:(CharucoBoard*)board charucoCorners:(Mat*)charucoCorners charucoIds:(Mat*)charucoIds cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs NS_SWIFT_NAME(interpolateCornersCharuco(markerCorners:markerIds:image:board:charucoCorners:charucoIds:cameraMatrix:distCoeffs:)) DEPRECATED_ATTRIBUTE;
  508. /**
  509. * Interpolate position of ChArUco board corners
  510. * @param markerCorners vector of already detected markers corners. For each marker, its four
  511. * corners are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the
  512. * dimensions of this array should be Nx4. The order of the corners should be clockwise.
  513. * @param markerIds list of identifiers for each marker in corners
  514. * @param image input image necesary for corner refinement. Note that markers are not detected and
  515. * should be sent in corners and ids parameters.
  516. * @param board layout of ChArUco board.
  517. * @param charucoCorners interpolated chessboard corners
  518. * @param charucoIds interpolated chessboard corners identifiers
  519. * @param cameraMatrix optional 3x3 floating-point camera matrix
  520. * `$$\newcommand{\vecthreethree}[9]{ \begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \end{bmatrix} } A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}$$`
  521. * `$$(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
  522. *
  523. * This function receives the detected markers and returns the 2D position of the chessboard corners
  524. * from a ChArUco board using the detected Aruco markers. If camera parameters are provided,
  525. * the process is based in an approximated pose estimation, else it is based on local homography.
  526. * Only visible corners are returned. For each corner, its corresponding identifier is
  527. * also returned in charucoIds.
  528. * The function returns the number of interpolated corners.
  529. *
  530. * @deprecated Use CharucoDetector::detectBoard
  531. */
  532. + (int)interpolateCornersCharuco:(NSArray<Mat*>*)markerCorners markerIds:(Mat*)markerIds image:(Mat*)image board:(CharucoBoard*)board charucoCorners:(Mat*)charucoCorners charucoIds:(Mat*)charucoIds cameraMatrix:(Mat*)cameraMatrix NS_SWIFT_NAME(interpolateCornersCharuco(markerCorners:markerIds:image:board:charucoCorners:charucoIds:cameraMatrix:)) DEPRECATED_ATTRIBUTE;
  533. /**
  534. * Interpolate position of ChArUco board corners
  535. * @param markerCorners vector of already detected markers corners. For each marker, its four
  536. * corners are provided, (e.g std::vector<std::vector<cv::Point2f> > ). For N detected markers, the
  537. * dimensions of this array should be Nx4. The order of the corners should be clockwise.
  538. * @param markerIds list of identifiers for each marker in corners
  539. * @param image input image necesary for corner refinement. Note that markers are not detected and
  540. * should be sent in corners and ids parameters.
  541. * @param board layout of ChArUco board.
  542. * @param charucoCorners interpolated chessboard corners
  543. * @param charucoIds interpolated chessboard corners identifiers
  544. * `$$\newcommand{\vecthreethree}[9]{ \begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \end{bmatrix} } A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}$$`
  545. * `$$(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
  546. *
  547. * This function receives the detected markers and returns the 2D position of the chessboard corners
  548. * from a ChArUco board using the detected Aruco markers. If camera parameters are provided,
  549. * the process is based in an approximated pose estimation, else it is based on local homography.
  550. * Only visible corners are returned. For each corner, its corresponding identifier is
  551. * also returned in charucoIds.
  552. * The function returns the number of interpolated corners.
  553. *
  554. * @deprecated Use CharucoDetector::detectBoard
  555. */
  556. + (int)interpolateCornersCharuco:(NSArray<Mat*>*)markerCorners markerIds:(Mat*)markerIds image:(Mat*)image board:(CharucoBoard*)board charucoCorners:(Mat*)charucoCorners charucoIds:(Mat*)charucoIds NS_SWIFT_NAME(interpolateCornersCharuco(markerCorners:markerIds:image:board:charucoCorners:charucoIds:)) DEPRECATED_ATTRIBUTE;
  557. //
  558. // void cv::aruco::detectCharucoDiamond(Mat image, vector_Mat markerCorners, Mat markerIds, float squareMarkerLengthRate, vector_Mat& diamondCorners, Mat& diamondIds, Mat cameraMatrix = Mat(), Mat distCoeffs = Mat(), Ptr_Dictionary dictionary = makePtr<Dictionary> (getPredefinedDictionary(PredefinedDictionaryType::DICT_4X4_50)))
  559. //
  560. /**
  561. * Detect ChArUco Diamond markers
  562. *
  563. * @param image input image necessary for corner subpixel.
  564. * @param markerCorners list of detected marker corners from detectMarkers function.
  565. * @param markerIds list of marker ids in markerCorners.
  566. * @param squareMarkerLengthRate rate between square and marker length:
  567. * squareMarkerLengthRate = squareLength/markerLength. The real units are not necessary.
  568. * @param diamondCorners output list of detected diamond corners (4 corners per diamond). The order
  569. * is the same than in marker corners: top left, top right, bottom right and bottom left. Similar
  570. * format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).
  571. * @param diamondIds ids of the diamonds in diamondCorners. The id of each diamond is in fact of
  572. * type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the
  573. * diamond.
  574. * @param cameraMatrix Optional camera calibration matrix.
  575. * @param distCoeffs Optional camera distortion coefficients.
  576. * @param dictionary dictionary of markers indicating the type of markers.
  577. *
  578. * This function detects Diamond markers from the previous detected ArUco markers. The diamonds
  579. * are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters
  580. * are provided, the diamond search is based on reprojection. If not, diamond search is based on
  581. * homography. Homography is faster than reprojection, but less accurate.
  582. *
  583. * @deprecated Use CharucoDetector::detectDiamonds
  584. */
  585. + (void)detectCharucoDiamond:(Mat*)image markerCorners:(NSArray<Mat*>*)markerCorners markerIds:(Mat*)markerIds squareMarkerLengthRate:(float)squareMarkerLengthRate diamondCorners:(NSMutableArray<Mat*>*)diamondCorners diamondIds:(Mat*)diamondIds cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs dictionary:(Dictionary*)dictionary NS_SWIFT_NAME(detectCharucoDiamond(image:markerCorners:markerIds:squareMarkerLengthRate:diamondCorners:diamondIds:cameraMatrix:distCoeffs:dictionary:)) DEPRECATED_ATTRIBUTE;
  586. /**
  587. * Detect ChArUco Diamond markers
  588. *
  589. * @param image input image necessary for corner subpixel.
  590. * @param markerCorners list of detected marker corners from detectMarkers function.
  591. * @param markerIds list of marker ids in markerCorners.
  592. * @param squareMarkerLengthRate rate between square and marker length:
  593. * squareMarkerLengthRate = squareLength/markerLength. The real units are not necessary.
  594. * @param diamondCorners output list of detected diamond corners (4 corners per diamond). The order
  595. * is the same than in marker corners: top left, top right, bottom right and bottom left. Similar
  596. * format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).
  597. * @param diamondIds ids of the diamonds in diamondCorners. The id of each diamond is in fact of
  598. * type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the
  599. * diamond.
  600. * @param cameraMatrix Optional camera calibration matrix.
  601. * @param distCoeffs Optional camera distortion coefficients.
  602. *
  603. * This function detects Diamond markers from the previous detected ArUco markers. The diamonds
  604. * are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters
  605. * are provided, the diamond search is based on reprojection. If not, diamond search is based on
  606. * homography. Homography is faster than reprojection, but less accurate.
  607. *
  608. * @deprecated Use CharucoDetector::detectDiamonds
  609. */
  610. + (void)detectCharucoDiamond:(Mat*)image markerCorners:(NSArray<Mat*>*)markerCorners markerIds:(Mat*)markerIds squareMarkerLengthRate:(float)squareMarkerLengthRate diamondCorners:(NSMutableArray<Mat*>*)diamondCorners diamondIds:(Mat*)diamondIds cameraMatrix:(Mat*)cameraMatrix distCoeffs:(Mat*)distCoeffs NS_SWIFT_NAME(detectCharucoDiamond(image:markerCorners:markerIds:squareMarkerLengthRate:diamondCorners:diamondIds:cameraMatrix:distCoeffs:)) DEPRECATED_ATTRIBUTE;
  611. /**
  612. * Detect ChArUco Diamond markers
  613. *
  614. * @param image input image necessary for corner subpixel.
  615. * @param markerCorners list of detected marker corners from detectMarkers function.
  616. * @param markerIds list of marker ids in markerCorners.
  617. * @param squareMarkerLengthRate rate between square and marker length:
  618. * squareMarkerLengthRate = squareLength/markerLength. The real units are not necessary.
  619. * @param diamondCorners output list of detected diamond corners (4 corners per diamond). The order
  620. * is the same than in marker corners: top left, top right, bottom right and bottom left. Similar
  621. * format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).
  622. * @param diamondIds ids of the diamonds in diamondCorners. The id of each diamond is in fact of
  623. * type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the
  624. * diamond.
  625. * @param cameraMatrix Optional camera calibration matrix.
  626. *
  627. * This function detects Diamond markers from the previous detected ArUco markers. The diamonds
  628. * are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters
  629. * are provided, the diamond search is based on reprojection. If not, diamond search is based on
  630. * homography. Homography is faster than reprojection, but less accurate.
  631. *
  632. * @deprecated Use CharucoDetector::detectDiamonds
  633. */
  634. + (void)detectCharucoDiamond:(Mat*)image markerCorners:(NSArray<Mat*>*)markerCorners markerIds:(Mat*)markerIds squareMarkerLengthRate:(float)squareMarkerLengthRate diamondCorners:(NSMutableArray<Mat*>*)diamondCorners diamondIds:(Mat*)diamondIds cameraMatrix:(Mat*)cameraMatrix NS_SWIFT_NAME(detectCharucoDiamond(image:markerCorners:markerIds:squareMarkerLengthRate:diamondCorners:diamondIds:cameraMatrix:)) DEPRECATED_ATTRIBUTE;
  635. /**
  636. * Detect ChArUco Diamond markers
  637. *
  638. * @param image input image necessary for corner subpixel.
  639. * @param markerCorners list of detected marker corners from detectMarkers function.
  640. * @param markerIds list of marker ids in markerCorners.
  641. * @param squareMarkerLengthRate rate between square and marker length:
  642. * squareMarkerLengthRate = squareLength/markerLength. The real units are not necessary.
  643. * @param diamondCorners output list of detected diamond corners (4 corners per diamond). The order
  644. * is the same than in marker corners: top left, top right, bottom right and bottom left. Similar
  645. * format than the corners returned by detectMarkers (e.g std::vector<std::vector<cv::Point2f> > ).
  646. * @param diamondIds ids of the diamonds in diamondCorners. The id of each diamond is in fact of
  647. * type Vec4i, so each diamond has 4 ids, which are the ids of the aruco markers composing the
  648. * diamond.
  649. *
  650. * This function detects Diamond markers from the previous detected ArUco markers. The diamonds
  651. * are returned in the diamondCorners and diamondIds parameters. If camera calibration parameters
  652. * are provided, the diamond search is based on reprojection. If not, diamond search is based on
  653. * homography. Homography is faster than reprojection, but less accurate.
  654. *
  655. * @deprecated Use CharucoDetector::detectDiamonds
  656. */
  657. + (void)detectCharucoDiamond:(Mat*)image markerCorners:(NSArray<Mat*>*)markerCorners markerIds:(Mat*)markerIds squareMarkerLengthRate:(float)squareMarkerLengthRate diamondCorners:(NSMutableArray<Mat*>*)diamondCorners diamondIds:(Mat*)diamondIds NS_SWIFT_NAME(detectCharucoDiamond(image:markerCorners:markerIds:squareMarkerLengthRate:diamondCorners:diamondIds:)) DEPRECATED_ATTRIBUTE;
  658. //
  659. // void cv::aruco::drawCharucoDiamond(Ptr_Dictionary dictionary, Vec4i ids, int squareLength, int markerLength, Mat& img, int marginSize = 0, int borderBits = 1)
  660. //
  661. /**
  662. * Draw a ChArUco Diamond marker
  663. *
  664. * @param dictionary dictionary of markers indicating the type of markers.
  665. * @param ids list of 4 ids for each ArUco marker in the ChArUco marker.
  666. * @param squareLength size of the chessboard squares in pixels.
  667. * @param markerLength size of the markers in pixels.
  668. * @param img output image with the marker. The size of this image will be
  669. * 3*squareLength + 2*marginSize,.
  670. * @param marginSize minimum margins (in pixels) of the marker in the output image
  671. * @param borderBits width of the marker borders.
  672. *
  673. * This function return the image of a ChArUco marker, ready to be printed.
  674. */
  675. + (void)drawCharucoDiamond:(Dictionary*)dictionary ids:(Int4*)ids squareLength:(int)squareLength markerLength:(int)markerLength img:(Mat*)img marginSize:(int)marginSize borderBits:(int)borderBits NS_SWIFT_NAME(drawCharucoDiamond(dictionary:ids:squareLength:markerLength:img:marginSize:borderBits:));
  676. /**
  677. * Draw a ChArUco Diamond marker
  678. *
  679. * @param dictionary dictionary of markers indicating the type of markers.
  680. * @param ids list of 4 ids for each ArUco marker in the ChArUco marker.
  681. * @param squareLength size of the chessboard squares in pixels.
  682. * @param markerLength size of the markers in pixels.
  683. * @param img output image with the marker. The size of this image will be
  684. * 3*squareLength + 2*marginSize,.
  685. * @param marginSize minimum margins (in pixels) of the marker in the output image
  686. *
  687. * This function return the image of a ChArUco marker, ready to be printed.
  688. */
  689. + (void)drawCharucoDiamond:(Dictionary*)dictionary ids:(Int4*)ids squareLength:(int)squareLength markerLength:(int)markerLength img:(Mat*)img marginSize:(int)marginSize NS_SWIFT_NAME(drawCharucoDiamond(dictionary:ids:squareLength:markerLength:img:marginSize:));
  690. /**
  691. * Draw a ChArUco Diamond marker
  692. *
  693. * @param dictionary dictionary of markers indicating the type of markers.
  694. * @param ids list of 4 ids for each ArUco marker in the ChArUco marker.
  695. * @param squareLength size of the chessboard squares in pixels.
  696. * @param markerLength size of the markers in pixels.
  697. * @param img output image with the marker. The size of this image will be
  698. * 3*squareLength + 2*marginSize,.
  699. *
  700. * This function return the image of a ChArUco marker, ready to be printed.
  701. */
  702. + (void)drawCharucoDiamond:(Dictionary*)dictionary ids:(Int4*)ids squareLength:(int)squareLength markerLength:(int)markerLength img:(Mat*)img NS_SWIFT_NAME(drawCharucoDiamond(dictionary:ids:squareLength:markerLength:img:));
  703. @end
  704. NS_ASSUME_NONNULL_END