mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 20:03:15 +08:00
Revert "Motion detector compatible with OpenCV 2.4.x"
This reverts commit 043eb89543
.
This commit is contained in:
@@ -10,6 +10,11 @@
|
|||||||
/* #undef C_ALLOCA */
|
/* #undef C_ALLOCA */
|
||||||
|
|
||||||
/* Define to 1 if you have `alloca', as a function or macro. */
|
/* Define to 1 if you have `alloca', as a function or macro. */
|
||||||
|
#define HAVE_ALLOCA 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||||
|
*/
|
||||||
|
#define HAVE_ALLOCA_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
#define HAVE_DLFCN_H 1
|
#define HAVE_DLFCN_H 1
|
||||||
@@ -115,88 +120,3 @@
|
|||||||
|
|
||||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||||
/* #undef size_t */
|
/* #undef size_t */
|
||||||
#define STDC_HEADERS 1
|
|
||||||
#define HAVE_SYS_TYPES_H 1
|
|
||||||
#define HAVE_SYS_STAT_H 1
|
|
||||||
#define HAVE_STDLIB_H 1
|
|
||||||
#define HAVE_STRING_H 1
|
|
||||||
#define HAVE_MEMORY_H 1
|
|
||||||
#define HAVE_FLOAT_H 1
|
|
||||||
#define HAVE_OFF_T 1
|
|
||||||
#define SIZEOF_INT 4
|
|
||||||
#define SIZEOF_SHORT 2
|
|
||||||
#define SIZEOF_LONG 4
|
|
||||||
#define SIZEOF_LONG_LONG 0
|
|
||||||
#define SIZEOF___INT64 8
|
|
||||||
#define SIZEOF_OFF_T 4
|
|
||||||
#define SIZEOF_VOIDP 4
|
|
||||||
#define SIZEOF_FLOAT 4
|
|
||||||
#define SIZEOF_DOUBLE 8
|
|
||||||
#define HAVE_PROTOTYPES 1
|
|
||||||
#define TOKEN_PASTE(x,y) x##y
|
|
||||||
#define HAVE_STDARG_PROTOTYPES 1
|
|
||||||
#ifndef NORETURN
|
|
||||||
#if _MSC_VER > 1100
|
|
||||||
#define NORETURN(x) __declspec(noreturn) x
|
|
||||||
#else
|
|
||||||
#define NORETURN(x) x
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#define HAVE_DECL_SYS_NERR 1
|
|
||||||
#define STDC_HEADERS 1
|
|
||||||
#define HAVE_STDLIB_H 1
|
|
||||||
#define HAVE_STRING_H 1
|
|
||||||
#define HAVE_LIMITS_H 1
|
|
||||||
#define HAVE_FCNTL_H 1
|
|
||||||
#define HAVE_SYS_UTIME_H 1
|
|
||||||
#define HAVE_MEMORY_H 1
|
|
||||||
#define uid_t int
|
|
||||||
#define gid_t int
|
|
||||||
#define HAVE_STRUCT_STAT_ST_RDEV 1
|
|
||||||
#define HAVE_ST_RDEV 1
|
|
||||||
#define GETGROUPS_T int
|
|
||||||
#define RETSIGTYPE void
|
|
||||||
#define HAVE_ALLOCA 1
|
|
||||||
#define HAVE_DUP2 1
|
|
||||||
#define HAVE_MEMCMP 1
|
|
||||||
#define HAVE_MEMMOVE 1
|
|
||||||
#define HAVE_MKDIR 1
|
|
||||||
#define HAVE_STRCASECMP 1
|
|
||||||
#define HAVE_STRNCASECMP 1
|
|
||||||
#define HAVE_STRERROR 1
|
|
||||||
#define HAVE_STRFTIME 1
|
|
||||||
#define HAVE_STRCHR 1
|
|
||||||
#define HAVE_STRSTR 1
|
|
||||||
#define HAVE_STRTOD 1
|
|
||||||
#define HAVE_STRTOL 1
|
|
||||||
#define HAVE_STRTOUL 1
|
|
||||||
#define HAVE_FLOCK 1
|
|
||||||
#define HAVE_VSNPRINTF 1
|
|
||||||
#define HAVE_FINITE 1
|
|
||||||
#define HAVE_FMOD 1
|
|
||||||
#define HAVE_FREXP 1
|
|
||||||
#define HAVE_HYPOT 1
|
|
||||||
#define HAVE_MODF 1
|
|
||||||
#define HAVE_WAITPID 1
|
|
||||||
#define HAVE_CHSIZE 1
|
|
||||||
#define HAVE_TIMES 1
|
|
||||||
#define HAVE__SETJMP 1
|
|
||||||
#define HAVE_TELLDIR 1
|
|
||||||
#define HAVE_SEEKDIR 1
|
|
||||||
#define HAVE_MKTIME 1
|
|
||||||
#define HAVE_COSH 1
|
|
||||||
#define HAVE_SINH 1
|
|
||||||
#define HAVE_TANH 1
|
|
||||||
#define HAVE_EXECVE 1
|
|
||||||
#define HAVE_TZNAME 1
|
|
||||||
#define HAVE_DAYLIGHT 1
|
|
||||||
#define SETPGRP_VOID 1
|
|
||||||
#define inline __inline
|
|
||||||
#define NEED_IO_SEEK_BETWEEN_RW 1
|
|
||||||
#define RSHIFT(x,y) ((x)>>(int)y)
|
|
||||||
#define FILE_COUNT _cnt
|
|
||||||
#define FILE_READPTR _ptr
|
|
||||||
#define DEFAULT_KCODE KCODE_NONE
|
|
||||||
#define DLEXT ".so"
|
|
||||||
#define DLEXT2 ".dll"
|
|
||||||
|
|
||||||
|
@@ -4,7 +4,7 @@ using namespace cv;
|
|||||||
|
|
||||||
MotionDetector::MotionDetector()
|
MotionDetector::MotionDetector()
|
||||||
{
|
{
|
||||||
pMOG2 = new BackgroundSubtractorMOG2();
|
pMOG2 = cv::createBackgroundSubtractorMOG2();
|
||||||
}
|
}
|
||||||
|
|
||||||
MotionDetector::~MotionDetector()
|
MotionDetector::~MotionDetector()
|
||||||
@@ -14,7 +14,7 @@ MotionDetector::~MotionDetector()
|
|||||||
|
|
||||||
void MotionDetector::ResetMotionDetection(cv::Mat* frame)
|
void MotionDetector::ResetMotionDetection(cv::Mat* frame)
|
||||||
{
|
{
|
||||||
pMOG2->operator()(*frame, fgMaskMOG2, 1);
|
pMOG2->apply(*frame, fgMaskMOG2, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
cv::Rect MotionDetector::MotionDetect(cv::Mat* frame)
|
cv::Rect MotionDetector::MotionDetect(cv::Mat* frame)
|
||||||
@@ -27,7 +27,7 @@ cv::Rect MotionDetector::MotionDetect(cv::Mat* frame)
|
|||||||
cv::Rect largest_rect, rect_temp;
|
cv::Rect largest_rect, rect_temp;
|
||||||
|
|
||||||
// Detect motion
|
// Detect motion
|
||||||
pMOG2->operator()(*frame, fgMaskMOG2, -1);
|
pMOG2->apply(*frame, fgMaskMOG2, -1);
|
||||||
//Remove noise
|
//Remove noise
|
||||||
cv::erode(fgMaskMOG2, fgMaskMOG2, getStructuringElement(cv::MORPH_RECT, cv::Size(6, 6)));
|
cv::erode(fgMaskMOG2, fgMaskMOG2, getStructuringElement(cv::MORPH_RECT, cv::Size(6, 6)));
|
||||||
// Find the contours of motion areas in the image
|
// Find the contours of motion areas in the image
|
||||||
|
Reference in New Issue
Block a user