Add opencv script, modified macro, add opencv section into readme

Signed-off-by: Micaela Verucchi <micaela.verucchi@unimore.it>
This commit is contained in:
Micaela Verucchi
2020-04-06 17:25:53 +02:00
parent dfdeb8b36e
commit 674c61d280
6 changed files with 17 additions and 9 deletions
+2 -2
View File
@@ -160,7 +160,7 @@ bool MobilenetDetection::init(const std::string& tensor_path, const int n_classe
generate_ssd_priors(specs, N_SSDSPEC);
#ifndef OPENCV_CUDA
#ifndef OPENCV_CUDACONTRIB
checkCuda(cudaMallocHost(&input, sizeof(dnnType) * netRT->input_dim.tot()));
#endif
checkCuda(cudaMalloc(&input_d, sizeof(dnnType) * netRT->input_dim.tot()));
@@ -209,7 +209,7 @@ bool MobilenetDetection::init(const std::string& tensor_path, const int n_classe
void MobilenetDetection::preprocess(cv::Mat &frame)
{
#ifdef OPENCV_CUDA
#ifdef OPENCV_CUDACONTRIB
//move original image on GPU
cv::cuda::GpuMat orig_img, frame_nomean;
orig_img = cv::cuda::GpuMat(frame);