Enabled cuda pre-process via opencv_contrib

This commit is contained in:
Harijs Grinbergs
2021-11-04 20:39:37 +02:00
parent 18303c06c5
commit e449d344c0
3 changed files with 49 additions and 49 deletions
+5 -5
View File
@@ -18,7 +18,7 @@ if(DEBUG)
endif() endif()
if(TKDNN_PATH) if(TKDNN_PATH)
message("SET TKDNN_PATH:"${TKDNN_PATH}) message("SET TKDNN_PATH:${TKDNN_PATH}")
add_definitions(-DTKDNN_PATH="${TKDNN_PATH}") add_definitions(-DTKDNN_PATH="${TKDNN_PATH}")
else() else()
add_definitions(-DTKDNN_PATH="${CMAKE_CURRENT_SOURCE_DIR}") add_definitions(-DTKDNN_PATH="${CMAKE_CURRENT_SOURCE_DIR}")
@@ -51,11 +51,11 @@ find_package(Eigen3 REQUIRED)
message("Eigen DIR: " ${EIGEN3_INCLUDE_DIR}) message("Eigen DIR: " ${EIGEN3_INCLUDE_DIR})
include_directories(${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") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOPENCV")
# if(OpenCV_CUDA_VERSION) if(OpenCV_CUDA_VERSION)
# add_compile_definitions(OPENCV_CUDACONTRIB) add_compile_definitions(OPENCV_CUDACONTRIB)
# endif() endif()
# gives problems in cross-compiling, probably malformed cmake config # gives problems in cross-compiling, probably malformed cmake config
find_package(yaml-cpp REQUIRED) find_package(yaml-cpp REQUIRED)
+2 -2
View File
@@ -17,7 +17,7 @@
#include "tkdnn.h" #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 #ifdef OPENCV_CUDACONTRIB
#include <opencv2/cudawarping.hpp> #include <opencv2/cudawarping.hpp>
@@ -37,7 +37,7 @@ class DetectionNN {
cv::Scalar colors[256]; cv::Scalar colors[256];
int nBatches = 1; int nBatches = 2;
#ifdef OPENCV_CUDACONTRIB #ifdef OPENCV_CUDACONTRIB
cv::cuda::GpuMat bgr[3]; cv::cuda::GpuMat bgr[3];
+1 -1
View File
@@ -17,7 +17,7 @@
#include "tkdnn.h" #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 #ifdef OPENCV_CUDACONTRIB
#include <opencv2/cudawarping.hpp> #include <opencv2/cudawarping.hpp>