OpenCL and OpenCV conflict

In our project, we decided to port OpenCL to improve image processing. After migration, the project didn't work. So, we tried the minimal code from OpenCL and determined that if OpenCV is in use, the project doesn't work.

Example

int main(){
  cv::Mat mat;

  std::vector<cl::Platform> all_platforms;
  cl::Platform::get(&all_platforms);

  std::cout <<"fertig.";
  return 0;
}

      

crash in cl :: Platform :: get ().

terminate called after throwing an instance of 'cl::Error'
what():  clGetPlatformIDs

      

I compiled it with

gcc test.cpp -lOpenCl -lopencv_core -lopencv_highgui

      

If I issue this little command line "cv :: Mat mat" everything is fine. So what's the problem?

I am using Intel OpenCl Driver: 1.2-4.4.0.117.

+3
c ++ opencv opencv3.0


source to share


No one has answered this question yet

Check out similar questions:

338
Simple OCR character recognition in OpenCV-Python
8
Disable OpenCL in OpenCV completely
3
Error adding OpenCV 3.0 OpenCL UMat
2
OpenCV 3 OpenCL UMat Functions
2
OpenCV via NuGet packages with Visual Studio 2015, how to configure?
1
error: 'vector' does not name type / error: expected ',' or '...' before '<' token / error: 'vector' was not declared
1
OpenCV: Failed to load OpenCL runtime
0
OpenCV for Android - OpenCL support
0
How to load OpenCL buffer in OpenCV cv :: umat using Transparent API?
0
trying to compile OpenCL 1.2 example



All Articles
Loading...
X
Show
Funny
Dev
Pics