Superres module enabled for Android. GPU samples build fixed for Android.
This commit is contained in:
@@ -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()
|
||||
|
@@ -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()
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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");
|
||||
|
@@ -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()
|
||||
{
|
||||
|
@@ -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"
|
||||
|
@@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user