@@ -76,7 +76,11 @@ namespace aruco {
76
76
// ! @addtogroup aruco
77
77
// ! @{
78
78
79
-
79
+ enum CornerRefineMethod{
80
+ CORNER_REFINE_NONE, // default corners
81
+ CORNER_REFINE_SUBPIX, // refine the corners using subpix
82
+ CORNER_REFINE_CONTOUR // refine the corners using the contour-points
83
+ };
80
84
81
85
/* *
82
86
* @brief Parameters for the detectMarker process:
@@ -100,7 +104,8 @@ namespace aruco {
100
104
* - minMarkerDistanceRate: minimum mean distance beetween two marker corners to be considered
101
105
* similar, so that the smaller one is removed. The rate is relative to the smaller perimeter
102
106
* of the two markers (default 0.05).
103
- * - doCornerRefinement: do subpixel refinement or not
107
+ * - cornerRefinementMethod: corner refinement method. (CORNER_REFINE_NONE, no refinement.
108
+ * CORNER_REFINE_SUBPIX, do subpixel refinement. CORNER_REFINE_CONTOUR use contour-Points)
104
109
* - cornerRefinementWinSize: window size for the corner refinement process (in pixels) (default 5).
105
110
* - cornerRefinementMaxIterations: maximum number of iterations for stop criteria of the corner
106
111
* refinement process (default 30).
@@ -137,7 +142,7 @@ struct CV_EXPORTS_W DetectorParameters {
137
142
CV_PROP_RW double minCornerDistanceRate;
138
143
CV_PROP_RW int minDistanceToBorder;
139
144
CV_PROP_RW double minMarkerDistanceRate;
140
- CV_PROP_RW bool doCornerRefinement ;
145
+ CV_PROP_RW int cornerRefinementMethod ;
141
146
CV_PROP_RW int cornerRefinementWinSize;
142
147
CV_PROP_RW int cornerRefinementMaxIterations;
143
148
CV_PROP_RW double cornerRefinementMinAccuracy;
@@ -165,6 +170,10 @@ struct CV_EXPORTS_W DetectorParameters {
165
170
* @param parameters marker detection parameters
166
171
* @param rejectedImgPoints contains the imgPoints of those squares whose inner code has not a
167
172
* correct codification. Useful for debugging purposes.
173
+ * @param cameraMatrix optional input 3x3 floating-point camera matrix
174
+ * \f$A = \vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\f$
175
+ * @param distCoeff optional vector of distortion coefficients
176
+ * \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
168
177
*
169
178
* Performs marker detection in the input image. Only markers included in the specific dictionary
170
179
* are searched. For each detected marker, it returns the 2D position of its corner in the image
@@ -175,7 +184,7 @@ struct CV_EXPORTS_W DetectorParameters {
175
184
*/
176
185
CV_EXPORTS_W void detectMarkers (InputArray image, const Ptr<Dictionary> &dictionary, OutputArrayOfArrays corners,
177
186
OutputArray ids, const Ptr<DetectorParameters> ¶meters = DetectorParameters::create(),
178
- OutputArrayOfArrays rejectedImgPoints = noArray());
187
+ OutputArrayOfArrays rejectedImgPoints = noArray(), InputArray cameraMatrix= noArray(), InputArray distCoeff= noArray() );
179
188
180
189
181
190
@@ -196,6 +205,7 @@ CV_EXPORTS_W void detectMarkers(InputArray image, const Ptr<Dictionary> &diction
196
205
* Each element in rvecs corresponds to the specific marker in imgPoints.
197
206
* @param tvecs array of output translation vectors (e.g. std::vector<cv::Vec3d>).
198
207
* Each element in tvecs corresponds to the specific marker in imgPoints.
208
+ * @param _objPoints array of object points of all the marker corners
199
209
*
200
210
* This function receives the detected markers and returns their pose estimation respect to
201
211
* the camera individually. So for each marker, one rotation and translation vector is returned.
@@ -209,7 +219,7 @@ CV_EXPORTS_W void detectMarkers(InputArray image, const Ptr<Dictionary> &diction
209
219
*/
210
220
CV_EXPORTS_W void estimatePoseSingleMarkers (InputArrayOfArrays corners, float markerLength,
211
221
InputArray cameraMatrix, InputArray distCoeffs,
212
- OutputArray rvecs, OutputArray tvecs);
222
+ OutputArray rvecs, OutputArray tvecs, OutputArray _objPoints = noArray() );
213
223
214
224
215
225
0 commit comments