ocl: correct disabling of OpenCL code

This commit is contained in:
Alexander Alekhin
2015-06-19 20:52:14 +03:00
parent 190d00ea3e
commit 7213e5f68a
16 changed files with 127 additions and 18 deletions

View File

@@ -125,9 +125,10 @@ protected:
int yStep, double factor, std::vector<Rect>& candidates,
std::vector<int>& rejectLevels, std::vector<double>& levelWeights,
Size sumSize0, bool outputRejectLevels = false );
#ifdef HAVE_OPENCL
bool ocl_detectMultiScaleNoGrouping( const std::vector<float>& scales,
std::vector<Rect>& candidates );
#endif
void detectMultiScaleNoGrouping( InputArray image, std::vector<Rect>& candidates,
std::vector<int>& rejectLevels, std::vector<double>& levelWeights,
double scaleFactor, Size minObjectSize, Size maxObjectSize,
@@ -218,8 +219,10 @@ protected:
Ptr<MaskGenerator> maskGenerator;
UMat ugrayImage;
UMat ufacepos, ustages, unodes, uleaves, usubsets;
#ifdef HAVE_OPENCL
ocl::Kernel haarKernel, lbpKernel;
bool tryOpenCL;
#endif
Mutex mtx;
};