Interpretation of ArUco maxMarkerPerimeterRate

The documentation states, that the maxMarkerPerimeterRate in the ArUco DetectorParameters is defined as a rate respect to the maximum dimension of the input image (default 4.0). My interpretation of this sentence would be, that the the largest marker detected is allowed to be 4 times larger than the image by default. That doesn’t make much sense. So what does rate respect to the maximum dimension of the image mean?

there is a whole lot that doesn’t make much sense in that module. don’t expect it to make sense.

the only way you’ll get your answers is to read the source. the docs didn’t clarify, so that’s the only way out.

Ok, the perimeter pixels are the pixels of the contour, so for a square marker that fills a square image, it would be 4 * the side length of the square. Odd parameter but at least I get what they mean now.

unsigned int maxPerimeterPixels = (unsigned int)(maxPerimeterRate * max(in.cols, in.rows));

if( […] contours[i].size() > maxPerimeterPixels) continue;

1 Like