Implementation detector and selector for IPP and OpenCL;
IPP can be switched on and off on runtime; Optional implementation collector was added (switched off by default in CMake). Gathers data of implementation used in functions and report this info through performance TS; TS modifications for implementations control;
This commit is contained in:
@@ -1213,6 +1213,7 @@ void CascadeClassifierImpl::detectMultiScaleNoGrouping( InputArray _image, std::
|
||||
if( maxObjectSize.height == 0 || maxObjectSize.width == 0 )
|
||||
maxObjectSize = imgsz;
|
||||
|
||||
#ifdef HAVE_OPENCL
|
||||
bool use_ocl = tryOpenCL && ocl::useOpenCL() &&
|
||||
featureEvaluator->getLocalSize().area() > 0 &&
|
||||
ocl::Device::getDefault().type() != ocl::Device::TYPE_CPU &&
|
||||
@@ -1220,6 +1221,7 @@ void CascadeClassifierImpl::detectMultiScaleNoGrouping( InputArray _image, std::
|
||||
!isOldFormatCascade() &&
|
||||
maskGenerator.empty() &&
|
||||
!outputRejectLevels;
|
||||
#endif
|
||||
|
||||
/*if( use_ocl )
|
||||
{
|
||||
@@ -1262,8 +1264,8 @@ void CascadeClassifierImpl::detectMultiScaleNoGrouping( InputArray _image, std::
|
||||
return;
|
||||
|
||||
// OpenCL code
|
||||
if( use_ocl && ocl_detectMultiScaleNoGrouping( scales, candidates ))
|
||||
return;
|
||||
CV_OCL_RUN(use_ocl, ocl_detectMultiScaleNoGrouping( scales, candidates ))
|
||||
|
||||
tryOpenCL = false;
|
||||
|
||||
// CPU code
|
||||
|
Reference in New Issue
Block a user