run opencl app on iMX6Q: openCV error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

run opencl app on iMX6Q: openCV error

806 次查看
Gavin
Contributor I

we run the opencl test program(we want use GPU to accelate image processing speed) on the imx6q platform BSP Linux 3.14.52, and get the error infomation below(the same error happened in BSP Linux 4.1.15):
In image read [1520 x 932]
loops: 0, detect face using gpu...

OpenCV Error: Assertion failed (localThreads[0] * localThreads[1] * localThreads[2] <= kernelWorkGroupSize) in openCLVerifyKernel, file /home/tangb/yocto/imx-3.14.52-1.1.0_ga/build-fb/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/opencv/2.4.11+gitAUTOINC+2c9547e314-r0/git/modules/ocl/src/cl_operations.cpp, line 349
terminate called after throwing an instance of 'cv::Exception'
what(): /home/tangb/yocto/imx-3.14.52-1.1.0_ga/build-fb/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/opencv/2.4.11+gitAUTOINC+2c9547e314-r0/git/modules/ocl/src/cl_operations.cpp:349: error: (-215) localThreads[0] * localThreads[1] * localThreads[2] <= kernelWorkGroupSize in function openCLVerifyKernel

Aborted
root@imx6qsabresd:~#

And we test function is:

void detect( Mat& img, vector<Rect>& faces,
ocl::OclCascadeClassifier& cascade,
double scale, bool calTime)
{
printf("detect face using gpu...\n\n");
ocl::oclMat image(img);
ocl::oclMat gray, smallImg( cvRound (img.rows/scale), cvRound(img.cols/scale), CV_8UC1 );
if(calTime) workBegin();
ocl::cvtColor( image, gray, CV_BGR2GRAY );
ocl::resize( gray, smallImg, smallImg.size(), 0, 0, INTER_LINEAR );
ocl::equalizeHist( smallImg, smallImg );

cascade.detectMultiScale( smallImg, faces, 1.1,
3, 0
|CV_HAAR_SCALE_IMAGE
, Size(30,30), Size(0, 0) );
printf("#### 6\n");
printf("detect %d faces:\n",faces.size());
for(int i = 0;i < faces.size();i++){
printf("face %d : (%d,%d,%d,%d)\n",i,faces[i].x,faces[i].y,faces[i].width,faces[i].height);
}
if(calTime) workEnd();
}

someone can tell us how to do?

0 项奖励
回复
1 回复

573 次查看
b36401
NXP Employee
NXP Employee

Please look at this document regarding to face detection:
https://community.nxp.com/message/1026448

And this one is related to i.MX6:
http://imxcv.blogspot.com/2014/02/building-opencv-24x-for-freescales-imx6.html

Have a great day,
Victor

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复