- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, there! I tried to use SIFT algorithm with OpenCL in OpenCV, However,I found it's difficult to use custom *.cl in OpenCV, I just found surf.cl in ...\opencv_contrib-master\modules\xfeatures2d\src\cuda\surf.cl, and there isn't have corresponding example(just has ...\sources\samples\gpu\surf_keypoint_matcher.cpp) So the problem is: * Are there anyone who running SIFT algorithm in OpenCV using OpenCL successfully? coud you give me some advice(OpenCV 2.4.X is also OK); * How to use surf.cl which given by OpenCV3.0? * If the above algorithm are very complex, could you give me some simple algorithm code examples with custom OpenCL? Many thanks!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your great question -- we may need more examples/documentation for this topic. As a quick answer though, you can try this:
1. Make sure OpenCL is installed. (I used Linux OpenCL in Media Server Studio)
2. Download OpenCV 3.0 source and compile with OpenCL and opencv-world
3. This test program seems to work: http://stackoverflow.com/questions/28529458/how-to-launch-custom-opencl-kernel-in-opencv-3-0-0-ocl
(Needs a few small changes to the kernel parameters)
__kernel void shift( image2d_t src, float shift_x, float shift_y, global uchar* dst, int dst_step, int dst_offset, int dst_rows, int dst_cols)
4. Compile and link: (Makefile)
all: g++ -I /usr/local/include opencv_cust_ocl.cpp -L/usr/local/lib -lopencv_world -o opencltest

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page