Skip to content

Commit b2d8e8c

Browse files
committed
This statement was keeping HAAR cascades from leveraging opencl on nvidia devices. "localSize" on the featureEvaluator remains Size(0, 0) which sets the bool "use_ocl" to false. Adding this allows NVidia GPUs to leverage opencl HAAR Cascades
1 parent af8ed9d commit b2d8e8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/objdetect/src/cascadedetect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ bool HaarEvaluator::read(const FileNode& node, Size _origWinSize)
609609
localSize = lbufSize = Size(0, 0);
610610
if (ocl::haveOpenCL())
611611
{
612-
if (ocl::Device::getDefault().isAMD() || ocl::Device::getDefault().isIntel())
612+
if (ocl::Device::getDefault().isAMD() || ocl::Device::getDefault().isIntel() || ocl::Device::getDefault().isNVidia())
613613
{
614614
localSize = Size(8, 8);
615615
lbufSize = Size(origWinSize.width + localSize.width,

0 commit comments

Comments
 (0)