Skip to content

Commit 2de6ff5

Browse files
committed
Merge pull request #376 from sergarrido:aruco_bugs
2 parents d783cbe + c5d618f commit 2de6ff5

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

modules/aruco/include/opencv2/aruco.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ namespace aruco {
114114
* size of the cell, i.e. perpectiveRemovePixelPerCell (default 0.13)
115115
* - maxErroneousBitsInBorderRate: maximum number of accepted erroneous bits in the border (i.e.
116116
* number of allowed white bits in the border). Represented as a rate respect to the total
117-
* number of bits per marker (default 0.5).
117+
* number of bits per marker (default 0.35).
118118
* - minOtsuStdDev: minimun standard deviation in pixels values during the decodification step to
119119
* apply Otsu thresholding (otherwise, all the bits are set to 0 or 1 depending on mean higher
120120
* than 128 or not) (default 5.0)

modules/aruco/src/aruco.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ DetectorParameters::DetectorParameters()
7171
markerBorderBits(1),
7272
perspectiveRemovePixelPerCell(4),
7373
perspectiveRemoveIgnoredMarginPerCell(0.13),
74-
maxErroneousBitsInBorderRate(0.5),
74+
maxErroneousBitsInBorderRate(0.35),
7575
minOtsuStdDev(5.0),
7676
errorCorrectionRate(0.6) {}
7777

@@ -123,7 +123,7 @@ static void _findMarkerContours(InputArray _in, vector< vector< Point2f > > &can
123123
Mat contoursImg;
124124
_in.getMat().copyTo(contoursImg);
125125
vector< vector< Point > > contours;
126-
findContours(contoursImg, contours, RETR_EXTERNAL, CHAIN_APPROX_NONE);
126+
findContours(contoursImg, contours, RETR_LIST, CHAIN_APPROX_NONE);
127127
// now filter list of contours
128128
for(unsigned int i = 0; i < contours.size(); i++) {
129129
// check perimeter

modules/aruco/src/dictionary.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ Mat Dictionary::getBitsFromByteList(const Mat &byteList, int markerSize) {
246246

247247

248248
// DictionaryData constructors calls
249-
const Dictionary DICT_ARUCO_DATA = Dictionary(&(DICT_ARUCO_BYTES[0][0][0]), 5, 1024, 1);
249+
const Dictionary DICT_ARUCO_DATA = Dictionary(&(DICT_ARUCO_BYTES[0][0][0]), 5, 1024, 0);
250250

251251
const Dictionary DICT_4X4_50_DATA = Dictionary(&(DICT_4X4_1000_BYTES[0][0][0]), 4, 50, 1);
252252
const Dictionary DICT_4X4_100_DATA = Dictionary(&(DICT_4X4_1000_BYTES[0][0][0]), 4, 100, 1);

modules/aruco/tutorials/aruco_detection/aruco_detection.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ The bits of the marker border should be black. This parameter specifies the allo
665665
bits in the border, i.e. the maximum number of white bits in the border. It is represented
666666
relative to the total number of bits in the marker.
667667

668-
Default value: 0.5
668+
Default value: 0.35
669669

670670

671671
- ```double errorCorrectionRate```

0 commit comments

Comments
 (0)