frei0r-plugins/b27f03c8d51c34cd5f79e0399bb0024ca94ea813.patch
2019-12-30 15:12:16 +01:00

28 lines
927 B
Diff

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"