@@ -230,21 +230,19 @@ struct CV_EXPORTS_W DetectorParameters {
230
230
* @param parameters marker detection parameters
231
231
* @param rejectedImgPoints contains the imgPoints of those squares whose inner code has not a
232
232
* 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
237
233
*
238
234
* Performs marker detection in the input image. Only markers included in the specific dictionary
239
235
* are searched. For each detected marker, it returns the 2D position of its corner in the image
240
236
* and its corresponding identifier.
241
237
* 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
243
241
*
244
242
*/
245
243
CV_EXPORTS_W void detectMarkers (InputArray image, const Ptr<Dictionary> &dictionary, OutputArrayOfArrays corners,
246
244
OutputArray ids, const Ptr<DetectorParameters> ¶meters = DetectorParameters::create(),
247
- OutputArrayOfArrays rejectedImgPoints = noArray(), InputArray cameraMatrix= noArray(), InputArray distCoeff= noArray() );
245
+ OutputArrayOfArrays rejectedImgPoints = noArray());
248
246
249
247
250
248
@@ -274,8 +272,9 @@ CV_EXPORTS_W void detectMarkers(InputArray image, const Ptr<Dictionary> &diction
274
272
* The marker corrdinate system is centered on the middle of the marker, with the Z axis
275
273
* perpendicular to the marker plane.
276
274
* 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
279
278
*/
280
279
CV_EXPORTS_W void estimatePoseSingleMarkers (InputArrayOfArrays corners, float markerLength,
281
280
InputArray cameraMatrix, InputArray distCoeffs,
@@ -318,7 +317,14 @@ class CV_EXPORTS_W Board {
318
317
CV_WRAP void setIds (InputArray ids);
319
318
320
319
// / 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.
322
328
CV_PROP std::vector< std::vector< Point3f > > objPoints;
323
329
324
330
// / the dictionary of markers employed for this board
@@ -327,6 +333,9 @@ class CV_EXPORTS_W Board {
327
333
// / vector of the identifiers of the markers in the board (same size than objPoints)
328
334
// / The identifiers refers to the board dictionary
329
335
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;
330
339
};
331
340
332
341
@@ -426,6 +435,7 @@ class CV_EXPORTS_W GridBoard : public Board {
426
435
* Input markers that are not included in the board layout are ignored.
427
436
* The function returns the number of markers from the input employed for the board pose estimation.
428
437
* 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
429
439
*/
430
440
CV_EXPORTS_W int estimatePoseBoard (InputArrayOfArrays corners, InputArray ids, const Ptr<Board> &board,
431
441
InputArray cameraMatrix, InputArray distCoeffs, InputOutputArray rvec,
@@ -490,36 +500,14 @@ CV_EXPORTS_W void refineDetectedMarkers(
490
500
* Given an array of detected marker corners and its corresponding ids, this functions draws
491
501
* the markers in the image. The marker borders are painted and the markers identifiers if provided.
492
502
* Useful for debugging purposes.
503
+ *
493
504
*/
494
505
CV_EXPORTS_W void drawDetectedMarkers (InputOutputArray image, InputArrayOfArrays corners,
495
506
InputArray ids = noArray(),
496
507
Scalar borderColor = Scalar(0 , 255 , 0 ));
497
508
498
509
499
510
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
-
523
511
/* *
524
512
* @brief Draw a canonical marker image
525
513
*
0 commit comments