opencv3.2 dnn module problem

asked 2017-01-12 22:16:44 -0600

I tried to try out the tutorial provided of dnn module using Caffe framework models, the link is http://www.docs.opencv.org/trunk/d5/de7/tutorial_dnn_googlenet.html (www.docs.opencv.org/trunk/d5/de7/tuto...)

However, when I run the source code I got the following error in console:

OpenCV Error: Assertion failed (clSetKernelArg_pfn(p->handle, (cl_uint)i, arg.sz, arg.obj == 0) in cv::ocl::Kernel::set, file E:\opencv_root\opencv\modules\core\src\ocl.cpp, line 3445

OpenCV Error: Assertion failed (The following error occured while making forward() for layer "pool1/3*3_s2"): OpenCV Error: Assertion failed (clSetKernelArg_pfn(p->handle, (cl_uint)i, arg.sz, arg.obj == 0) in cv::ocl::Kernel::set, file E:\opencv_root\opencv\modules\core\src\ocl.cpp, line 3445

Could somebody help me find why this happened? I found the file ocl.cpp is related to openCL, is it because my embedded intel graphic card's driver isn't compatible?

Thank you very much

edit retag flag offensive close merge delete

Comments

" is it because my embedded intel graphic card's driver isn't compatible?" -- reasonable suspect, imho.

can you try to disable opencl in that program by:

#include <opencv2/core/ocl.hpp>
ocl::setUseOpenCL(false); // like 1st line in main()
berak gravatar imageberak ( 2017-01-13 01:51:38 -0600 )edit

Thank you berak, It worked! As far as I have heard, opencl is not very good compare with cuda about the compatibility issues, is it right?

chinesealex210 gravatar imagechinesealex210 ( 2017-01-13 08:00:03 -0600 )edit

glad to hear that !

but i can't answer this question, no exp. with cuda at all.

berak gravatar imageberak ( 2017-01-13 08:21:21 -0600 )edit