diff --git a/modules/imgproc/src/smooth.cpp b/modules/imgproc/src/smooth.cpp index 5ab70d9a2..2a6900364 100644 --- a/modules/imgproc/src/smooth.cpp +++ b/modules/imgproc/src/smooth.cpp @@ -1497,7 +1497,9 @@ void cv::GaussianBlur( InputArray _src, OutputArray _dst, Size ksize, } #ifdef HAVE_TEGRA_OPTIMIZATION - if(sigma1 == 0 && sigma2 == 0 && tegra::gaussian(_src.getMat(), _dst.getMat(), ksize, borderType)) + Mat src = _src.getMat(); + Mat dst = _dst.getMat(); + if(sigma1 == 0 && sigma2 == 0 && tegra::gaussian(src, dst, ksize, borderType)) return; #endif diff --git a/modules/objdetect/src/cascadedetect.cpp b/modules/objdetect/src/cascadedetect.cpp index 4e25a5ccf..8a61c2dd7 100644 --- a/modules/objdetect/src/cascadedetect.cpp +++ b/modules/objdetect/src/cascadedetect.cpp @@ -931,7 +931,7 @@ Ptr CascadeClassifierImpl::getMaskGenerato Ptr createFaceDetectionMaskGenerator() { #ifdef HAVE_TEGRA_OPTIMIZATION - return tegra::getCascadeClassifierMaskGenerator(*this); + return tegra::getCascadeClassifierMaskGenerator(); #else return Ptr(); #endif diff --git a/modules/objdetect/src/cascadedetect.hpp b/modules/objdetect/src/cascadedetect.hpp index 17eeccd53..4cbf3e9bf 100644 --- a/modules/objdetect/src/cascadedetect.hpp +++ b/modules/objdetect/src/cascadedetect.hpp @@ -1,5 +1,7 @@ #pragma once +#include "opencv2/core/ocl.hpp" + namespace cv { diff --git a/modules/stitching/src/blenders.cpp b/modules/stitching/src/blenders.cpp index c36e6877b..3fddff5ff 100644 --- a/modules/stitching/src/blenders.cpp +++ b/modules/stitching/src/blenders.cpp @@ -477,6 +477,8 @@ static bool ocl_normalizeUsingWeightMap(InputArray _weight, InputOutputArray _ma void normalizeUsingWeightMap(InputArray _weight, InputOutputArray _src) { #ifdef HAVE_TEGRA_OPTIMIZATION + Mat weight = _weight.getMat(); + Mat src = _src.getMat(); if(tegra::normalizeUsingWeightMap(weight, src)) return; #endif @@ -486,9 +488,6 @@ void normalizeUsingWeightMap(InputArray _weight, InputOutputArray _src) !ocl_normalizeUsingWeightMap(_weight, _src) ) #endif { - Mat weight = _weight.getMat(); - Mat src = _src.getMat(); - CV_Assert(src.type() == CV_16SC3); if(weight.type() == CV_32FC1) @@ -547,7 +546,8 @@ void createWeightMap(InputArray mask, float sharpness, InputOutputArray weight) void createLaplacePyr(InputArray img, int num_levels, std::vector &pyr) { #ifdef HAVE_TEGRA_OPTIMIZATION - if(tegra::createLaplacePyr(img, num_levels, pyr)) + cv::Mat imgMat = img.getMat(); + if(tegra::createLaplacePyr(imgMat, num_levels, pyr)) return; #endif