Skip to content

Commit 280af82

Browse files
committed
Merge pull request #555 from SSteve:master
2 parents 7b2c6f8 + b6573a7 commit 280af82

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

modules/aruco/include/opencv2/aruco.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,16 +268,16 @@ class CV_EXPORTS_W GridBoard : public Board {
268268
* @param markersX number of markers in X direction
269269
* @param markersY number of markers in Y direction
270270
* @param markerLength marker side length (normally in meters)
271-
* @param markerSeparation separation between two markers (same unit than markerLenght)
272-
* @param dictionary dictionary of markers indicating the type of markers.
273-
* The first markersX*markersY markers in the dictionary are used.
271+
* @param markerSeparation separation between two markers (same unit as markerLength)
272+
* @param dictionary dictionary of markers indicating the type of markers
273+
* @param firstMarker id of first marker in dictionary to use on board.
274274
* @return the output GridBoard object
275275
*
276276
* This functions creates a GridBoard object given the number of markers in each direction and
277277
* the marker size and marker separation.
278278
*/
279279
CV_WRAP static Ptr<GridBoard> create(int markersX, int markersY, float markerLength,
280-
float markerSeparation, Ptr<Dictionary> &dictionary);
280+
float markerSeparation, Ptr<Dictionary> &dictionary, int firstMarker = 0);
281281

282282
/**
283283
*

modules/aruco/src/aruco.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,11 +1329,10 @@ void GridBoard::draw(Size outSize, OutputArray _img, int marginSize, int borderB
13291329
}
13301330

13311331

1332-
13331332
/**
13341333
*/
13351334
Ptr<GridBoard> GridBoard::create(int markersX, int markersY, float markerLength, float markerSeparation,
1336-
Ptr<Dictionary> &dictionary) {
1335+
Ptr<Dictionary> &dictionary, int firstMarker) {
13371336

13381337
CV_Assert(markersX > 0 && markersY > 0 && markerLength > 0 && markerSeparation > 0);
13391338

@@ -1351,7 +1350,7 @@ Ptr<GridBoard> GridBoard::create(int markersX, int markersY, float markerLength,
13511350

13521351
// fill ids with first identifiers
13531352
for(unsigned int i = 0; i < totalMarkers; i++) {
1354-
res->ids[i] = i;
1353+
res->ids[i] = i + firstMarker;
13551354
}
13561355

13571356
// calculate Board objPoints

0 commit comments

Comments
 (0)