OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1720 Discussions

How to compile a OpenCL host code which also includes OpenCV functions for reading an image ?




I want to add OpenCV code for reading my image in an OpenCL application which is supposed to run on DE10 Nano Board by Terasic Thus, I am using the INTEL FPGA SDK for OpenCL .


I have OpenCV installed on my P.C. The same snippet of OpenCV code for image reading works fine alone (i.e. without OpenCL code => just reading an image and displaying it).


However, when I include it with the OpenCL code it is giving errors while compiling. I have slightly modified the Makefile provided by Intel in their vector add example (for x64)


The modifications done include addition of variables OCV_INCLUDES, OCV_LIBS, OCV_LIBDIRS which specify the library path where OpenCV is installed. The final makefile that I am using is attached below. Also, the screen shot of the error which is displayed after running make command is attached (error).


Please let me know how to compile both OpenCL and OpenCV together. Also, note that I am just using OpenCV to read images from the camera and then I want to pass the image pixels to the OpenCL code to perform convolution operation.


Any help in this regard is highly appreciated.


Thanks and Regards

Hrishikesh Kale

0 Kudos
0 Replies