opencv: clean includes
authorLuis de Bethencourt <luisbg@osg.samsung.com>
Sat, 12 Dec 2015 20:07:32 +0000 (20:07 +0000)
committerLuis de Bethencourt <luisbg@osg.samsung.com>
Sat, 12 Dec 2015 20:09:15 +0000 (20:09 +0000)
The opencv element includes were full of duplicates and uneeded headers.
For example a few elements that stopped using gstcvopencvutils still
included that header file.

36 files changed:
ext/opencv/gstcvdilate.cpp
ext/opencv/gstcvdilateerode.cpp
ext/opencv/gstcvdilateerode.h
ext/opencv/gstcvequalizehist.cpp
ext/opencv/gstcvequalizehist.h
ext/opencv/gstcverode.cpp
ext/opencv/gstcvlaplace.cpp
ext/opencv/gstcvlaplace.h
ext/opencv/gstcvsmooth.cpp
ext/opencv/gstcvsmooth.h
ext/opencv/gstcvsobel.cpp
ext/opencv/gstcvsobel.h
ext/opencv/gstdisparity.cpp
ext/opencv/gstdisparity.h
ext/opencv/gstedgedetect.cpp
ext/opencv/gstedgedetect.h
ext/opencv/gstfaceblur.cpp
ext/opencv/gstfaceblur.h
ext/opencv/gstfacedetect.cpp
ext/opencv/gstgrabcut.cpp
ext/opencv/gsthanddetect.cpp
ext/opencv/gsthanddetect.h
ext/opencv/gstmotioncells.cpp
ext/opencv/gstmotioncells.h
ext/opencv/gstopencvvideofilter.cpp
ext/opencv/gstpyramidsegment.cpp
ext/opencv/gstpyramidsegment.h
ext/opencv/gstretinex.cpp
ext/opencv/gstretinex.h
ext/opencv/gstsegmentation.cpp
ext/opencv/gstskindetect.cpp
ext/opencv/gstskindetect.h
ext/opencv/gsttemplatematch.cpp
ext/opencv/gsttemplatematch.h
ext/opencv/gsttextoverlay.cpp
ext/opencv/gsttextoverlay.h

index 64cecc1..9c1479d 100644 (file)
@@ -45,8 +45,6 @@
 #  include <config.h>
 #endif
 
-#include <gst/gst.h>
-
 #include "gstcvdilate.h"
 #include <opencv2/imgproc/imgproc_c.h>
 
index 763761b..69a4169 100644 (file)
@@ -50,8 +50,6 @@
 #  include <config.h>
 #endif
 
-#include <gst/gst.h>
-
 #include "gstopencvutils.h"
 #include "gstcvdilateerode.h"
 
index 94425f5..bd2aa7c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * GStreamer
  * Copyright (C) 2010 Thiago Santos <thiago.sousa.santos@collabora.co.uk>
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
@@ -44,8 +44,6 @@
 #ifndef __GST_CV_DILATE_ERODE_H__
 #define __GST_CV_DILATE_ERODE_H__
 
-#include <gst/gst.h>
-
 #include <gstopencvvideofilter.h>
 
 G_BEGIN_DECLS
@@ -72,7 +70,7 @@ struct _GstCvDilateErode
   gint iterations;
 };
 
-struct _GstCvDilateErodeClass 
+struct _GstCvDilateErodeClass
 {
   GstOpencvVideoFilterClass parent_class;
 };
index 0ea723f..c92497f 100644 (file)
@@ -45,9 +45,6 @@
 #  include <config.h>
 #endif
 
-#include <gst/gst.h>
-
-#include "gstopencvutils.h"
 #include "gstcvequalizehist.h"
 #include <opencv2/imgproc/imgproc_c.h>
 
index d1d600d..c185994 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * GStreamer
  * Copyright (C) 2010 Thiago Santos <thiago.sousa.santos@collabora.co.uk>
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
@@ -44,8 +44,6 @@
 #ifndef __GST_CV_EQUALIZE_HIST_H__
 #define __GST_CV_EQUALIZE_HIST_H__
 
-#include <gst/gst.h>
-
 #include <gstopencvvideofilter.h>
 
 G_BEGIN_DECLS
@@ -70,7 +68,7 @@ struct _GstCvEqualizeHist
   GstOpencvVideoFilter element;
 };
 
-struct _GstCvEqualizeHistClass 
+struct _GstCvEqualizeHistClass
 {
   GstOpencvVideoFilterClass parent_class;
 };
index 91f460a..75e2a1b 100644 (file)
@@ -45,8 +45,6 @@
 #  include <config.h>
 #endif
 
-#include <gst/gst.h>
-
 #include "gstcverode.h"
 #include <opencv2/imgproc/imgproc_c.h>
 
index b20b0bc..56b74b2 100644 (file)
@@ -45,9 +45,6 @@
 #  include <config.h>
 #endif
 
-#include <gst/gst.h>
-
-#include "gstopencvutils.h"
 #include "gstcvlaplace.h"
 #include <opencv2/imgproc/imgproc_c.h>
 
index 92bf7bb..7ac9172 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * GStreamer
  * Copyright (C) 2010 Thiago Santos <thiago.sousa.santos@collabora.co.uk>
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
@@ -44,8 +44,6 @@
 #ifndef __GST_CV_LAPLACE_H__
 #define __GST_CV_LAPLACE_H__
 
-#include <gst/gst.h>
-
 #include <gstopencvvideofilter.h>
 
 G_BEGIN_DECLS
@@ -76,7 +74,7 @@ struct _GstCvLaplace
   IplImage *intermediary_img;
 };
 
-struct _GstCvLaplaceClass 
+struct _GstCvLaplaceClass
 {
   GstOpencvVideoFilterClass parent_class;
 };
index 707f953..1bf3b60 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * GStreamer
  * Copyright (C) 2010 Thiago Santos <thiago.sousa.santos@collabora.co.uk>
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
@@ -45,8 +45,6 @@
 #  include <config.h>
 #endif
 
-#include <gst/gst.h>
-
 #include "gstopencvutils.h"
 #include "gstcvsmooth.h"
 #include <opencv2/imgproc/imgproc_c.h>
index c3e5164..7c74fbd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * GStreamer
  * Copyright (C) 2010 Thiago Santos <thiago.sousa.santos@collabora.co.uk>
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
@@ -44,8 +44,6 @@
 #ifndef __GST_CV_SMOOTH_H__
 #define __GST_CV_SMOOTH_H__
 
-#include <gst/gst.h>
-
 #include <gstopencvvideofilter.h>
 
 G_BEGIN_DECLS
@@ -77,7 +75,7 @@ struct _GstCvSmooth
   gdouble spatialsigma;
 };
 
-struct _GstCvSmoothClass 
+struct _GstCvSmoothClass
 {
   GstOpencvVideoFilterClass parent_class;
 };
index e1edc0f..2623cdc 100644 (file)
@@ -45,9 +45,6 @@
 #  include <config.h>
 #endif
 
-#include <gst/gst.h>
-
-#include "gstopencvutils.h"
 #include "gstcvsobel.h"
 #include <opencv2/imgproc/imgproc_c.h>
 
index c6719a0..a7f306a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * GStreamer
  * Copyright (C) 2010 Thiago Santos <thiago.sousa.santos@collabora.co.uk>
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
@@ -44,8 +44,6 @@
 #ifndef __GST_CV_SOBEL_H__
 #define __GST_CV_SOBEL_H__
 
-#include <gst/gst.h>
-
 #include <gstopencvvideofilter.h>
 
 G_BEGIN_DECLS
@@ -74,7 +72,7 @@ struct _GstCvSobel
   gint aperture_size;
 };
 
-struct _GstCvSobelClass 
+struct _GstCvSobelClass
 {
   GstOpencvVideoFilterClass parent_class;
 };
index f3f9d64..28f06a7 100644 (file)
  * run prefiltering stages to normalize brightness between the inputs, and to maximize texture.
  *
  * Note that in general is hard to find correspondences between soft textures, for instance a
- * block of gloss blue colour. The output is a gray image with values close to white meaning 
+ * block of gloss blue colour. The output is a gray image with values close to white meaning
  * closer to the cameras and darker far away. Black means that the pixels were not matched
  * correctly (not found). The resulting depth map can be transformed into real world coordinates
  * by means of OpenCV function (reprojectImageTo3D) but for this the camera matrixes need to
  * be fully known.
  *
  * Algorithm 1 is the OpenCV Stereo Block Matching, similar to the one developed by Kurt Konolige
- * [A] and that works by using small Sum-of-absolute-differenc (SAD) windows to find matching 
+ * [A] and that works by using small Sum-of-absolute-differenc (SAD) windows to find matching
  * points between the left and right rectified images. This algorithm finds only strongly matching
  * points between both images, this means normally strong textures. In soft textures, such as a
  * single coloured wall (as opposed to, f.i. a hairy rug), not all pixels might have correspondence.
  *
  * Algorithm 2 is the Semi Global Matching (SGM) algorithm [B] which models the scene structure
- * with a point-wise matching cost and an associated smoothness term. The energy minimization 
- * is then computed in a multitude of 1D lines. For each point, the disparity corresponding to 
- * the minimum aggregated cost is selected. In [B] the author proposes to use 8 or 16 different 
- * independent paths. The SGM approach works well near depth discontinuities, but produces less 
- * accurate results. Despite its relatively large memory footprint, this method is very fast and 
+ * with a point-wise matching cost and an associated smoothness term. The energy minimization
+ * is then computed in a multitude of 1D lines. For each point, the disparity corresponding to
+ * the minimum aggregated cost is selected. In [B] the author proposes to use 8 or 16 different
+ * independent paths. The SGM approach works well near depth discontinuities, but produces less
+ * accurate results. Despite its relatively large memory footprint, this method is very fast and
  * potentially robust to complicated textured regions.
  *
- * Algorithm 3 is the OpenCV implementation of a modification of the variational stereo 
+ * Algorithm 3 is the OpenCV implementation of a modification of the variational stereo
  * correspondence algorithm, described in [C].
  *
- * Algorithm 4 is the Graph Cut stereo vision algorithm (GC) introduced in [D]; it is a global 
+ * Algorithm 4 is the Graph Cut stereo vision algorithm (GC) introduced in [D]; it is a global
  * stereo vision method. It calculates depth discontinuities by minimizing an energy function
- * combingin a point-wise matching cost and a smoothness term. The energy function is passed 
+ * combingin a point-wise matching cost and a smoothness term. The energy function is passed
  * to graph and Graph Cut is used to find a lowest-energy cut. GC is computationally intensive due
  * to its global nature and uses loads of memory, but it can deal with textureless regions and
  * reflections better than other methods.
  *
  * Some test images can be found here: http://vision.stanford.edu/~birch/p2p/
  *
- * [A] K. Konolige. Small vision system. hardware and implementation. In Proc. International 
+ * [A] K. Konolige. Small vision system. hardware and implementation. In Proc. International
  * Symposium on Robotics Research, pages 111--116, Hayama, Japan, 1997.
- * [B] H. Hirschmüller, “Accurate and efficient stereo processing by semi-global matching and 
- * mutual information,” in Proceedings of the IEEE Conference on Computer Vision and Pattern 
+ * [B] H. Hirschmüller, “Accurate and efficient stereo processing by semi-global matching and
+ * mutual information,” in Proceedings of the IEEE Conference on Computer Vision and Pattern
  * Recognition, 2005, pp. 807–814.
  * [C] S. Kosov, T. Thormaehlen, H.-P. Seidel "Accurate Real-Time Disparity Estimation with
- * Variational Methods" Proceedings of the 5th International Symposium on Visual Computing, 
+ * Variational Methods" Proceedings of the 5th International Symposium on Visual Computing,
  * Vegas, USA
- * [D] Scharstein, D. & Szeliski, R. (2001). A taxonomy and evaluation of dense two-frame stereo 
+ * [D] Scharstein, D. & Szeliski, R. (2001). A taxonomy and evaluation of dense two-frame stereo
  * correspondence algorithms, International Journal of Computer Vision 47: 7–42.
  *
  * <refsect2>
  * gst-launch-1.0       videotestsrc ! video/x-raw,width=320,height=240 ! disp0.sink_right      videotestsrc ! video/x-raw,width=320,height=240 ! disp0.sink_left      disparity name=disp0 ! videoconvert ! ximagesink
  * ]|
  * Another example, with two png files representing a classical stereo matching,
- * downloadable from http://vision.middlebury.edu/stereo/submit/tsukuba/im4.png and 
+ * downloadable from http://vision.middlebury.edu/stereo/submit/tsukuba/im4.png and
  * im3.png. Note here they are downloaded in ~ (home).
  * |[
 gst-launch-1.0    multifilesrc  location=~/im3.png ! pngdec ! videoconvert  ! disp0.sink_right     multifilesrc  location=~/im4.png ! pngdec ! videoconvert ! disp0.sink_left disparity   name=disp0 method=sbm     disp0.src ! videoconvert ! ximagesink
@@ -119,8 +119,6 @@ gst-launch-1.0    multifilesrc  location=~/im3.png ! pngdec ! videoconvert  ! di
 #include <config.h>
 #endif
 
-#include <gst/gst.h>
-#include <gst/video/video.h>
 #include <opencv2/contrib/contrib.hpp>
 #include "gstdisparity.h"
 
@@ -548,19 +546,19 @@ gst_disparity_chain_right (GstPad * pad, GstObject * parent, GstBuffer * buffer)
       fs->width, fs->height, fs->actualChannels);
 
   /* Stereo corresponding using semi-global block matching. According to OpenCV:
-     "" The class implements modified H. Hirschmuller algorithm HH08 . The main 
+     "" The class implements modified H. Hirschmuller algorithm HH08 . The main
      differences between the implemented algorithm and the original one are:
 
-     - by default the algorithm is single-pass, i.e. instead of 8 directions we 
+     - by default the algorithm is single-pass, i.e. instead of 8 directions we
      only consider 5. Set fullDP=true to run the full variant of the algorithm
      (which could consume a lot of memory)
      - the algorithm matches blocks, not individual pixels (though, by setting
      SADWindowSize=1 the blocks are reduced to single pixels)
      - mutual information cost function is not implemented. Instead, we use a
-     simpler Birchfield-Tomasi sub-pixel metric from BT96 , though the color 
+     simpler Birchfield-Tomasi sub-pixel metric from BT96 , though the color
      images are supported as well.
-     - we include some pre- and post- processing steps from K. Konolige 
-     algorithm FindStereoCorrespondenceBM , such as pre-filtering 
+     - we include some pre- and post- processing steps from K. Konolige
+     algorithm FindStereoCorrespondenceBM , such as pre-filtering
      ( CV_STEREO_BM_XSOBEL type) and post-filtering (uniqueness check, quadratic
      interpolation and speckle filtering) ""
    */
@@ -572,7 +570,7 @@ gst_disparity_chain_right (GstPad * pad, GstObject * parent, GstBuffer * buffer)
         CV_MINMAX, NULL);
     cvCvtColor (fs->cvGray_depth_map2, fs->cvRGB_right, CV_GRAY2RGB);
   }
-  /* Algorithm 1 is the OpenCV Stereo Block Matching, similar to the one 
+  /* Algorithm 1 is the OpenCV Stereo Block Matching, similar to the one
      developed by Kurt Konolige [A] and that works by using small Sum-of-absolute-
      differences (SAD) window. See the comments on top of the file.
    */
@@ -593,9 +591,9 @@ gst_disparity_chain_right (GstPad * pad, GstObject * parent, GstBuffer * buffer)
     run_svar_iteration (fs);
     cvCvtColor (fs->cvGray_depth_map2, fs->cvRGB_right, CV_GRAY2RGB);
   }
-  /* The Graph Cut stereo vision algorithm (GC) introduced in [D] is a global 
-     stereo vision method. It calculates depth discontinuities by minimizing an 
-     energy function combingin a point-wise matching cost and a smoothness term. 
+  /* The Graph Cut stereo vision algorithm (GC) introduced in [D] is a global
+     stereo vision method. It calculates depth discontinuities by minimizing an
+     energy function combingin a point-wise matching cost and a smoothness term.
      See the comments on top of the file.
    */
   else if (METHOD_GC == fs->method) {
index adbb9ae..07e2417 100644 (file)
@@ -45,6 +45,7 @@
 #define __GST_DISPARITY_H__
 
 #include <gst/gst.h>
+#include <gst/video/video.h>
 
 #include <opencv2/legacy/legacy.hpp>
 
index c27e4e9..1c0777b 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright (C) 2005 Thomas Vander Stichele <thomas@apestaart.org>
  * Copyright (C) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
  * Copyright (C) 2008 Michael Sheldon <mike@mikeasoft.com>
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
@@ -60,9 +60,6 @@
 #  include <config.h>
 #endif
 
-#include <gst/gst.h>
-
-#include "gstopencvutils.h"
 #include "gstedgedetect.h"
 #include <opencv2/imgproc/imgproc_c.h>
 
index 23c95e6..fe070c2 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright (C) 2005 Thomas Vander Stichele <thomas@apestaart.org>
  * Copyright (C) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
  * Copyright (C) 2008 Michael Sheldon <mike@mikeasoft.com>
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
@@ -47,6 +47,7 @@
 #define __GST_EDGE_DETECT_H__
 
 #include <gst/gst.h>
+#include <gst/video/video.h>
 #include <opencv2/core/core_c.h>
 
 G_BEGIN_DECLS
index 40ff4f8..2bc88d1 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright (C) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
  * Copyright (C) 2008 Michael Sheldon <mike@mikeasoft.com>
  * Copyright (C) 2011 Robert Jobbagy <jobbagy.robert@gmail.com>
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
 #  include <config.h>
 #endif
 
-#include <gst/gst.h>
 #include <vector>
 
-#include "gstopencvutils.h"
 #include "gstfaceblur.h"
 #include <opencv2/imgproc/imgproc_c.h>
 #include <opencv2/imgproc/imgproc.hpp>
index 890c0c9..9c86e1b 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright (C) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
  * Copyright (C) 2008 Michael Sheldon <mike@mikeasoft.com>
  * Copyright (C) 2011 Robert Jobbagy <jobbagy.robert@gmail.com>
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
index 7ec6e39..aff9979 100644 (file)
 #  include <config.h>
 #endif
 
-#include <gst/gst.h>
-#include <gst/video/gstvideometa.h>
 #include <vector>
 
-#include "gstopencvutils.h"
 #include "gstfacedetect.h"
 #include <opencv2/imgproc/imgproc_c.h>
 
@@ -573,7 +570,7 @@ gst_face_detect_run_detector (GstFaceDetect * filter,
   }
 }
 
-/* 
+/*
  * Performs the face detection
  */
 static GstFlowReturn
index c9ff4f9..eaf727b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * GStreamer
  * Copyright (C) 2013 Miguel Casas-Sanchez <miguelecasassanchez@gmail.com>
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
  * This element is a wrapper around OpenCV grabcut implementation. GrabCut is an
  * image segmentation method based on graph cuts technique. It can be seen as a
  * way of fine-grain segmenting the image from some FG and BG "seed" areas. The
- * OpenCV implementation follows the article [1]. 
+ * OpenCV implementation follows the article [1].
  * The "seed" areas are taken in this element from either an input bounding box
  * coming from a face detection, or from alpha channel values. The input box is
- * taken from a "face" event such as the one generated from the 'facedetect' 
- * element. The Alpha channel values should be one of the following (cv.hpp): 
- * enum{  
+ * taken from a "face" event such as the one generated from the 'facedetect'
+ * element. The Alpha channel values should be one of the following (cv.hpp):
+ * enum{
  *  GC_BGD    = 0,  //!< background
  *  GC_FGD    = 1,  //!< foreground
  *  GC_PR_BGD = 2,  //!< most probably background
  *  GC_PR_FGD = 3   //!< most probably foreground
  * };
  * with values over GC_PR_FGD interpreted as GC_PR_FGD. IN CASE OF no alpha mask
- * input (all 0's or all 1's), the 'GstOpenCvFaceDetect-face' downstream event 
+ * input (all 0's or all 1's), the 'GstOpenCvFaceDetect-face' downstream event
  * is used to create a bbox of PR_FG elements. If both foreground alpha
  * is not specified and there is no face detection, nothing is done.
  *
- * [1] C. Rother, V. Kolmogorov, and A. Blake, "GrabCut: Interactive foreground 
+ * [1] C. Rother, V. Kolmogorov, and A. Blake, "GrabCut: Interactive foreground
  * extraction using iterated graph cuts, ACM Trans. Graph., vol. 23, pp. 309–314,
  * 2004.
  *
 #include <config.h>
 #endif
 
-#include <gst/gst.h>
 #include "gstgrabcut.h"
 extern "C"
 {
-#include <gst/video/gstvideometa.h>
 #include <opencv2/imgproc/imgproc_c.h>
 }
 #include <opencv2/imgproc/imgproc.hpp>
@@ -326,8 +324,8 @@ gst_grabcut_transform_ip (GstVideoFilter * btrans, GstVideoFrame * frame)
   cvCvtColor (gc->cvRGBAin, gc->cvRGBin, CV_BGRA2BGR);
   compose_matrix_from_image (gc->grabcut_mask, gc->cvD);
 
-  /*  Pass cvD to grabcut_mask for the graphcut stuff but that only if 
-     really there is something in the mask! otherwise -->input bbox is 
+  /*  Pass cvD to grabcut_mask for the graphcut stuff but that only if
+     really there is something in the mask! otherwise -->input bbox is
      what we use */
   alphapixels = cvCountNonZero (gc->cvD);
   if ((0 < alphapixels) && (alphapixels < (gc->width * gc->height))) {
index c8ced3c..e36b80e 100644 (file)
@@ -62,7 +62,6 @@
 
 /* element header */
 #include "gsthanddetect.h"
-#include "gstopencvutils.h"
 #include <opencv2/imgproc/imgproc_c.h>
 
 GST_DEBUG_CATEGORY_STATIC (gst_handdetect_debug);
index 80d2a69..39308c8 100644 (file)
 #ifndef __GST_HANDDETECT_H__
 #define __GST_HANDDETECT_H__
 
-#include <gst/gst.h>
-#include <gst/video/video.h>
-#include <gst/video/navigation.h>
-
 #include <cv.h>
 
 #include "gstopencvvideofilter.h"
index 77a806c..841b55a 100644 (file)
 #  include <config.h>
 #endif
 
-#include <stdio.h>
-#include <string.h>
-#include <sys/time.h>
-#include <time.h>
-#include <limits.h>
-
-#include <glib.h>
 #include "gstmotioncells.h"
-#include <gst/video/video.h>
 
 GST_DEBUG_CATEGORY_STATIC (gst_motion_cells_debug);
 #define GST_CAT_DEFAULT gst_motion_cells_debug
index 1d5505c..3179cae 100644 (file)
@@ -2,7 +2,7 @@
  * GStreamer
  * Copyright (C) 2011 Robert Jobbagy <jobbagy.robert@gmail.com>
  * Copyright (C) 2011 Nicola Murino <nicola.murino@gmail.com>
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
@@ -46,6 +46,7 @@
 #define __GST_MOTIONCELLS_H__
 
 #include <gst/gst.h>
+#include <gst/video/video.h>
 #include <opencv2/core/core_c.h>
 #include "motioncells_wrapper.h"
 
index 5197b49..4b8e536 100644 (file)
@@ -47,8 +47,6 @@
 #  include <config.h>
 #endif
 
-#include <gst/gst.h>
-
 #include "gstopencvvideofilter.h"
 #include "gstopencvutils.h"
 
index a8760ca..4dbf8c3 100644 (file)
@@ -60,9 +60,6 @@
 #  include <config.h>
 #endif
 
-#include <gst/gst.h>
-
-#include "gstopencvutils.h"
 #include "gstpyramidsegment.h"
 
 #define BLOCK_SIZE 1000
index 586ef2c..bc012ac 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright (C) 2005 Thomas Vander Stichele <thomas@apestaart.org>
  * Copyright (C) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
  * Copyright (C) 2008 Michael Sheldon <mike@mikeasoft.com>
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
@@ -47,6 +47,7 @@
 #define __GST_PYRAMID_SEGMENT_H__
 
 #include <gst/gst.h>
+#include <gst/video/video.h>
 #include <opencv2/core/version.hpp>
 
 #if CV_MAJOR_VERSION * 100 + CV_MINOR_VERSION >= 204
index 4a1ea4d..75842f8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * GStreamer
  * Copyright (C) 2013 Miguel Casas-Sanchez <miguelecasassanchez@gmail.com>
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
@@ -46,8 +46,8 @@
  *
  * Basic and multiscale retinex for colour image enhancement, see article:
  *
- * Rahman, Zia-ur, Daniel J. Jobson, and Glenn A. Woodell. "Multi-scale retinex for 
- * color image enhancement." Image Processing, 1996. Proceedings., International 
+ * Rahman, Zia-ur, Daniel J. Jobson, and Glenn A. Woodell. "Multi-scale retinex for
+ * color image enhancement." Image Processing, 1996. Proceedings., International
  * Conference on. Vol. 3. IEEE, 1996.
  *
  * <refsect2>
@@ -62,7 +62,6 @@
 #include <config.h>
 #endif
 
-#include <gst/gst.h>
 #include "gstretinex.h"
 #include <opencv2/imgproc/imgproc_c.h>
 #include <opencv2/imgproc/imgproc.hpp>
@@ -304,7 +303,7 @@ gst_retinex_transform_ip (GstBaseTransform * btrans, GstBuffer * buf)
 
   /* Basic retinex restoration.  The image and a filtered image are converted
      to the log domain and subtracted.
-     O = Log(I) - Log(H(I))   
+     O = Log(I) - Log(H(I))
      where O is the output, H is a gaussian 2d filter and I is the input image. */
   if (METHOD_BASIC == retinex->method) {
     /*  Compute log image */
index 8cebde9..d090a5b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * GStreamer
  * Copyright (C) 2013 Miguel Casas-Sanchez <miguelecasassanchez@gmail.com>
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
@@ -44,9 +44,6 @@
 #ifndef __GST_RETINEX_H__
 #define __GST_RETINEX_H__
 
-#include <gst/gst.h>
-#include <gst/video/video.h>
-#include <gst/video/gstvideofilter.h>
 #include <opencv2/core/core_c.h>
 
 #include <gstopencvvideofilter.h>
index 79cbb49..e0aa821 100644 (file)
@@ -1,15 +1,15 @@
 /*
  * GStreamer
  * Copyright (C) 2013 Miguel Casas-Sanchez <miguelecasassanchez@gmail.com>
- * Except: Parts of code inside the preprocessor define CODE_FROM_OREILLY_BOOK, 
- *  which are downloaded from O'Reilly website 
+ * Except: Parts of code inside the preprocessor define CODE_FROM_OREILLY_BOOK,
+ *  which are downloaded from O'Reilly website
  *  [http://examples.oreilly.com/9780596516130/]
  *  and adapted. Its license reads:
  *  "Oct. 3, 2008
- *   Right to use this code in any way you want without warrenty, support or 
+ *   Right to use this code in any way you want without warrenty, support or
  *   any guarentee of it working. "
  *
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
  *
  * This element creates and updates a fg/bg model using one of several approaches.
  * The one called "codebook" refers to the codebook approach following the opencv
- * O'Reilly book [1] implementation of the algorithm described in K. Kim, 
- * T. H. Chalidabhongse, D. Harwood and L. Davis [2]. BackgroundSubtractorMOG [3], 
- * or MOG for shorts, refers to a Gaussian Mixture-based Background/Foreground 
+ * O'Reilly book [1] implementation of the algorithm described in K. Kim,
+ * T. H. Chalidabhongse, D. Harwood and L. Davis [2]. BackgroundSubtractorMOG [3],
+ * or MOG for shorts, refers to a Gaussian Mixture-based Background/Foreground
  * Segmentation Algorithm. OpenCV MOG implements the algorithm described in [4].
- * BackgroundSubtractorMOG2 [5], refers to another Gaussian Mixture-based 
- * Background/Foreground segmentation algorithm. OpenCV MOG2 implements the 
+ * BackgroundSubtractorMOG2 [5], refers to another Gaussian Mixture-based
+ * Background/Foreground segmentation algorithm. OpenCV MOG2 implements the
  * algorithm described in [6] and [7].
  *
- * [1] Learning OpenCV: Computer Vision with the OpenCV Library by Gary Bradski 
+ * [1] Learning OpenCV: Computer Vision with the OpenCV Library by Gary Bradski
  * and Adrian Kaehler, Published by O'Reilly Media, October 3, 2008
- * [2] "Real-time Foreground-Background Segmentation using Codebook Model", 
+ * [2] "Real-time Foreground-Background Segmentation using Codebook Model",
  * Real-time Imaging, Volume 11, Issue 3, Pages 167-256, June 2005.
  * [3] http://opencv.itseez.com/modules/video/doc/motion_analysis_and_object_tracking.html#backgroundsubtractormog
- * [4] P. KadewTraKuPong and R. Bowden, "An improved adaptive background 
- * mixture model for real-time tracking with shadow detection", Proc. 2nd 
+ * [4] P. KadewTraKuPong and R. Bowden, "An improved adaptive background
+ * mixture model for real-time tracking with shadow detection", Proc. 2nd
  * European Workshop on Advanced Video-Based Surveillance Systems, 2001
  * [5] http://opencv.itseez.com/modules/video/doc/motion_analysis_and_object_tracking.html#backgroundsubtractormog2
- * [6] Z.Zivkovic, "Improved adaptive Gausian mixture model for background 
+ * [6] Z.Zivkovic, "Improved adaptive Gausian mixture model for background
  * subtraction", International Conference Pattern Recognition, UK, August, 2004.
- * [7] Z.Zivkovic, F. van der Heijden, "Efficient Adaptive Density Estimation 
- * per Image Pixel for the Task of Background Subtraction", Pattern Recognition 
+ * [7] Z.Zivkovic, F. van der Heijden, "Efficient Adaptive Density Estimation
+ * per Image Pixel for the Task of Background Subtraction", Pattern Recognition
  * Letters, vol. 27, no. 7, pages 773-780, 2006.
  *
  * <refsect2>
@@ -90,8 +90,6 @@
 #include <config.h>
 #endif
 
-#include <gst/gst.h>
-
 #include "gstsegmentation.h"
 #include <opencv2/video/background_segm.hpp>
 #include <opencv2/imgproc/imgproc_c.h>
@@ -382,12 +380,12 @@ gst_segmentation_transform_ip (GstVideoFilter * btrans, GstVideoFrame * frame)
   cvCvtColor (filter->cvRGBA, filter->cvRGB, CV_RGBA2RGB);
   cvCvtColor (filter->cvRGB, filter->cvYUV, CV_RGB2YCrCb);
 
-  /* Create and update a fg/bg model using a codebook approach following the 
+  /* Create and update a fg/bg model using a codebook approach following the
    * opencv O'Reilly book [1] implementation of the algo described in [2].
    *
-   * [1] Learning OpenCV: Computer Vision with the OpenCV Library by Gary 
+   * [1] Learning OpenCV: Computer Vision with the OpenCV Library by Gary
    * Bradski and Adrian Kaehler, Published by O'Reilly Media, October 3, 2008
-   * [2] "Real-time Foreground-Background Segmentation using Codebook Model", 
+   * [2] "Real-time Foreground-Background Segmentation using Codebook Model",
    * Real-time Imaging, Volume 11, Issue 3, Pages 167-256, June 2005. */
   if (METHOD_BOOK == filter->method) {
     unsigned cbBounds[3] = { 10, 5, 5 };
@@ -429,27 +427,27 @@ gst_segmentation_transform_ip (GstVideoFilter * btrans, GstVideoFrame * frame)
         filter->mem_storage, filter->contours);
 
   }
-  /* Create the foreground and background masks using BackgroundSubtractorMOG [1], 
-   *  Gaussian Mixture-based Background/Foreground segmentation algorithm. OpenCV 
+  /* Create the foreground and background masks using BackgroundSubtractorMOG [1],
+   *  Gaussian Mixture-based Background/Foreground segmentation algorithm. OpenCV
    * MOG implements the algorithm described in [2].
-   * 
+   *
    * [1] http://opencv.itseez.com/modules/video/doc/motion_analysis_and_object_tracking.html#backgroundsubtractormog
-   * [2] P. KadewTraKuPong and R. Bowden, "An improved adaptive background 
-   * mixture model for real-time tracking with shadow detection", Proc. 2nd 
+   * [2] P. KadewTraKuPong and R. Bowden, "An improved adaptive background
+   * mixture model for real-time tracking with shadow detection", Proc. 2nd
    * European Workshop on Advanced Video-Based Surveillance Systems, 2001
    */
   else if (METHOD_MOG == filter->method) {
     run_mog_iteration (filter);
   }
   /* Create the foreground and background masks using BackgroundSubtractorMOG2
-   * [1], Gaussian Mixture-based Background/Foreground segmentation algorithm. 
+   * [1], Gaussian Mixture-based Background/Foreground segmentation algorithm.
    * OpenCV MOG2 implements the algorithm described in [2] and [3].
-   * 
+   *
    * [1] http://opencv.itseez.com/modules/video/doc/motion_analysis_and_object_tracking.html#backgroundsubtractormog2
-   * [2] Z.Zivkovic, "Improved adaptive Gausian mixture model for background 
+   * [2] Z.Zivkovic, "Improved adaptive Gausian mixture model for background
    * subtraction", International Conference Pattern Recognition, UK, Aug 2004.
-   * [3] Z.Zivkovic, F. van der Heijden, "Efficient Adaptive Density Estimation 
-   * per Image Pixel for the Task of Background Subtraction", Pattern 
+   * [3] Z.Zivkovic, F. van der Heijden, "Efficient Adaptive Density Estimation
+   * per Image Pixel for the Task of Background Subtraction", Pattern
    * Recognition Letters, vol. 27, no. 7, pages 773-780, 2006.   */
   else if (METHOD_MOG2 == filter->method) {
     run_mog2_iteration (filter);
@@ -487,20 +485,20 @@ gst_segmentation_plugin_init (GstPlugin * plugin)
 
 
 #ifdef CODE_FROM_OREILLY_BOOK   /* See license at the beginning of the page */
-/* 
-  int update_codebook(uchar *p, codeBook &c, unsigned cbBounds) 
-  Updates the codebook entry with a new data point 
-  
-  p Pointer to a YUV or HSI pixel 
-  c Codebook for this pixel 
-  cbBounds Learning bounds for codebook (Rule of thumb: 10) 
-  numChannels Number of color channels we¡¯re learning 
-  
-  NOTES: 
-  cvBounds must be of length equal to numChannels 
-  
-  RETURN 
-  codebook index 
+/*
+  int update_codebook(uchar *p, codeBook &c, unsigned cbBounds)
+  Updates the codebook entry with a new data point
+
+  p Pointer to a YUV or HSI pixel
+  c Codebook for this pixel
+  cbBounds Learning bounds for codebook (Rule of thumb: 10)
+  numChannels Number of color channels we¡¯re learning
+
+  NOTES:
+  cvBounds must be of length equal to numChannels
+
+  RETURN
+  codebook index
 */
 int
 update_codebook (unsigned char *p, codeBook * c, unsigned *cbBounds,
@@ -589,14 +587,14 @@ update_codebook (unsigned char *p, codeBook * c, unsigned *cbBounds,
 
 
 /*
- int clear_stale_entries(codeBook &c) 
-  During learning, after you've learned for some period of time, 
-  periodically call this to clear out stale codebook entries 
-  
-  c Codebook to clean up 
-  
-  Return 
-  number of entries cleared 
+ int clear_stale_entries(codeBook &c)
+  During learning, after you've learned for some period of time,
+  periodically call this to clear out stale codebook entries
+
+  c Codebook to clean up
+
+  Return
+  number of entries cleared
 */
 int
 clear_stale_entries (codeBook * c)
@@ -640,27 +638,27 @@ clear_stale_entries (codeBook * c)
 
 
 /*
-  uchar background_diff( uchar *p, codeBook &c, 
-  int minMod, int maxMod) 
-  Given a pixel and a codebook, determine if the pixel is 
-  covered by the codebook 
-  
-  p Pixel pointer (YUV interleaved) 
-  c Codebook reference 
-  numChannels Number of channels we are testing 
-  maxMod Add this (possibly negative) number onto 
-
-  max level when determining if new pixel is foreground 
-  minMod Subract this (possibly negative) number from 
-  min level when determining if new pixel is foreground 
-  
-  NOTES: 
-  minMod and maxMod must have length numChannels, 
-  e.g. 3 channels => minMod[3], maxMod[3]. There is one min and 
-  one max threshold per channel. 
-  
-  Return 
-  0 => background, 255 => foreground 
+  uchar background_diff( uchar *p, codeBook &c,
+  int minMod, int maxMod)
+  Given a pixel and a codebook, determine if the pixel is
+  covered by the codebook
+
+  p Pixel pointer (YUV interleaved)
+  c Codebook reference
+  numChannels Number of channels we are testing
+  maxMod Add this (possibly negative) number onto
+
+  max level when determining if new pixel is foreground
+  minMod Subract this (possibly negative) number from
+  min level when determining if new pixel is foreground
+
+  NOTES:
+  minMod and maxMod must have length numChannels,
+  e.g. 3 channels => minMod[3], maxMod[3]. There is one min and
+  one max threshold per channel.
+
+  Return
+  0 => background, 255 => foreground
 */
 unsigned char
 background_diff (unsigned char *p, codeBook * c, int numChannels,
@@ -799,12 +797,12 @@ run_mog_iteration (GstSegmentation * filter)
       (uchar *) filter->cvFG->imageData;
 
   /*
-     BackgroundSubtractorMOG [1], Gaussian Mixture-based Background/Foreground 
+     BackgroundSubtractorMOG [1], Gaussian Mixture-based Background/Foreground
      Segmentation Algorithm. OpenCV MOG implements the algorithm described in [2].
 
      [1] http://opencv.itseez.com/modules/video/doc/motion_analysis_and_object_tracking.html#backgroundsubtractormog
-     [2] P. KadewTraKuPong and R. Bowden, "An improved adaptive background 
-     mixture model for real-time tracking with shadow detection", Proc. 2nd 
+     [2] P. KadewTraKuPong and R. Bowden, "An improved adaptive background
+     mixture model for real-time tracking with shadow detection", Proc. 2nd
      European Workshop on Advanced Video-Based Surveillance Systems, 2001
    */
 
@@ -824,15 +822,15 @@ run_mog2_iteration (GstSegmentation * filter)
       (uchar *) filter->cvFG->imageData;
 
   /*
-     BackgroundSubtractorMOG2 [1], Gaussian Mixture-based Background/Foreground 
-     segmentation algorithm. OpenCV MOG2 implements the algorithm described in 
+     BackgroundSubtractorMOG2 [1], Gaussian Mixture-based Background/Foreground
+     segmentation algorithm. OpenCV MOG2 implements the algorithm described in
      [2] and [3].
 
      [1] http://opencv.itseez.com/modules/video/doc/motion_analysis_and_object_tracking.html#backgroundsubtractormog2
-     [2] Z.Zivkovic, "Improved adaptive Gausian mixture model for background 
+     [2] Z.Zivkovic, "Improved adaptive Gausian mixture model for background
      subtraction", International Conference Pattern Recognition, UK, August, 2004.
-     [3] Z.Zivkovic, F. van der Heijden, "Efficient Adaptive Density Estimation per 
-     Image Pixel for the Task of Background Subtraction", Pattern Recognition 
+     [3] Z.Zivkovic, F. van der Heijden, "Efficient Adaptive Density Estimation per
+     Image Pixel for the Task of Background Subtraction", Pattern Recognition
      Letters, vol. 27, no. 7, pages 773-780, 2006.
    */
 
index 36d9480..8ecb044 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * GStreamer
  * Copyright (C) 2013 Miguel Casas-Sanchez <miguelecasassanchez@gmail.com>
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
@@ -58,9 +58,6 @@
 #include <config.h>
 #endif
 
-#include <gst/gst.h>
-
-#include "gstopencvutils.h"
 #include "gstskindetect.h"
 #include <opencv2/imgproc/imgproc_c.h>
 #include <opencv2/legacy/compat.hpp>
@@ -327,7 +324,7 @@ gst_skin_detect_transform (GstOpencvVideoFilter * base, GstBuffer * buf,
     cvCvtColor (filter->cvRGB, filter->cvHSV, CV_RGB2HSV);
     cvCvtPixToPlane (filter->cvHSV, filter->cvH, filter->cvS, filter->cvV, 0);  /*  Extract the 3 color components. */
 
-    /*  Detect which pixels in each of the H, S and V channels are probably skin pixels. 
+    /*  Detect which pixels in each of the H, S and V channels are probably skin pixels.
        Assume that skin has a Hue between 0 to 18 (out of 180), and Saturation above 50, and Brightness above 80. */
     cvThreshold (filter->cvH, filter->cvH2, 10, UCHAR_MAX, CV_THRESH_BINARY);   /* (hue > 10) */
     cvThreshold (filter->cvH, filter->cvH, 20, UCHAR_MAX, CV_THRESH_BINARY_INV);        /* (hue < 20) */
@@ -337,7 +334,7 @@ gst_skin_detect_transform (GstOpencvVideoFilter * base, GstBuffer * buf,
     /*  erode the HUE to get rid of noise. */
     cvErode (filter->cvH, filter->cvH, NULL, 1);
 
-    /*  Combine all 3 thresholded color components, so that an output pixel will only 
+    /*  Combine all 3 thresholded color components, so that an output pixel will only
        be white (255) if the H, S and V pixels were also white.
        imageSkin = (hue > 10) ^ (hue < 20) ^ (sat > 48) ^ (val > 80), where   ^ mean pixels-wise AND */
     cvAnd (filter->cvH, filter->cvS, filter->cvSkinPixels1, NULL);
@@ -375,7 +372,7 @@ gst_skin_detect_transform (GstOpencvVideoFilter * base, GstBuffer * buf,
     cvCvtColor (filter->cvdraft, filter->cvRGB, CV_GRAY2RGB);
   }
 
-  /* After this we have a RGB Black and white image with the skin, in 
+  /* After this we have a RGB Black and white image with the skin, in
      filter->cvRGB. We can postprocess by applying 1 erode-dilate and 1
      dilate-erode, or alternatively 1 opening-closing all together, with
      the goal of removing small (spurious) skin spots and creating large
index 910d22e..a9c548d 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright (C) 2005 Thomas Vander Stichele <thomas@apestaart.org>
  * Copyright (C) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
  * Copyright (C) 2008 Michael Sheldon <mike@mikeasoft.com>
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
@@ -46,8 +46,6 @@
 #ifndef __GST_SKIN_DETECT_H__
 #define __GST_SKIN_DETECT_H__
 
-#include <gst/gst.h>
-
 #include <gstopencvvideofilter.h>
 
 G_BEGIN_DECLS
index 3e77238..02ebc57 100644 (file)
 #  include <config.h>
 #endif
 
-#include <gst/gst.h>
-
 #include "../../gst-libs/gst/gst-i18n-plugin.h"
-#include "gstopencvutils.h"
 #include "gsttemplatematch.h"
 #include <opencv2/imgproc/imgproc_c.h>
 
index b6c0426..b8d7aa1 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright (C) 2005 Thomas Vander Stichele <thomas@apestaart.org>
  * Copyright (C) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
  * Copyright (C) 2008 Michael Sheldon <mike@mikeasoft.com>
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
@@ -47,6 +47,7 @@
 #define __GST_TEMPLATE_MATCH_H__
 
 #include <gst/gst.h>
+#include <gst/video/video.h>
 
 #ifdef HAVE_HIGHGUI_H
 #include <highgui.h>            // includes highGUI definitions
index 3e96cd6..9fc745f 100644 (file)
@@ -60,9 +60,6 @@
 #  include <config.h>
 #endif
 
-#include <gst/gst.h>
-
-#include "gstopencvutils.h"
 #include "gsttextoverlay.h"
 
 GST_DEBUG_CATEGORY_STATIC (gst_opencv_text_overlay_debug);
index e92ab07..cdcd956 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright (C) 2005 Thomas Vander Stichele <thomas@apestaart.org>
  * Copyright (C) 2005 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
  * Copyright (C) 2010 Sreerenj Balachandran <bsreerenj@gmail.com>
- * 
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
@@ -47,7 +47,7 @@
 #define __GST_OPENCV_TEXT_OVERLAY_H__
 
 #include <gst/gst.h>
-#include "gstopencvutils.h"
+#include <gst/video/video.h>
 #include <opencv2/core/core_c.h>
 G_BEGIN_DECLS
 
@@ -73,7 +73,7 @@ struct _GstOpencvTextOverlay
   GstPad *sinkpad, *srcpad;
 
   IplImage *cvImage;
-  CvFont font;  
+  CvFont font;
 
   gint xpos;
   gint ypos;
@@ -85,7 +85,7 @@ struct _GstOpencvTextOverlay
 
 };
 
-struct _GstOpencvTextOverlayClass 
+struct _GstOpencvTextOverlayClass
 {
   GstElementClass parent_class;
 };