From 7075c595ae13c331deb97d2e0dfa8b2fe20ed28d Mon Sep 17 00:00:00 2001 From: Andrei Fedorov Date: Tue, 11 Aug 2026 18:51:01 +0200 Subject: [PATCH] Update matchtemplate_ipp.cpp --- hal/ipp/src/matchtemplate_ipp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hal/ipp/src/matchtemplate_ipp.cpp b/hal/ipp/src/matchtemplate_ipp.cpp index 7ff0807aa6b6..a3f2963d8467 100644 --- a/hal/ipp/src/matchtemplate_ipp.cpp +++ b/hal/ipp/src/matchtemplate_ipp.cpp @@ -114,10 +114,12 @@ int ipp_hal_matchTemplate(const uchar* src_data, size_t src_step, int src_width, if(templ.size().area()*4 > img.size().area()) return CV_HAL_ERROR_NOT_IMPLEMENTED; +#if IPP_VERSION_X100 < 202610 // CV_8U SQDIFF/SQDIFF_NORMED suffer from float32 catastrophic cancellation - // in IPP's internal accumulators; fall through to the double-precision path instead. + // in IPP's internal accumulators (older versions); fall through to the double-precision path instead. if(depth == CV_8U && (method == cv::TM_SQDIFF || method == cv::TM_SQDIFF_NORMED)) return CV_HAL_ERROR_NOT_IMPLEMENTED; +#endif if(method == cv::TM_SQDIFF) {