Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I tried running the OpenCL basic face detector code which is in "samples/ocl/facedetect.cpp". Before compiling the face detect code I followed the below steps to compile OpenCV with OpenCL enabled.

1) I downloaded OpenCL SDK by Intel from here and installed it.

2) Using CMAKE, I enabled "WITH_OPENCL" and built OpenCV successfully. The "libopencv_ocl245.dll" got created.

I tried compiling the face detection code and it compiled successfully. But int devnums = cv::ocl::getDevice(oclinfo, ocl::CVCL_DEVICE_TYPE_DEFAULT); always returns "0".

I changed the following flag and I got the below error:

Flag:

int devnums = cv::ocl::getDevice(oclinfo, ocl::CVCL_DEVICE_TYPE_DEFAULT);

Error:

>     0x06670A02 (0x08730080 0x00000000 0x00000018 0x0A3121D8)0x06670A02 (0x08F70080 0x00000000 0x00000024 0x0A0DC008)0x06670A02 (0x097B0080
> 0x00000000 0x00000000 0x0028E48C) <unknownmodule>
>                                                                                                                                                                                               <unknown module>
>                                                                                                                                                                                                               0x630E6900 (0x0A3121C8 0x00000000 0x00000000 0x00000018)0x630E6900
> (0x0A0DBFF8 0x00000000 0x00000000 0x00000024) <unknown module>
>                                                                                                                   0x630E6900 (0x0028E47C 0x00000000 0x00000000 0x00000000),
> opencl_mic_printf() + 0x12130 bytes(s), opencl_mic_printf() + 0x12130
> bytes(s), opencl_mic_printf() + 0x12130 bytes(s)  ....

My questions are below:

1) Is ther any hardware dependency for running opencl face detection code? I am running the code on an Intel CPU.

2) Can some one list what are the specifications needed to run the OpenCL face detection sample code?

3) Am I wrong anywhere in the above steps?

4) Is only installing the OpenCL SDK enough? Or do I need to install something else?

share|improve this question

This question has an open bounty worth +50 reputation from 2vision2 ending in 2 days.

This question has not received enough attention.

Please have a look at the above points, my intention is to run a basic Opencl face detection code with Opencv in windows. I use Mingw compiler. I tried with both AMD and ?Intel SDK's.

1 Answer

Are you possibly using OpenCL 1.1 instead of 1.2? Or perhaps an Intel CPU that is only compatible with OpenCL 1.1? OpenCV needs the OpenCL 1.2 files and an OpenCL 1.2 compatible device to run. Judging by the fact that your using an Intel CPU, i'm probably going to be wrong on this answer since most Intel CPU's would be compatible with OpenCL 1.2, but its worth a look. Another possibility is that your default Open CL device is your GPU, which if its from Nvidia, probably isn't compatible with OpenCL 1.2.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.