Aruco detector giving false positive

For some reason Aruco detector is giving a false positive (id 37 in the picture). I can see that there’s some white spots in that black square so I am assuming it makes the cut to be counted as marker. Is there a way to make the aruco detector more pedantic for this case? seems like by default is a little relaxed.

snippet used (pretty much same as the OpenCV Aruco Tutorial)

cv::aruco::Dictionary dictionary = cv::aruco::getPredefinedDictionary(cv::aruco::DICT_5X5_1000);
cv::aruco::DetectorParameters params = cv::aruco::DetectorParameters();
cv::aruco::ArucoDetector detector(dictionary, params);
detector.detectMarkers(image, marker_corners, marker_ids, rejectedMarkers);

This code was used to generate the Charuco board. The Charuco paremeters 19x54, 0.05, 0.04, DICT_5X5_1000, legacy_charuco = true

cv::Ptr<cv::aruco::CharucoBoard> board = cv::makePtr<cv::aruco::CharucoBoard>(cv::Size(19, 34), 0.05f, 0.04f, dictionary);
board->setLegacyPattern(true);

that’s an implausible detection. no border, no white modules… potentially a bug.

you should present a MRE (input data…) if you want others to debug this.

if there is some measure of reproducibility to this, i.e. it’s not just one frame from your camera causing this detection, but it shows up in multiple frames, then this might be worth a bug report.