Skip to content

Commit 0b8af13

Browse files
cottsayJoshua Whitley
authored andcommitted
Fix build with later versions of OpenCV 3
This first regressed in 2b17a38. Support for OpenCV 3.2 was re-added in 2e0c6d4. This fixes the build with OpenCV 3.3 and newer. Signed-off-by: Scott K Logan <[email protected]>
1 parent ad431c2 commit 0b8af13

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

image_proc/src/crop_decimate.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,9 @@ void debayer2x2toBGR(
4646
int R, int G1, int G2, int B)
4747
{
4848
typedef cv::Vec<T, 3> DstPixel; // 8- or 16-bit BGR
49-
#if CV_VERSION_MAJOR >= 4
49+
#if CV_VERSION_MAJOR >= 4 || (CV_MAJOR_VERSION == 3 && CV_MINOR_VERSION > 2)
5050
dst.create(src.rows / 2, src.cols / 2, cv::traits::Type<DstPixel>::value);
5151
#else
52-
// Assume OpenCV 3 API
5352
dst.create(src.rows / 2, src.cols / 2, cv::DataType<DstPixel>::type);
5453
#endif
5554

0 commit comments

Comments
 (0)