Ask Your Question

Revision history [back]

Problem with Opencl implementation in Opencv 3.2

Hi all, I am trying to implement Opencl in OpenCV3.2 but i'm confused.

I have 2 graphic cards, ones for Intel and another is AMD,

  1. I download Intel Opencl SDK and install it.
  2. I build Opencv 3.2 using cmake with contrib module and without IPP.

my problem is in the setting system variable that how to do it. I searched google and find this similar question but not realize how to do it. for example they said set system variable as below : OPENCV_OPENCL_DEVICE=":GPU:0". is this means that create a new system variable or user variable? and then?

I also run this simple program and it say that I have opencl:

#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/ocl.hpp>

#include <iostream>
#include <conio.h>

 using namespace std;
 using namespace cv;


 void main()
 {

if (!cv::ocl::haveOpenCL())
{
    cout << "OpenCL is not avaiable..." << endl;
    return;
}


else
{
    cout << "OpenCL is avaiable" << endl;
}
_getch();   

   }

OS: Win7(x64), OpenCV 3.2,Visual Studio 2012

best regard.