From 1e2ad7e3e32482690fb8e77cc4c2bfbaf3fbc218 Mon Sep 17 00:00:00 2001 From: Rostislav Vasilikhin Date: Wed, 14 Dec 2016 18:08:09 +0300 Subject: [PATCH] rewritten for new macro use --- modules/imgproc/src/featureselect.cpp | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/modules/imgproc/src/featureselect.cpp b/modules/imgproc/src/featureselect.cpp index 743892ed8d..1e6b593390 100644 --- a/modules/imgproc/src/featureselect.cpp +++ b/modules/imgproc/src/featureselect.cpp @@ -42,11 +42,7 @@ #include "precomp.hpp" #include "opencl_kernels_imgproc.hpp" -#ifdef HAVE_OPENVX -#define IVX_USE_OPENCV -#define IVX_HIDE_INFO_WARNINGS -#include "ivx.hpp" -#endif +#include "opencv2/core/openvx/ovx_defs.hpp" #include #include @@ -346,13 +342,11 @@ static bool openvx_harris(Mat image, OutputArray _corners, } catch (RuntimeError & e) { - CV_Error(cv::Error::StsInternal, e.what()); - return false; + VX_DbgThrow(e.what()); } catch (WrapperError & e) { - CV_Error(cv::Error::StsInternal, e.what()); - return false; + VX_DbgThrow(e.what()); } return true; @@ -383,15 +377,9 @@ void cv::goodFeaturesToTrack( InputArray _image, OutputArray _corners, return; } -#ifdef HAVE_OPENVX // Disabled due to bad accuracy - if(false && - useHarrisDetector && _mask.empty() && - openvx_harris(image, _corners, maxCorners, qualityLevel, minDistance, blockSize, harrisK)) - { - return; - } -#endif + CV_OVX_RUN(false && useHarrisDetector && _mask.empty(), + openvx_harris(image, _corners, maxCorners, qualityLevel, minDistance, blockSize, harrisK)) if( useHarrisDetector ) cornerHarris( image, eig, blockSize, 3, harrisK );