1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

merged gpunonfree and nonfree module

This commit is contained in:
Vladislav Vinogradov
2013-03-18 16:14:37 +04:00
parent 3b065e38be
commit 0a65f2f4af
40 changed files with 300 additions and 593 deletions
+9 -9
View File
@@ -6,8 +6,8 @@
#include "opencv2/gpu/gpu.hpp"
#include "opencv2/highgui/highgui.hpp"
#ifdef HAVE_OPENCV_GPUNONFREE
#include "opencv2/gpunonfree/gpunonfree.hpp"
#ifdef HAVE_OPENCV_NONFREE
#include "opencv2/nonfree/gpu.hpp"
#endif
using namespace std;
@@ -19,7 +19,7 @@ enum Method
FGD_STAT,
MOG,
MOG2,
#ifdef HAVE_OPENCV_GPUNONFREE
#ifdef HAVE_OPENCV_NONFREE
VIBE,
#endif
GMG
@@ -48,7 +48,7 @@ int main(int argc, const char** argv)
if (method != "fgd"
&& method != "mog"
&& method != "mog2"
#ifdef HAVE_OPENCV_GPUNONFREE
#ifdef HAVE_OPENCV_NONFREE
&& method != "vibe"
#endif
&& method != "gmg")
@@ -60,7 +60,7 @@ int main(int argc, const char** argv)
Method m = method == "fgd" ? FGD_STAT :
method == "mog" ? MOG :
method == "mog2" ? MOG2 :
#ifdef HAVE_OPENCV_GPUNONFREE
#ifdef HAVE_OPENCV_NONFREE
method == "vibe" ? VIBE :
#endif
GMG;
@@ -86,7 +86,7 @@ int main(int argc, const char** argv)
FGDStatModel fgd_stat;
MOG_GPU mog;
MOG2_GPU mog2;
#ifdef HAVE_OPENCV_GPUNONFREE
#ifdef HAVE_OPENCV_NONFREE
VIBE_GPU vibe;
#endif
GMG_GPU gmg;
@@ -114,7 +114,7 @@ int main(int argc, const char** argv)
mog2(d_frame, d_fgmask);
break;
#ifdef HAVE_OPENCV_GPUNONFREE
#ifdef HAVE_OPENCV_NONFREE
case VIBE:
vibe.initialize(d_frame);
break;
@@ -129,7 +129,7 @@ int main(int argc, const char** argv)
namedWindow("foreground mask", WINDOW_NORMAL);
namedWindow("foreground image", WINDOW_NORMAL);
if (m != GMG
#ifdef HAVE_OPENCV_GPUNONFREE
#ifdef HAVE_OPENCV_NONFREE
&& m != VIBE
#endif
)
@@ -165,7 +165,7 @@ int main(int argc, const char** argv)
mog2.getBackgroundImage(d_bgimg);
break;
#ifdef HAVE_OPENCV_GPUNONFREE
#ifdef HAVE_OPENCV_NONFREE
case VIBE:
vibe(d_frame, d_fgmask);
break;