fix several important bugs in aruco module

pull/376/head
S. Garrido 9 years ago
parent 4f860dcffa
commit c5d618f7e1
  1. 2
      modules/aruco/include/opencv2/aruco.hpp
  2. 4
      modules/aruco/src/aruco.cpp
  3. 2
      modules/aruco/src/dictionary.cpp
  4. 2
      modules/aruco/tutorials/aruco_detection/aruco_detection.markdown

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

@ -71,7 +71,7 @@ DetectorParameters::DetectorParameters()
markerBorderBits(1), markerBorderBits(1),
perspectiveRemovePixelPerCell(4), perspectiveRemovePixelPerCell(4),
perspectiveRemoveIgnoredMarginPerCell(0.13), perspectiveRemoveIgnoredMarginPerCell(0.13),
maxErroneousBitsInBorderRate(0.5), maxErroneousBitsInBorderRate(0.35),
minOtsuStdDev(5.0), minOtsuStdDev(5.0),
errorCorrectionRate(0.6) {} errorCorrectionRate(0.6) {}
@ -123,7 +123,7 @@ static void _findMarkerContours(InputArray _in, vector< vector< Point2f > > &can
Mat contoursImg; Mat contoursImg;
_in.getMat().copyTo(contoursImg); _in.getMat().copyTo(contoursImg);
vector< vector< Point > > contours; vector< vector< Point > > contours;
findContours(contoursImg, contours, RETR_EXTERNAL, CHAIN_APPROX_NONE); findContours(contoursImg, contours, RETR_LIST, CHAIN_APPROX_NONE);
// now filter list of contours // now filter list of contours
for(unsigned int i = 0; i < contours.size(); i++) { for(unsigned int i = 0; i < contours.size(); i++) {
// check perimeter // check perimeter

@ -275,7 +275,7 @@ Mat Dictionary::getBitsFromByteList(const Mat &byteList, int markerSize) {
// DictionaryData constructors calls // DictionaryData constructors calls
const Dictionary DICT_ARUCO_DATA = Dictionary(&(DICT_ARUCO_BYTES[0][0][0]), 5, 1024, 1); const Dictionary DICT_ARUCO_DATA = Dictionary(&(DICT_ARUCO_BYTES[0][0][0]), 5, 1024, 0);
const Dictionary DICT_4X4_50_DATA = Dictionary(&(DICT_4X4_1000_BYTES[0][0][0]), 4, 50, 1); const Dictionary DICT_4X4_50_DATA = Dictionary(&(DICT_4X4_1000_BYTES[0][0][0]), 4, 50, 1);
const Dictionary DICT_4X4_100_DATA = Dictionary(&(DICT_4X4_1000_BYTES[0][0][0]), 4, 100, 1); const Dictionary DICT_4X4_100_DATA = Dictionary(&(DICT_4X4_1000_BYTES[0][0][0]), 4, 100, 1);

@ -665,7 +665,7 @@ The bits of the marker border should be black. This parameter specifies the allo
bits in the border, i.e. the maximum number of white bits in the border. It is represented bits in the border, i.e. the maximum number of white bits in the border. It is represented
relative to the total number of bits in the marker. relative to the total number of bits in the marker.
Default value: 0.5 Default value: 0.35
- ```double errorCorrectionRate``` - ```double errorCorrectionRate```

Loading…
Cancel
Save