From d536da2f00a8a94e4e43e27e3d2c2f5ff6d9a7ac Mon Sep 17 00:00:00 2001 From: Fabien Spindler Date: Wed, 14 Feb 2024 17:25:55 +0100 Subject: [PATCH 1/5] Disable warning due to basisu_miniz.h --- modules/core/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/CMakeLists.txt b/modules/core/CMakeLists.txt index a8dd665d4d..8175cbf5ca 100644 --- a/modules/core/CMakeLists.txt +++ b/modules/core/CMakeLists.txt @@ -326,7 +326,7 @@ vp_set_source_file_compile_flag(src/tools/histogram/vpHistogram.cpp -Wno-strict- vp_set_source_file_compile_flag(src/image/vpFont.cpp -Wno-float-equal -Wno-strict-overflow) # To avoid warnings with basisu_miniz.h such as: # basisu_miniz.h:1184:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] -vp_set_source_file_compile_flag(src/tools/vpIoTools.cpp -Wno-misleading-indentation) +vp_set_source_file_compile_flag(src/tools/file/vpIoTools.cpp -Wno-misleading-indentation -Wno-strict-aliasing -Wno-strict-overflow) vp_set_source_file_compile_flag(src/munkres/vpMunkres.cpp /wd26812 /wd4244) vp_set_source_file_compile_flag(test/image/testImageBinarise.cpp -Wno-strict-overflow) vp_set_source_file_compile_flag(test/image/testImageOwnership.cpp -Wno-pessimizing-move) From 55d8b26153353debb91cb71de119c037c9130275 Mon Sep 17 00:00:00 2001 From: Fabien Spindler Date: Wed, 14 Feb 2024 17:26:27 +0100 Subject: [PATCH 2/5] Fix warnings detected by Fedora25 ci --- modules/core/src/image/vpImageCircle.cpp | 4 ++-- modules/imgproc/src/vpCircleHoughTransform.cpp | 2 +- modules/imgproc/src/vpContours.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/core/src/image/vpImageCircle.cpp b/modules/core/src/image/vpImageCircle.cpp index 6d9ee96677..2bf69365e5 100644 --- a/modules/core/src/image/vpImageCircle.cpp +++ b/modules/core/src/image/vpImageCircle.cpp @@ -1111,7 +1111,7 @@ unsigned int vpImageCircle::computePixelsInMask(const vpImage &mask) const // dTheta <= 1/r sin(theta) && dTheta <= 1/r cos(theta) dthetaPos = std::min(dthetaCosPos, dthetaSinPos); } - else if (sin_theta == 0.f && cos_theta != 0.f) { + else if (vpMath::equal(sin_theta, 0.f) && (!vpMath::equal(cos_theta, 0.f))) { // dTheta = -1 / r cos(theta) || dTheta = 1 / r cos(theta) if (cos_theta > 0.f) { dthetaPos = dthetaCosNeg; @@ -1120,7 +1120,7 @@ unsigned int vpImageCircle::computePixelsInMask(const vpImage &mask) const dthetaPos = dthetaCosPos; } } - else if (sin_theta != 0.f && cos_theta == 0.f) { + else if ((!vpMath::equal(sin_theta, 0.f)) && vpMath::equal(cos_theta, 0.f)) { // dTheta = -1 / r sin(theta) || dTheta = 1 / r sin(theta) if (sin_theta > 0.f) { dthetaPos = dthetaSinNeg; diff --git a/modules/imgproc/src/vpCircleHoughTransform.cpp b/modules/imgproc/src/vpCircleHoughTransform.cpp index 19ae63040a..a30d1829f9 100644 --- a/modules/imgproc/src/vpCircleHoughTransform.cpp +++ b/modules/imgproc/src/vpCircleHoughTransform.cpp @@ -747,7 +747,7 @@ vpCircleHoughTransform::computeCenterCandidates() int left = -1; for (int x = 0; x < nbColsAccum; x++) { if ((centersAccum[y][x] >= m_algoParams.m_centerMinThresh) - && (centersAccum[y][x] == centerCandidatesMaxima[y][x]) + && (vpMath::equal(centersAccum[y][x], centerCandidatesMaxima[y][x])) && (centersAccum[y][x] > centersAccum[y][x + 1]) ) { if (left < 0) { diff --git a/modules/imgproc/src/vpContours.cpp b/modules/imgproc/src/vpContours.cpp index cefb7cdf92..1084cc45ff 100644 --- a/modules/imgproc/src/vpContours.cpp +++ b/modules/imgproc/src/vpContours.cpp @@ -227,7 +227,7 @@ bool isHoleBorderStart(const vpImage &I, unsigned int i, unsigned int j) void getContoursList(const vp::vpContour &root, int level, vp::vpContour &contour_list) { - if (level > 0) { + if (level > 0 && level < std::numeric_limits::max()) { vp::vpContour *contour_node = new vp::vpContour; contour_node->m_contourType = root.m_contourType; contour_node->m_points = root.m_points; From 26854a55bafdafd6f8caf1ead8983251f30fc68d Mon Sep 17 00:00:00 2001 From: Fabien Spindler Date: Wed, 14 Feb 2024 17:27:57 +0100 Subject: [PATCH 3/5] Fix testGenericTracker-edge-scanline test on Fedora25 when scanline and Coin3D is enabled --- .../mbt/test/generic-with-dataset/testGenericTracker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tracker/mbt/test/generic-with-dataset/testGenericTracker.cpp b/modules/tracker/mbt/test/generic-with-dataset/testGenericTracker.cpp index 0562bfde6d..0f549a9c85 100644 --- a/modules/tracker/mbt/test/generic-with-dataset/testGenericTracker.cpp +++ b/modules/tracker/mbt/test/generic-with-dataset/testGenericTracker.cpp @@ -364,7 +364,7 @@ bool run(const std::string &input_directory, bool opt_click_allowed, bool opt_di // Take the highest thresholds between all CI machines #ifdef VISP_HAVE_COIN3D map_thresh[vpMbGenericTracker::EDGE_TRACKER] = - useScanline ? std::pair(0.005, 3.9) : std::pair(0.007, 3.9); + useScanline ? std::pair(0.005, 5.) : std::pair(0.007, 3.9); #if defined(VISP_HAVE_MODULE_KLT) && defined(VISP_HAVE_OPENCV) && defined(HAVE_OPENCV_IMGPROC) && defined(HAVE_OPENCV_VIDEO) map_thresh[vpMbGenericTracker::KLT_TRACKER] = useScanline ? std::pair(0.007, 1.9) : std::pair(0.007, 1.8); From 72b4dd6a7357fd121b5b242c7ce14ff348af0f50 Mon Sep 17 00:00:00 2001 From: Fabien Spindler Date: Wed, 14 Feb 2024 17:32:38 +0100 Subject: [PATCH 4/5] Fix jenkins ros2 ci around unused vars --- modules/sensor/test/force-torque/testForceTorqueAti.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/sensor/test/force-torque/testForceTorqueAti.cpp b/modules/sensor/test/force-torque/testForceTorqueAti.cpp index 065bde7d09..f23050895d 100644 --- a/modules/sensor/test/force-torque/testForceTorqueAti.cpp +++ b/modules/sensor/test/force-torque/testForceTorqueAti.cpp @@ -79,6 +79,9 @@ void scopeFunction(std::mutex &mutex_data, std::mutex &mutex_state, t_shared_dat scope.setLegend(1, 0, "x"); scope.setLegend(1, 1, "y"); scope.setLegend(1, 2, "z"); +#else + (void)mutex_data; + (void)s_shared_data; #endif t_shared_data shared_data; From 94bb8d75d24f0aa7eaf3e1c1f9f9fb70fbe1f334 Mon Sep 17 00:00:00 2001 From: Fabien Spindler Date: Wed, 14 Feb 2024 18:06:25 +0100 Subject: [PATCH 5/5] Relax thresholds for testGenericTracker-edge-scanline to comply with ciosx ci --- .../mbt/test/generic-with-dataset/testGenericTracker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tracker/mbt/test/generic-with-dataset/testGenericTracker.cpp b/modules/tracker/mbt/test/generic-with-dataset/testGenericTracker.cpp index 0f549a9c85..bd1576e8f7 100644 --- a/modules/tracker/mbt/test/generic-with-dataset/testGenericTracker.cpp +++ b/modules/tracker/mbt/test/generic-with-dataset/testGenericTracker.cpp @@ -382,7 +382,7 @@ bool run(const std::string &input_directory, bool opt_click_allowed, bool opt_di #endif #else map_thresh[vpMbGenericTracker::EDGE_TRACKER] = - useScanline ? std::pair(0.008, 2.3) : std::pair(0.009, 4.0); + useScanline ? std::pair(0.01, 2.5) : std::pair(0.009, 4.0); #if defined(VISP_HAVE_MODULE_KLT) && defined(VISP_HAVE_OPENCV) && defined(HAVE_OPENCV_IMGPROC) && defined(HAVE_OPENCV_VIDEO) map_thresh[vpMbGenericTracker::KLT_TRACKER] = useScanline ? std::pair(0.006, 1.7) : std::pair(0.005, 1.4);