diff --git a/modules/ocl/src/match_template.cpp b/modules/ocl/src/match_template.cpp index ad31b00c6..4b50903b1 100644 --- a/modules/ocl/src/match_template.cpp +++ b/modules/ocl/src/match_template.cpp @@ -105,7 +105,7 @@ namespace cv { namespace ocl if (depth == CV_8U) return 300; break; case CV_TM_SQDIFF: - if (depth == CV_32F) return MAXSHORT; // do naive SQDIFF for CV_32F + if (depth == CV_32F) return 0x7fffffff; // do naive SQDIFF for CV_32F if (depth == CV_8U) return 300; break; }