Include OpenCV in OpenCL kernel code

Is it possible to include opencv function in cl opencl kernel code.I tried to add the opencv header path in clBuildProgram using -I but its throwing error after including the header path.

I think that is not possible. OpenCV include files are for the shared libraris for the CPU only. If you want to use OpenCV with OpenCL what you can do is to enable the OCL extension in the openCV installation. If you are installing from source code, at the moment of configuring OpenCV with cmake, enable the OCL module by typing WITH_OPENCL=ON and check if it finds the OpenCL libraries (I had to do a small change to the cmake script to find AMDAPP).