I want to use OpenCL for face recognition enhancement.
I am using code OpenCV-2.x from OpenCV documentation:
VideoCapture vcap(...);
ocl::OclCascadeClassifier fd("haar_ff.xml");
ocl::oclMat frame, frameGray;
Mat frameCpu;
vector<Rect> faces;
for(;;){
// processing loop
vcap >> frameCpu;
frame = frameCpu;
ocl::cvtColor(frame, frameGray, BGR2GRAY);
ocl::equalizeHist(frameGray, frameGray);
fd.detectMultiScale(frameGray, faces, ...);
// draw rectangles
// show image
That code compiles well, but program don't work with error:
OpenCV Error: Assertion failed (localThreads[0] * localThreads[1] * localThreads[2] <= kernelWorkGroupSize) in openCLVerifyKernel,
file /root/Downloads/opencv-2.4.9/modules/ocl/src/cl_operations.cpp, line 349
terminate called after throwing an instance of 'cv::Exception'
what(): /root/Downloads/opencv-2.4.9/modules/ocl/src/cl_operations.cpp:349:
error: (-215) localThreads[0] * localThreads[1] * localThreads[2] <= kernelWorkGroupSize in function openCLVerifyKernel
My board is imx6q Saber Lite with Ubuntu Xenial for i.MX6/7 boards August 2016 (kernel 4.1.15) image.
I can't find how to resolve this problem. And if it's not possible at all to use OpenCL, there is a question: how can I speed up a face recognition on imx6q Saber Lite?