Skip to content

Instantly share code, notes, and snippets.

@theonewolf
Created September 4, 2012 04:18
Show Gist options
  • Select an option

  • Save theonewolf/3616519 to your computer and use it in GitHub Desktop.

Select an option

Save theonewolf/3616519 to your computer and use it in GitHub Desktop.
OpenCV Diff
diff --git a/filters/ocv_face/fil_ocv.c b/filters/ocv_face/fil_ocv.c
index ac31903..1662986 100644
--- a/filters/ocv_face/fil_ocv.c
+++ b/filters/ocv_face/fil_ocv.c
@@ -25,7 +25,9 @@
#include <unistd.h>
#include "lib_ocvimage.h"
-#include <opencv/cvaux.h>
+#include <opencv/cv.h>
+#include <opencv/highgui.h>
+//#include <opencv/cvaux.h>
#include "lib_filter.h"
#include "rgb.h"
diff --git a/filters/ocv_face/opencv_face.h b/filters/ocv_face/opencv_face.h
index 0ca0bb1..b29ed19 100644
--- a/filters/ocv_face/opencv_face.h
+++ b/filters/ocv_face/opencv_face.h
@@ -15,7 +15,9 @@
#include <sys/types.h>
#include "lib_ocvimage.h"
-#include <opencv/cvaux.h>
+#include <opencv/cv.h>
+#include <opencv/highgui.h>
+//#include <opencv/cvaux.h>
#include "lib_results.h"
#include <sys/queue.h>
diff --git a/filters/ocv_face/opencv_face_tools.c b/filters/ocv_face/opencv_face_tools.c
index b9f987d..dfa05af 100644
--- a/filters/ocv_face/opencv_face_tools.c
+++ b/filters/ocv_face/opencv_face_tools.c
@@ -21,7 +21,9 @@
#include <stdint.h>
#include "lib_ocvimage.h"
-#include <opencv/cvaux.h>
+#include <opencv/cv.h>
+#include <opencv/highgui.h>
+//#include <opencv/cvaux.h>
#include <sys/queue.h>
@@ -64,8 +66,9 @@ opencv_face_scan(RGBImage *rgb, bbox_list_t *blist, opencv_fdetect_t *fconfig)
/* XXX fix args */
CvSize minSize = { 20, 20 };
+ CvSize maxSize = { 0, 0 };
faces = cvHaarDetectObjects(gray, fconfig->haar_cascade, storage,
- fconfig->scale_mult, fconfig->support, CV_HAAR_DO_CANNY_PRUNING, minSize);
+ fconfig->scale_mult, fconfig->support, CV_HAAR_DO_CANNY_PRUNING, minSize, maxSize);
/* XXX who cleans up the faces */
diff --git a/include/lib_results.h b/include/lib_results.h
index fb3f103..a7891c8 100644
--- a/include/lib_results.h
+++ b/include/lib_results.h
@@ -42,8 +42,7 @@ typedef struct bbox {
typedef TAILQ_HEAD(bbox_list_t, bbox) bbox_list_t;
-
-typedef struct img_patches {
+typedef struct __attribute__((packed)) img_patches {
dim_t num_patches;
double distance;
patch_t patches[0];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment