mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-11 08:52:39 +00:00
opencv: move base opencv filter class and utilities to gst-libs
https://bugzilla.gnome.org/show_bug.cgi?id=774223
This commit is contained in:
parent
2121e99dc8
commit
5594c7e53e
24 changed files with 55 additions and 25 deletions
|
@ -3763,6 +3763,7 @@ gst-libs/gst/base/Makefile
|
||||||
gst-libs/gst/player/Makefile
|
gst-libs/gst/player/Makefile
|
||||||
gst-libs/gst/video/Makefile
|
gst-libs/gst/video/Makefile
|
||||||
gst-libs/gst/audio/Makefile
|
gst-libs/gst/audio/Makefile
|
||||||
|
gst-libs/gst/opencv/Makefile
|
||||||
sys/Makefile
|
sys/Makefile
|
||||||
sys/dshowdecwrapper/Makefile
|
sys/dshowdecwrapper/Makefile
|
||||||
sys/acmenc/Makefile
|
sys/acmenc/Makefile
|
||||||
|
|
|
@ -2,8 +2,6 @@ plugin_LTLIBRARIES = libgstopencv.la
|
||||||
|
|
||||||
# sources used to compile this plug-in
|
# sources used to compile this plug-in
|
||||||
libgstopencv_la_SOURCES = gstopencv.cpp \
|
libgstopencv_la_SOURCES = gstopencv.cpp \
|
||||||
gstopencvvideofilter.cpp \
|
|
||||||
gstopencvutils.cpp \
|
|
||||||
gstcvdilate.cpp \
|
gstcvdilate.cpp \
|
||||||
gstcvdilateerode.cpp \
|
gstcvdilateerode.cpp \
|
||||||
gstcvequalizehist.cpp \
|
gstcvequalizehist.cpp \
|
||||||
|
@ -26,7 +24,10 @@ libgstopencv_la_SOURCES = gstopencv.cpp \
|
||||||
motioncells_wrapper.cpp \
|
motioncells_wrapper.cpp \
|
||||||
MotionCells.cpp
|
MotionCells.cpp
|
||||||
|
|
||||||
libgstopencv_la_CXXFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CXXFLAGS) $(OPENCV_CFLAGS) \
|
libgstopencv_la_CXXFLAGS = \
|
||||||
|
-I$(top_srcdir)/gst-libs \
|
||||||
|
-I$(top_builddir)/gst-libs \
|
||||||
|
$(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CXXFLAGS) $(OPENCV_CFLAGS) \
|
||||||
-DGST_HAAR_CASCADES_DIR=\"$(pkgdatadir)/@GST_API_VERSION@/opencv_haarcascades\"
|
-DGST_HAAR_CASCADES_DIR=\"$(pkgdatadir)/@GST_API_VERSION@/opencv_haarcascades\"
|
||||||
|
|
||||||
# flags used to compile this facedetect
|
# flags used to compile this facedetect
|
||||||
|
@ -39,14 +40,16 @@ libgstopencv_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) \
|
||||||
-DCV_INLINE="static inline" \
|
-DCV_INLINE="static inline" \
|
||||||
-DCV_NO_BACKWARD_COMPATIBILITY
|
-DCV_NO_BACKWARD_COMPATIBILITY
|
||||||
|
|
||||||
libgstopencv_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(OPENCV_LIBS) \
|
libgstopencv_la_LIBADD = \
|
||||||
|
$(top_builddir)/gst-libs/gst/opencv/libgstopencv-$(GST_API_VERSION).la \
|
||||||
|
$(GST_LIBS) $(GST_BASE_LIBS) $(OPENCV_LIBS) \
|
||||||
$(GSTPB_BASE_LIBS) -lgstvideo-$(GST_API_VERSION)
|
$(GSTPB_BASE_LIBS) -lgstvideo-$(GST_API_VERSION)
|
||||||
|
|
||||||
libgstopencv_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
libgstopencv_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
||||||
libgstopencv_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
|
libgstopencv_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
|
||||||
|
|
||||||
# headers we need but don't want installed
|
# headers we need but don't want installed
|
||||||
noinst_HEADERS = gstopencvvideofilter.h gstopencvutils.h \
|
noinst_HEADERS = \
|
||||||
gstcvdilateerode.h \
|
gstcvdilateerode.h \
|
||||||
gstcvdilate.h \
|
gstcvdilate.h \
|
||||||
gstcvequalizehist.h \
|
gstcvequalizehist.h \
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "gstopencvutils.h"
|
#include "gst/opencv/gstopencvutils.h"
|
||||||
#include "gstcvdilateerode.h"
|
#include "gstcvdilateerode.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
#ifndef __GST_CV_DILATE_ERODE_H__
|
#ifndef __GST_CV_DILATE_ERODE_H__
|
||||||
#define __GST_CV_DILATE_ERODE_H__
|
#define __GST_CV_DILATE_ERODE_H__
|
||||||
|
|
||||||
#include <gstopencvvideofilter.h>
|
#include <gst/opencv/gstopencvvideofilter.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
#ifndef __GST_CV_EQUALIZE_HIST_H__
|
#ifndef __GST_CV_EQUALIZE_HIST_H__
|
||||||
#define __GST_CV_EQUALIZE_HIST_H__
|
#define __GST_CV_EQUALIZE_HIST_H__
|
||||||
|
|
||||||
#include <gstopencvvideofilter.h>
|
#include <gst/opencv/gstopencvvideofilter.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
#ifndef __GST_CV_LAPLACE_H__
|
#ifndef __GST_CV_LAPLACE_H__
|
||||||
#define __GST_CV_LAPLACE_H__
|
#define __GST_CV_LAPLACE_H__
|
||||||
|
|
||||||
#include <gstopencvvideofilter.h>
|
#include <gst/opencv/gstopencvvideofilter.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "gstopencvutils.h"
|
#include "gst/opencv/gstopencvutils.h"
|
||||||
#include "gstcvsmooth.h"
|
#include "gstcvsmooth.h"
|
||||||
#include <opencv2/imgproc/imgproc.hpp>
|
#include <opencv2/imgproc/imgproc.hpp>
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
#ifndef __GST_CV_SMOOTH_H__
|
#ifndef __GST_CV_SMOOTH_H__
|
||||||
#define __GST_CV_SMOOTH_H__
|
#define __GST_CV_SMOOTH_H__
|
||||||
|
|
||||||
#include <gstopencvvideofilter.h>
|
#include <gst/opencv/gstopencvvideofilter.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
#ifndef __GST_CV_SOBEL_H__
|
#ifndef __GST_CV_SOBEL_H__
|
||||||
#define __GST_CV_SOBEL_H__
|
#define __GST_CV_SOBEL_H__
|
||||||
|
|
||||||
#include <gstopencvvideofilter.h>
|
#include <gst/opencv/gstopencvvideofilter.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
#ifndef __GST_EDGE_DETECT_H__
|
#ifndef __GST_EDGE_DETECT_H__
|
||||||
#define __GST_EDGE_DETECT_H__
|
#define __GST_EDGE_DETECT_H__
|
||||||
|
|
||||||
#include <gstopencvvideofilter.h>
|
#include <gst/opencv/gstopencvvideofilter.h>
|
||||||
#include <opencv2/core/core_c.h>
|
#include <opencv2/core/core_c.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <opencv2/core/version.hpp>
|
#include <opencv2/core/version.hpp>
|
||||||
|
|
||||||
#include "gstopencvvideofilter.h"
|
#include <gst/opencv/gstopencvvideofilter.h>
|
||||||
#include <opencv2/objdetect/objdetect.hpp>
|
#include <opencv2/objdetect/objdetect.hpp>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <opencv2/core/version.hpp>
|
#include <opencv2/core/version.hpp>
|
||||||
#include <cv.h>
|
#include <cv.h>
|
||||||
#include "gstopencvvideofilter.h"
|
#include <gst/opencv/gstopencvvideofilter.h>
|
||||||
#include <opencv2/objdetect/objdetect.hpp>
|
#include <opencv2/objdetect/objdetect.hpp>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
|
|
||||||
#include <cv.h>
|
#include <cv.h>
|
||||||
|
|
||||||
#include "gstopencvvideofilter.h"
|
#include <gst/opencv/gstopencvvideofilter.h>
|
||||||
/* opencv */
|
/* opencv */
|
||||||
#include <opencv2/core/version.hpp>
|
#include <opencv2/core/version.hpp>
|
||||||
#ifdef HAVE_HIGHGUI_H
|
#ifdef HAVE_HIGHGUI_H
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
#ifndef __GST_MOTIONCELLS_H__
|
#ifndef __GST_MOTIONCELLS_H__
|
||||||
#define __GST_MOTIONCELLS_H__
|
#define __GST_MOTIONCELLS_H__
|
||||||
|
|
||||||
#include <gstopencvvideofilter.h>
|
#include <gst/opencv/gstopencvvideofilter.h>
|
||||||
#include <opencv2/core/core_c.h>
|
#include <opencv2/core/core_c.h>
|
||||||
#include "motioncells_wrapper.h"
|
#include "motioncells_wrapper.h"
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
#include <opencv2/core/core_c.h>
|
#include <opencv2/core/core_c.h>
|
||||||
|
|
||||||
#include <gstopencvvideofilter.h>
|
#include <gst/opencv/gstopencvvideofilter.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
/* #defines don't like whitespacey bits */
|
/* #defines don't like whitespacey bits */
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
#ifndef __GST_SKIN_DETECT_H__
|
#ifndef __GST_SKIN_DETECT_H__
|
||||||
#define __GST_SKIN_DETECT_H__
|
#define __GST_SKIN_DETECT_H__
|
||||||
|
|
||||||
#include <gstopencvvideofilter.h>
|
#include <gst/opencv/gstopencvvideofilter.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
/* #defines don't like whitespacey bits */
|
/* #defines don't like whitespacey bits */
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
#ifndef __GST_TEMPLATE_MATCH_H__
|
#ifndef __GST_TEMPLATE_MATCH_H__
|
||||||
#define __GST_TEMPLATE_MATCH_H__
|
#define __GST_TEMPLATE_MATCH_H__
|
||||||
|
|
||||||
#include <gstopencvvideofilter.h>
|
#include <gst/opencv/gstopencvvideofilter.h>
|
||||||
|
|
||||||
#ifdef HAVE_HIGHGUI_H
|
#ifdef HAVE_HIGHGUI_H
|
||||||
#include <highgui.h> // includes highGUI definitions
|
#include <highgui.h> // includes highGUI definitions
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
#ifndef __GST_OPENCV_TEXT_OVERLAY_H__
|
#ifndef __GST_OPENCV_TEXT_OVERLAY_H__
|
||||||
#define __GST_OPENCV_TEXT_OVERLAY_H__
|
#define __GST_OPENCV_TEXT_OVERLAY_H__
|
||||||
|
|
||||||
#include <gstopencvvideofilter.h>
|
#include <gst/opencv/gstopencvvideofilter.h>
|
||||||
#include <opencv2/core/core_c.h>
|
#include <opencv2/core/core_c.h>
|
||||||
#if (CV_MAJOR_VERSION >= 3)
|
#if (CV_MAJOR_VERSION >= 3)
|
||||||
#include <opencv2/imgproc/imgproc_c.h>
|
#include <opencv2/imgproc/imgproc_c.h>
|
||||||
|
|
|
@ -10,12 +10,17 @@ if USE_WAYLAND
|
||||||
WAYLAND_DIR=wayland
|
WAYLAND_DIR=wayland
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if USE_OPENCV
|
||||||
|
OPENCV_DIR=opencv
|
||||||
|
endif
|
||||||
|
|
||||||
SUBDIRS = uridownloader adaptivedemux interfaces basecamerabinsrc codecparsers \
|
SUBDIRS = uridownloader adaptivedemux interfaces basecamerabinsrc codecparsers \
|
||||||
insertbin mpegts base video audio player $(GL_DIR) $(WAYLAND_DIR)
|
insertbin mpegts base video audio player $(GL_DIR) $(WAYLAND_DIR) \
|
||||||
|
$(OPENCV_DIR)
|
||||||
|
|
||||||
noinst_HEADERS = gst-i18n-plugin.h gettext.h glib-compat-private.h
|
noinst_HEADERS = gst-i18n-plugin.h gettext.h glib-compat-private.h
|
||||||
DIST_SUBDIRS = uridownloader adaptivedemux interfaces gl basecamerabinsrc \
|
DIST_SUBDIRS = uridownloader adaptivedemux interfaces gl basecamerabinsrc \
|
||||||
codecparsers insertbin mpegts wayland base video audio player
|
codecparsers insertbin mpegts wayland opencv base video audio player
|
||||||
|
|
||||||
#dependencies
|
#dependencies
|
||||||
video, audio: base
|
video, audio: base
|
||||||
|
@ -24,7 +29,7 @@ adaptivedemux: uridownloader
|
||||||
|
|
||||||
INDEPENDENT_SUBDIRS = \
|
INDEPENDENT_SUBDIRS = \
|
||||||
interfaces basecamerabinsrc codecparsers insertbin uridownloader \
|
interfaces basecamerabinsrc codecparsers insertbin uridownloader \
|
||||||
mpegts base player $(GL_DIR) $(WAYLAND_DIR)
|
mpegts base player $(GL_DIR) $(WAYLAND_DIR) $(OPENCV_DIR)
|
||||||
|
|
||||||
.PHONY: independent-subdirs $(INDEPENDENT_SUBDIRS)
|
.PHONY: independent-subdirs $(INDEPENDENT_SUBDIRS)
|
||||||
|
|
||||||
|
|
21
gst-libs/gst/opencv/Makefile.am
Normal file
21
gst-libs/gst/opencv/Makefile.am
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
lib_LTLIBRARIES = libgstopencv-@GST_API_VERSION@.la
|
||||||
|
|
||||||
|
libgstopencv_@GST_API_VERSION@_la_SOURCES = \
|
||||||
|
gstopencvutils.cpp \
|
||||||
|
gstopencvvideofilter.cpp
|
||||||
|
|
||||||
|
libgstopencv_@GST_API_VERSION@_la_CXXFLAGS = \
|
||||||
|
$(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CXXFLAGS) \
|
||||||
|
$(OPENCV_CFLAGS)
|
||||||
|
|
||||||
|
libgstopencv_@GST_API_VERSION@_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) \
|
||||||
|
$(OPENCV_LIBS) -lgstvideo-$(GST_API_VERSION)
|
||||||
|
|
||||||
|
libgstopencv_@GST_API_VERSION@_la_LDFLAGS = \
|
||||||
|
$(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
|
||||||
|
|
||||||
|
libgstopencv_@GST_API_VERSION@includedir = \
|
||||||
|
$(includedir)/gstreamer-@GST_API_VERSION@/gst/opencv
|
||||||
|
libgstopencv_@GST_API_VERSION@include_HEADERS = \
|
||||||
|
gstopencvutils.h \
|
||||||
|
gstopencvvideofilter.h
|
Loading…
Reference in a new issue