Opencl face detecion code in samples [closed]

asked 2013-07-04 11:41:16 -0500

UserOpenCV gravatar image

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 the Opencv with Opencl enabled.

1) I downloaded OPECL SDK by intel and installed it.

2) Using CMAKE I enabled "WITH_OPENCL" and builded opecv successfully. The "libopencv_ocl245.dll" got created.

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

I changed the flag as follows and I got the below error

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

>     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 in Intel cpu.

2) Can some one list what are the specifications needed to run the opencl face detection code.

3) Am I wrong anywhere in the above steps?

4) Only installing opencl SDK is enough? Or do I need to install some thing else?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-09-27 08:20:05.575632


As far as I know OpenCL is just another standard to use the power of GPGPU devices, that are not CUDA supported. So it first looks for usefull devices to process the code on, your CPU doesn't apply to that criteria, since it is your basic processing unit, and the OpenCL implementations are only for GPU processing. Do you even have a GPU processor?

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-05 05:46:15 -0500 )edit

@StevenPuttemans I have intel HD graphics card (internal) of type Intel(R) HD Graphics Family. So will Opencv + Opencl supports that.

UserOpenCV gravatar imageUserOpenCV ( 2013-07-05 06:43:30 -0500 )edit

The intel HD graphics card, which is internally located on your motherboards, doesn't support direct access for general purpose GPU programming. So OpenCV won't support that either. The CUDA/OpenCL implementations are for extra video cards, that support GPGPU processing.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-05 06:46:04 -0500 )edit

As per intel documentation it says as follows? "This includes both discrete GPUs (NVidia, AMD), as well as integrated chips(AMD APU and intel HD devices)" ? So If I need to run the OPENCL face detect in my intel machine what should I do?

UserOpenCV gravatar imageUserOpenCV ( 2013-07-05 07:16:21 -0500 )edit

Well as far as I get it, the OpenCV implementation doesn't have the intention to serve the integrated part ... but I am not sure of that. Guess you should look for someone with more OpenCL experience.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-05 07:20:45 -0500 )edit