Enabled cuda pre-process via opencv_contrib
This commit is contained in:
+5
-5
@@ -18,7 +18,7 @@ if(DEBUG)
|
||||
endif()
|
||||
|
||||
if(TKDNN_PATH)
|
||||
message("SET TKDNN_PATH:"${TKDNN_PATH})
|
||||
message("SET TKDNN_PATH:${TKDNN_PATH}")
|
||||
add_definitions(-DTKDNN_PATH="${TKDNN_PATH}")
|
||||
else()
|
||||
add_definitions(-DTKDNN_PATH="${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
@@ -51,11 +51,11 @@ find_package(Eigen3 REQUIRED)
|
||||
message("Eigen DIR: " ${EIGEN3_INCLUDE_DIR})
|
||||
include_directories(${EIGEN3_INCLUDE_DIR})
|
||||
|
||||
find_package(OpenCV REQUIRED)
|
||||
find_package(OpenCV 4.5 REQUIRED)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOPENCV")
|
||||
# if(OpenCV_CUDA_VERSION)
|
||||
# add_compile_definitions(OPENCV_CUDACONTRIB)
|
||||
# endif()
|
||||
if(OpenCV_CUDA_VERSION)
|
||||
add_compile_definitions(OPENCV_CUDACONTRIB)
|
||||
endif()
|
||||
|
||||
# gives problems in cross-compiling, probably malformed cmake config
|
||||
find_package(yaml-cpp REQUIRED)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include "tkdnn.h"
|
||||
|
||||
//#define OPENCV_CUDACONTRIB //if OPENCV has been compiled with CUDA and contrib.
|
||||
#define OPENCV_CUDACONTRIB //if OPENCV has been compiled with CUDA and contrib.
|
||||
|
||||
#ifdef OPENCV_CUDACONTRIB
|
||||
#include <opencv2/cudawarping.hpp>
|
||||
@@ -37,7 +37,7 @@ class DetectionNN {
|
||||
|
||||
cv::Scalar colors[256];
|
||||
|
||||
int nBatches = 1;
|
||||
int nBatches = 2;
|
||||
|
||||
#ifdef OPENCV_CUDACONTRIB
|
||||
cv::cuda::GpuMat bgr[3];
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include "tkdnn.h"
|
||||
|
||||
// #define OPENCV_CUDACONTRIB //if OPENCV has been compiled with CUDA and contrib.
|
||||
#define OPENCV_CUDACONTRIB //if OPENCV has been compiled with CUDA and contrib.
|
||||
|
||||
#ifdef OPENCV_CUDACONTRIB
|
||||
#include <opencv2/cudawarping.hpp>
|
||||
|
||||
Reference in New Issue
Block a user