diff --git a/ChangeLog.txt b/ChangeLog.txt index 2e0942627d..7c1dff1c6e 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -45,6 +45,7 @@ ViSP 3.5.1 (under development) . [#1080] Fails to configure with Xcode generator . [#1094] vpIoTools::makeTempDirectory() fails to create a temporary directory inside a parent directory on Unix + . [#1106] SIFT Illegal Instruction error on macOS Intel with OpenCV 4.6.0 installed with brew ---------------------------------------------- ViSP 3.5.0 (released February 15, 2022) - Contributors: diff --git a/modules/vision/test/keypoint-with-dataset/testKeyPoint-5.cpp b/modules/vision/test/keypoint-with-dataset/testKeyPoint-5.cpp index 5e96418fbf..cabd95c507 100644 --- a/modules/vision/test/keypoint-with-dataset/testKeyPoint-5.cpp +++ b/modules/vision/test/keypoint-with-dataset/testKeyPoint-5.cpp @@ -211,9 +211,12 @@ void run_test(const std::string &env_ipath, bool opt_click_allowed, bool opt_dis #if defined(VISP_HAVE_OPENCV_NONFREE) || defined(VISP_HAVE_OPENCV_XFEATURES2D) || \ (VISP_HAVE_OPENCV_VERSION >= 0x030411 && CV_MAJOR_VERSION < 4) || (VISP_HAVE_OPENCV_VERSION >= 0x040400) #if (VISP_HAVE_OPENCV_VERSION != 0x040504) && (VISP_HAVE_OPENCV_VERSION != 0x040505) && \ - (defined(__APPLE__) && defined(__MACH__)) + (VISP_HAVE_OPENCV_VERSION != 0x040600) && (defined(__APPLE__) && defined(__MACH__)) + // SIFT is known to be unstable with OpenCV 4.5.4 and 4.5.5 on macOS (see #1048) + // Same for OpenCV 4.6.0 (see #1106) where it produces an Illegal Instruction error when OpenCV 4.6.0 is + // installed with brew. It seems working when OpenCV is build from source detectorNames.push_back("PyramidSIFT"); - detectorNames.push_back("SIFT"); // SIFT is known unstable with OpenCV 4.5.4 and 4.5.5 on macOS (see #1048) + detectorNames.push_back("SIFT"); #endif #endif #if defined(VISP_HAVE_OPENCV_NONFREE) || defined(VISP_HAVE_OPENCV_XFEATURES2D) @@ -258,9 +261,13 @@ void run_test(const std::string &env_ipath, bool opt_click_allowed, bool opt_dis for (int i = 0; i < vpKeyPoint::DETECTOR_TYPE_SIZE; i++) { #if defined(VISP_HAVE_OPENCV_NONFREE) || defined(VISP_HAVE_OPENCV_XFEATURES2D) || \ (VISP_HAVE_OPENCV_VERSION >= 0x030411 && CV_MAJOR_VERSION < 4) || (VISP_HAVE_OPENCV_VERSION >= 0x040400) -#if (VISP_HAVE_OPENCV_VERSION == 0x040504 || VISP_HAVE_OPENCV_VERSION == 0x040505) && \ +#if ((VISP_HAVE_OPENCV_VERSION == 0x040504) || (VISP_HAVE_OPENCV_VERSION == 0x040505) || \ + (VISP_HAVE_OPENCV_VERSION == 0x040600)) && \ (defined(__APPLE__) && defined(__MACH__)) - if (i == vpKeyPoint::DETECTOR_SIFT) { // SIFT is known unstable with OpenCV 4.5.4 and 4.5.5 on macOS (see #1048) + // SIFT is known to be unstable with OpenCV 4.5.4 and 4.5.5 on macOS (see #1048) + // Same for OpenCV 4.6.0 (see #1106) where it produces an Illegal Instruction error when OpenCV 4.6.0 is + // installed with brew. It seems working when OpenCV is build from source + if (i == vpKeyPoint::DETECTOR_SIFT) { continue; } #endif diff --git a/modules/vision/test/keypoint-with-dataset/testKeyPoint-7.cpp b/modules/vision/test/keypoint-with-dataset/testKeyPoint-7.cpp index 3eb9f4a374..b04aa7fed7 100644 --- a/modules/vision/test/keypoint-with-dataset/testKeyPoint-7.cpp +++ b/modules/vision/test/keypoint-with-dataset/testKeyPoint-7.cpp @@ -447,9 +447,12 @@ template void run_test(const std::string &env_ipath, const std:: ((VISP_HAVE_OPENCV_VERSION >= 0x030000) && defined(VISP_HAVE_OPENCV_XFEATURES2D) || \ (VISP_HAVE_OPENCV_VERSION >= 0x030411 && CV_MAJOR_VERSION < 4) || (VISP_HAVE_OPENCV_VERSION >= 0x040400)) { -#if !((VISP_HAVE_OPENCV_VERSION == 0x040504 || VISP_HAVE_OPENCV_VERSION == 0x040505) && \ - (defined(__APPLE__) && defined(__MACH__))) // OpenCV != 4.5.4 and 4.5.5 on macOS - std::string keypointName = "SIFT"; // SIFT is known unstable with OpenCV 4.5.4 and 4.5.5 on macOS (see #1048) +#if (VISP_HAVE_OPENCV_VERSION != 0x040504) && (VISP_HAVE_OPENCV_VERSION != 0x040505) && \ + (VISP_HAVE_OPENCV_VERSION != 0x040600) && (defined(__APPLE__) && defined(__MACH__)) + // SIFT is known to be unstable with OpenCV 4.5.4 and 4.5.5 on macOS (see #1048) + // Same for OpenCV 4.6.0 (see #1106) where it produces an Illegal Instruction error when OpenCV 4.6.0 is + // installed with brew. It seems working when OpenCV is build from source + std::string keypointName = "SIFT"; keyPoints.setDetector(keypointName); keyPoints.setExtractor(keypointName);