1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Aruco/Charuco test case fixes for floating point for loops

This commit is contained in:
Stefan Becker
2023-02-07 10:22:38 +01:00
parent 20dac7ea48
commit 39e2ebbde4
3 changed files with 30 additions and 8 deletions
@@ -51,7 +51,7 @@ void CV_ArucoBoardPose::run(int) {
aruco::DetectorParameters detectorParameters = detector.getDetectorParameters();
// for different perspectives
for(double distance = 0.2; distance <= 0.4; distance += 0.15) {
for(double distance : {0.2, 0.35}) {
for(int yaw = -55; yaw <= 50; yaw += 25) {
for(int pitch = -55; pitch <= 50; pitch += 25) {
vector<int> tmpIds;
@@ -162,7 +162,7 @@ void CV_ArucoRefine::run(int) {
aruco::DetectorParameters detectorParameters = detector.getDetectorParameters();
// for different perspectives
for(double distance = 0.2; distance <= 0.4; distance += 0.2) {
for(double distance : {0.2, 0.4}) {
for(int yaw = -60; yaw < 60; yaw += 30) {
for(int pitch = -60; pitch <= 60; pitch += 30) {
aruco::GridBoard gridboard(Size(3, 3), 0.02f, 0.005f, detector.getDictionary());