@@ -230,21 +230,19 @@ struct CV_EXPORTS_W DetectorParameters {
230230 * @param parameters marker detection parameters
231231 * @param rejectedImgPoints contains the imgPoints of those squares whose inner code has not a
232232 * correct codification. Useful for debugging purposes.
233- * @param cameraMatrix optional input 3x3 floating-point camera matrix
234- * \f$A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\f$
235- * @param distCoeff optional vector of distortion coefficients
236- * \f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\f$ of 4, 5, 8 or 12 elements
237233 *
238234 * Performs marker detection in the input image. Only markers included in the specific dictionary
239235 * are searched. For each detected marker, it returns the 2D position of its corner in the image
240236 * and its corresponding identifier.
241237 * Note that this function does not perform pose estimation.
242- * @sa estimatePoseSingleMarkers, estimatePoseBoard
238+ * @note The function does not correct lens distortion or takes it into account. It's recommended to undistort
239+ * input image with corresponging camera model, if camera parameters are known
240+ * @sa undistort, estimatePoseSingleMarkers, estimatePoseBoard
243241 *
244242 */
245243CV_EXPORTS_W void detectMarkers (InputArray image, const Ptr<Dictionary> &dictionary, OutputArrayOfArrays corners,
246244 OutputArray ids, const Ptr<DetectorParameters> ¶meters = DetectorParameters::create(),
247- OutputArrayOfArrays rejectedImgPoints = noArray(), InputArray cameraMatrix= noArray(), InputArray distCoeff= noArray() );
245+ OutputArrayOfArrays rejectedImgPoints = noArray());
248246
249247
250248
@@ -274,8 +272,9 @@ CV_EXPORTS_W void detectMarkers(InputArray image, const Ptr<Dictionary> &diction
274272 * The marker corrdinate system is centered on the middle of the marker, with the Z axis
275273 * perpendicular to the marker plane.
276274 * The coordinates of the four corners of the marker in its own coordinate system are:
277- * (-markerLength/2, markerLength/2, 0), (markerLength/2, markerLength/2, 0),
278- * (markerLength/2, -markerLength/2, 0), (-markerLength/2, -markerLength/2, 0)
275+ * (0, 0, 0), (markerLength, 0, 0),
276+ * (markerLength, markerLength, 0), (0, markerLength, 0)
277+ * @sa use cv::drawFrameAxes to get world coordinate system axis for object points
279278 */
280279CV_EXPORTS_W void estimatePoseSingleMarkers (InputArrayOfArrays corners, float markerLength,
281280 InputArray cameraMatrix, InputArray distCoeffs,
@@ -318,7 +317,14 @@ class CV_EXPORTS_W Board {
318317 CV_WRAP void setIds (InputArray ids);
319318
320319 // / array of object points of all the marker corners in the board
321- // / each marker include its 4 corners in CCW order. For M markers, the size is Mx4.
320+ // / each marker include its 4 corners in this order:
321+ // /- objPoints[i][0] - left-top point of i-th marker
322+ // /- objPoints[i][1] - right-top point of i-th marker
323+ // /- objPoints[i][2] - right-bottom point of i-th marker
324+ // /- objPoints[i][3] - left-bottom point of i-th marker
325+ // /
326+ // / Markers are placed in a certain order - row by row, left to right in every row.
327+ // / For M markers, the size is Mx4.
322328 CV_PROP std::vector< std::vector< Point3f > > objPoints;
323329
324330 // / the dictionary of markers employed for this board
@@ -327,6 +333,9 @@ class CV_EXPORTS_W Board {
327333 // / vector of the identifiers of the markers in the board (same size than objPoints)
328334 // / The identifiers refers to the board dictionary
329335 CV_PROP_RW std::vector< int > ids;
336+
337+ // / coordinate of the bottom right corner of the board, is set when calling the function create()
338+ CV_PROP Point3f rightBottomBorder;
330339};
331340
332341
@@ -426,6 +435,7 @@ class CV_EXPORTS_W GridBoard : public Board {
426435 * Input markers that are not included in the board layout are ignored.
427436 * The function returns the number of markers from the input employed for the board pose estimation.
428437 * Note that returning a 0 means the pose has not been estimated.
438+ * @sa use cv::drawFrameAxes to get world coordinate system axis for object points
429439 */
430440CV_EXPORTS_W int estimatePoseBoard (InputArrayOfArrays corners, InputArray ids, const Ptr<Board> &board,
431441 InputArray cameraMatrix, InputArray distCoeffs, InputOutputArray rvec,
@@ -490,36 +500,14 @@ CV_EXPORTS_W void refineDetectedMarkers(
490500 * Given an array of detected marker corners and its corresponding ids, this functions draws
491501 * the markers in the image. The marker borders are painted and the markers identifiers if provided.
492502 * Useful for debugging purposes.
503+ *
493504 */
494505CV_EXPORTS_W void drawDetectedMarkers (InputOutputArray image, InputArrayOfArrays corners,
495506 InputArray ids = noArray(),
496507 Scalar borderColor = Scalar(0 , 255 , 0 ));
497508
498509
499510
500- /* *
501- * @brief Draw coordinate system axis from pose estimation
502- *
503- * @param image input/output image. It must have 1 or 3 channels. The number of channels is not
504- * altered.
505- * @param cameraMatrix input 3x3 floating-point camera matrix
506- * \f$A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\f$
507- * @param distCoeffs vector of distortion coefficients
508- * \f$(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6],[s_1, s_2, s_3, s_4]])\f$ of 4, 5, 8 or 12 elements
509- * @param rvec rotation vector of the coordinate system that will be drawn. (@sa Rodrigues).
510- * @param tvec translation vector of the coordinate system that will be drawn.
511- * @param length length of the painted axis in the same unit than tvec (usually in meters)
512- *
513- * Given the pose estimation of a marker or board, this function draws the axis of the world
514- * coordinate system, i.e. the system centered on the marker/board. Useful for debugging purposes.
515- *
516- * @deprecated use cv::drawFrameAxes
517- */
518- CV_EXPORTS_W void drawAxis (InputOutputArray image, InputArray cameraMatrix, InputArray distCoeffs,
519- InputArray rvec, InputArray tvec, float length);
520-
521-
522-
523511/* *
524512 * @brief Draw a canonical marker image
525513 *
0 commit comments