summaryrefslogtreecommitdiffstats
path: root/libraries/frei0r/patches/01.b27f03c.patch
blob: 49b8e017b6a3329200c8121f3d99cca48fee3671 (plain)
From b27f03c8d51c34cd5f79e0399bb0024ca94ea813 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= <zmoelnig@iem.at>
Date: Tue, 10 Dec 2019 15:01:52 +0100
Subject: [PATCH] facedetect: include imgproc/imgproc_c.h when using OpenCV-4+

imgproc_c.h defines the constants CV_BGR2GRAY, CV_FILLED & CV_AA.

it also includes "core/core_c.h", which then provides
  `cvGetTickCount()` and `cvGetTickFrequency()`
---
 src/filter/facedetect/facedetect.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/filter/facedetect/facedetect.cpp b/src/filter/facedetect/facedetect.cpp
index 1906962..4e7d476 100644
--- a/src/filter/facedetect/facedetect.cpp
+++ b/src/filter/facedetect/facedetect.cpp
@@ -21,6 +21,9 @@
 #include <stdio.h>
 #include <string.h>
 #include <opencv2/opencv.hpp>
+#if CV_MAJOR_VERSION >= 4
+# include <opencv2/imgproc/imgproc_c.h>
+#endif
 #include "frei0r.hpp"
 #include "frei0r_math.h"