From f1a2507dfb3a64eb6675f3ab2cbc7a7c2831472c Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Thu, 25 Mar 2021 13:12:33 -0700 Subject: [PATCH] Fix build with later versions of OpenCV 3 This first regressed in 2b17a38a5e3d4aef9c6a51c2de10d7396c521648. Support for OpenCV 3.2 was re-added in 2e0c6d42cb650534e4aeea586482030e5c0d46c8. This fixes the build with OpenCV 3.3 and newer. Signed-off-by: Scott K Logan --- image_proc/src/crop_decimate.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/image_proc/src/crop_decimate.cpp b/image_proc/src/crop_decimate.cpp index d33326e67..726caf296 100644 --- a/image_proc/src/crop_decimate.cpp +++ b/image_proc/src/crop_decimate.cpp @@ -46,10 +46,9 @@ void debayer2x2toBGR( int R, int G1, int G2, int B) { typedef cv::Vec DstPixel; // 8- or 16-bit BGR -#if CV_VERSION_MAJOR >= 4 +#if CV_VERSION_MAJOR >= 4 || (CV_MAJOR_VERSION == 3 && CV_MINOR_VERSION > 2) dst.create(src.rows / 2, src.cols / 2, cv::traits::Type::value); #else - // Assume OpenCV 3 API dst.create(src.rows / 2, src.cols / 2, cv::DataType::type); #endif