Results 1 to 4 of 4

Thread: OpenCV Libraries within .cl Files

  1. #1
    Junior Member
    Join Date
    Sep 2011
    Posts
    5

    OpenCV Libraries within .cl Files

    Hi,

    So I've an application written in C++ that makes use of the OpenCV libraries to do some video processing. I'm interested in using OpenCL to achieve some parallelism to improve performance.

    Is it possible to use OpenCV libraries within .cl files? Before trying to do anything, I just tried adding this include to my .cl file from a simple Hello World application. I received the error below upon running it.

    Code :
    #include <cv.h>
     
    #pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable
    __constant char hw[] = "Hello World\n";
    __kernel void hello(__global char * out)
    {
        size_t tid = get_global_id(0);
        out[tid] = hw[tid];
    }

    Code :
    ERROR: Kernel::Kernel() (-46)

    I have included all the necessary paths/libraries in my build settings for both OpenCL and OpenCV. Any help would be appreciated!

  2. #2
    Junior Member
    Join Date
    Sep 2011
    Posts
    1

    Re: OpenCV Libraries within .cl Files

    have you appropriately compiled the file with the make command?

  3. #3
    Senior Member
    Join Date
    May 2010
    Location
    Toronto, Canada
    Posts
    845

    Re: OpenCV Libraries within .cl Files

    I'm sorry. It's not possible to link against external libraries inside a kernel program. In particular, you can't call OpenCV functions inside an OpenCL kernel.
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

  4. #4
    Junior Member
    Join Date
    Sep 2011
    Posts
    5

    Re: OpenCV Libraries within .cl Files

    Thanks for the replies. I am now aware of that and am looking into converting the frames into cl::Image2D.

Similar Threads

  1. OpenCL module for OpenCV
    By bitwangyaoyao in forum OpenCL
    Replies: 4
    Last Post: 08-22-2012, 02:15 PM
  2. OpenML vs OpenCV
    By ttykkala in forum OpenML Coding & Technical Issues
    Replies: 1
    Last Post: 05-27-2005, 01:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •