merged gpunonfree and nonfree module
This commit is contained in:
@@ -17,8 +17,8 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
|
||||
"${OpenCV_SOURCE_DIR}/modules/gpu/src/nvidia/core"
|
||||
)
|
||||
|
||||
if(HAVE_opencv_gpunonfree)
|
||||
ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/gpunonfree/include")
|
||||
if(HAVE_opencv_nonfree)
|
||||
ocv_include_directories("${OpenCV_SOURCE_DIR}/modules/nonfree/include")
|
||||
endif()
|
||||
|
||||
if(HAVE_CUDA)
|
||||
@@ -37,8 +37,8 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
|
||||
add_executable(${the_target} ${srcs})
|
||||
|
||||
target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${OPENCV_GPU_SAMPLES_REQUIRED_DEPS})
|
||||
if(HAVE_opencv_gpunonfree)
|
||||
target_link_libraries(${the_target} opencv_gpunonfree)
|
||||
if(HAVE_opencv_nonfree)
|
||||
target_link_libraries(${the_target} opencv_nonfree)
|
||||
endif()
|
||||
|
||||
set_target_properties(${the_target} PROPERTIES
|
||||
|
@@ -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;
|
||||
|
@@ -10,8 +10,8 @@ endif()
|
||||
add_executable(${the_target} ${sources} ${headers})
|
||||
target_link_libraries(${the_target} ${OPENCV_LINKER_LIBS} ${OPENCV_GPU_SAMPLES_REQUIRED_DEPS})
|
||||
|
||||
if(HAVE_opencv_gpunonfree)
|
||||
target_link_libraries(${the_target} opencv_gpunonfree opencv_nonfree)
|
||||
if(HAVE_opencv_nonfree)
|
||||
target_link_libraries(${the_target} opencv_nonfree)
|
||||
endif()
|
||||
|
||||
set_target_properties(${the_target} PROPERTIES
|
||||
|
@@ -8,8 +8,8 @@
|
||||
#include "performance.h"
|
||||
|
||||
#include "opencv2/opencv_modules.hpp"
|
||||
#ifdef HAVE_OPENCV_GPUNONFREE
|
||||
#include "opencv2/gpunonfree/gpunonfree.hpp"
|
||||
#ifdef HAVE_OPENCV_NONFREE
|
||||
#include "opencv2/nonfree/gpu.hpp"
|
||||
#include "opencv2/nonfree/nonfree.hpp"
|
||||
#endif
|
||||
|
||||
@@ -271,7 +271,7 @@ TEST(meanShift)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPENCV_GPUNONFREE
|
||||
#ifdef HAVE_OPENCV_NONFREE
|
||||
|
||||
TEST(SURF)
|
||||
{
|
||||
|
@@ -2,13 +2,13 @@
|
||||
|
||||
#include "opencv2/opencv_modules.hpp"
|
||||
|
||||
#ifdef HAVE_OPENCV_GPUNONFREE
|
||||
#ifdef HAVE_OPENCV_NONFREE
|
||||
|
||||
#include "opencv2/core/core.hpp"
|
||||
#include "opencv2/features2d/features2d.hpp"
|
||||
#include "opencv2/highgui/highgui.hpp"
|
||||
#include "opencv2/gpu/gpu.hpp"
|
||||
#include "opencv2/gpunonfree/gpunonfree.hpp"
|
||||
#include "opencv2/nonfree/gpu.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
@@ -91,7 +91,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
int main()
|
||||
{
|
||||
std::cerr << "OpenCV was built without gpunonfree module" << std::endl;
|
||||
std::cerr << "OpenCV was built without nonfree module" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user