summaryrefslogtreecommitdiff
path: root/graphics/p5-Image-ObjectDetect/files/patch-lib_Image_ObjectDetect.xs
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/p5-Image-ObjectDetect/files/patch-lib_Image_ObjectDetect.xs')
-rw-r--r--graphics/p5-Image-ObjectDetect/files/patch-lib_Image_ObjectDetect.xs23
1 files changed, 23 insertions, 0 deletions
diff --git a/graphics/p5-Image-ObjectDetect/files/patch-lib_Image_ObjectDetect.xs b/graphics/p5-Image-ObjectDetect/files/patch-lib_Image_ObjectDetect.xs
new file mode 100644
index 000000000000..2a06c14c5158
--- /dev/null
+++ b/graphics/p5-Image-ObjectDetect/files/patch-lib_Image_ObjectDetect.xs
@@ -0,0 +1,23 @@
+--- lib/Image/ObjectDetect.xs.orig 2018-05-02 21:42:52.771732000 +0000
++++ lib/Image/ObjectDetect.xs 2018-05-02 21:43:03.658941000 +0000
+@@ -7,6 +7,8 @@
+ #include "cv.h"
+ #include "highgui.h"
+
++#include <opencv2/imgcodecs/imgcodecs_c.h>
++
+ MODULE = Image::ObjectDetect PACKAGE = Image::ObjectDetect
+
+ PROTOTYPES: ENABLE
+@@ -54,11 +56,7 @@
+ storage = cvCreateMemStorage(0);
+ cascade = INT2PTR(CvHaarClassifierCascade *, SvIV(SvRV(self)));
+ objects = cvHaarDetectObjects(gray, cascade, storage,
+-#if (CV_MAJOR_VERSION < 2 || (CV_MAJOR_VERSION == 2 && CV_MINOR_VERSION < 1))
+- 1.1, 2, CV_HAAR_DO_CANNY_PRUNING, cvSize(0, 0));
+-#else
+ 1.1, 2, CV_HAAR_DO_CANNY_PRUNING, cvSize(0, 0), cvSize(0, 0));
+-#endif
+
+ retval = newAV();
+ for (i = 0; i < (objects ? objects->total : 0); i++) {