Ask Your Question
0

BoW categorization - CV_OpenCLInitError (OpenCL not available) [SOLVED]

asked 2014-02-08 10:08:57 -0500

mnieme gravatar image

updated 2014-02-13 09:32:34 -0500

Hello there,

I started diving into visual bag of words categorization. There is very good sample code in samples folder. I compiled the code and put it to run. Everything gone fine before SVM training, where I got the following error:

OpenCV Error: Gpu API call (-1001) in initializeOpenCLDevices, file opencv-2.4.8/modules/ocl/src/cl_context.cpp, line 455 OpenCV Error: Unknown error code -221 (OpenCL not available) in getContext, file opencv-2.4.8/modules/ocl/src/cl_context.cpp, line 670 terminate called after throwing an instance of 'cv::Exception' what(): opencv-2.4.8/modules/ocl/src/cl_context.cpp:670: error: (-221) OpenCL not available in function getContext

I used following libs in a Mafefile:

-lopencv_core -lopencv_ocl -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann -lopencv_nonfree

Does anybody know what is wrong?

Cheers!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-02-13 09:31:59 -0500

mnieme gravatar image

I Solved the problem. I just disabled OpenCl.

Hope that helps someone:

cmake -D WITH_OPENCL=OFF

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2014-02-08 10:08:57 -0500

Seen: 452 times

Last updated: Feb 13 '14