Superres module enabled for Android. GPU samples build fixed for Android.

This commit is contained in:
Alexander Smorkalov
2014-03-05 12:31:04 +04:00
parent b3e18d23a3
commit b4e4f13f9e
12 changed files with 49 additions and 44 deletions

View File

@@ -1,7 +1,12 @@
if(ANDROID OR IOS)
if(IOS)
ocv_module_disable(superres)
endif()
set(the_description "Super Resolution")
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127 -Wundef -Wshadow)
ocv_define_module(superres opencv_imgproc opencv_video OPTIONAL opencv_gpu opencv_highgui opencv_ocl ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY})
if(ENABLE_DYNAMIC_CUDA)
add_definitions(-DDYNAMIC_CUDA_SUPPORT)
ocv_define_module(superres EXCLUDE_CUDA opencv_imgproc opencv_video OPTIONAL opencv_highgui opencv_ocl)
else()
ocv_define_module(superres opencv_imgproc opencv_video OPTIONAL opencv_gpu opencv_highgui opencv_ocl ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY})
endif()

View File

@@ -51,7 +51,7 @@ using namespace cv::gpu;
using namespace cv::superres;
using namespace cv::superres::detail;
#if !defined(HAVE_CUDA) || !defined(HAVE_OPENCV_GPU)
#if !defined(HAVE_CUDA) || !defined(HAVE_OPENCV_GPU) || defined(DYNAMIC_CUDA_SUPPORT)
Ptr<SuperResolution> cv::superres::createSuperResolution_BTVL1_GPU()
{

View File

@@ -200,7 +200,7 @@ Ptr<FrameSource> cv::superres::createFrameSource_Camera(int deviceId)
//////////////////////////////////////////////////////
// VideoFrameSource_GPU
#ifndef HAVE_OPENCV_GPU
#if !defined(HAVE_OPENCV_GPU) || defined(DYNAMIC_CUDA_SUPPORT)
Ptr<FrameSource> cv::superres::createFrameSource_Video_GPU(const string& fileName)
{

View File

@@ -207,7 +207,7 @@ namespace
switch (src.kind())
{
case _InputArray::GPU_MAT:
#ifdef HAVE_OPENCV_GPU
#if defined(HAVE_OPENCV_GPU) && !defined(DYNAMIC_CUDA_SUPPORT)
gpu::cvtColor(src.getGpuMat(), dst.getGpuMatRef(), code, cn);
#else
CV_Error(CV_StsNotImplemented, "The called functionality is disabled for current build or platform");

View File

@@ -344,7 +344,7 @@ Ptr<DenseOpticalFlowExt> cv::superres::createOptFlow_DualTVL1()
///////////////////////////////////////////////////////////////////
// GpuOpticalFlow
#ifndef HAVE_OPENCV_GPU
#if !defined(HAVE_OPENCV_GPU) || defined(DYNAMIC_CUDA_SUPPORT)
Ptr<DenseOpticalFlowExt> cv::superres::createOptFlow_Farneback_GPU()
{

View File

@@ -56,7 +56,7 @@
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/video/tracking.hpp"
#ifdef HAVE_OPENCV_GPU
#if defined(HAVE_OPENCV_GPU) && !defined(DYNAMIC_CUDA_SUPPORT)
#include "opencv2/gpu/gpu.hpp"
#ifdef HAVE_CUDA
#include "opencv2/gpu/stream_accessor.hpp"

View File

@@ -11,7 +11,7 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef)
ocv_add_module(ts opencv_core opencv_features2d)
ocv_glob_module_sources(0 0)
ocv_glob_module_sources()
ocv_module_include_directories()
ocv_create_module()