Ask Your Question
1

What are the equivalent functions of cv::ocl in 3.0?

asked 2015-09-02 21:56:15 -0600

biaspoint gravatar image

updated 2015-09-03 08:23:35 -0600

For whatever reason I cannot access some functions of cv::ocl, such as cv::ocl::convertfromimage. The compiler is telling me it is not a function of cv::ocl, and when I look at ocl.cpp it isn't there, but I've seen it in the online repositories for ocl.cpp... why would it not show up in my local installation? Is there something I need to do when I build 3.0? an option I missed, or is there an equivalent function that does the same thing? Thanks!

I noticed in the build info that OpenCL is using a 1.2 folder from within OpenCV 3.0, I could not find a way to specify another location... does that need to be changed?

Here is the build information:videoio: Removing WinRT API headers by default

General configuration for OpenCV 3.0.0 ===================================== Version control: unknown

Platform: Host: Linux 3.19.0-25-generic x86_64

CMake: 2.8.12.2

CMake generator: Unix Makefiles

CMake build tool: /usr/bin/make

Configuration: Release

C/C++:

Built as dynamic libs?: YES

C++ Compiler: /usr/bin/c++ (ver 4.8.4)

Linker flags (Debug):

Precompiled headers: YES

OpenCV modules: To be built: hal core flann imgproc ml photo video imgcodecs shape videoio highgui objdetect superres ts features2d calib3d stitching videostab Disabled: world Disabled by dependency: - Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python2 python3 viz

Other third-party libraries: Use OpenCL: YES

OpenCL:

Version: dynamic

Include path: /home/xxxxx/opencv-3.0.0/3rdparty/include/opencl/1.2

Use AMDFFT: NO

Use AMDBLAS: NO

Tests and samples:

Tests: YES

Performance tests: YES

C/C++ Examples: YES

Install path: /usr/local

cvconfig.h is in: /home/xxxxx/opencv-3.0.0/build

edit retag flag offensive close merge delete

Comments

1

can you give your version using opencv function getBuildInformation

LBerger gravatar imageLBerger ( 2015-09-03 01:18:50 -0600 )edit

almost all ocl handling is done via TAPI / UMat in 3.0.

have a look at the opencl section here , also the opencl and tapi samples

berak gravatar imageberak ( 2015-09-03 01:36:22 -0600 )edit

Thanks... I've looked through those, but I still see that the functions are available at least in some versions of ocl.cpp on-line, so I'm wondering why those functions did not make it in to my installed ocl.cpp. Thanks, I will look through those pages again and see if there is something I missed, Thanks!

biaspoint gravatar imagebiaspoint ( 2015-09-03 08:25:11 -0600 )edit

The one interop example in fact calls cv::ocl::convertFromImage(image, u); directly, so there has to be something that I am doing wrong to prohibit it from be there. I'm using this call:

#include <opencv2/core/ocl.hpp>

and it is finding that ocl.hpp at /usr/local/include/opencv2

I receive this error:

/home/xxxxx/main.cpp:252: error: 'convertFromImage' is not a member of 'cv::ocl'
  cv::ocl::convertFromImage(IDKmem, Umike);
  ^
biaspoint gravatar imagebiaspoint ( 2015-09-03 08:26:56 -0600 )edit
1

can you make a git pull?

LBerger gravatar imageLBerger ( 2015-09-03 08:54:01 -0600 )edit

I can try, I built it using just the downloaded files... I sense that is not the best way to build it.

biaspoint gravatar imagebiaspoint ( 2015-09-03 20:02:59 -0600 )edit
1

Just to say I think that this function was added 19 jun 2015

LBerger gravatar imageLBerger ( 2015-09-04 01:06:37 -0600 )edit

You were right... how many hours I spent on that!! now of course I'm getting a segmentation fault with that function anyway... the work never ends! Thanks!

biaspoint gravatar imagebiaspoint ( 2015-09-04 09:50:45 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-09-10 21:14:34 -0600

biaspoint gravatar image

updated 2015-09-10 21:15:04 -0600

@LBerger was correct this functionality was not included in my version of OpenCV 3.0. I downloaded the most recent version and the functions were there. Additionally if you plan on using this function, you must first call:

  cv::ocl::attachContext

Thanks for the help!

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-09-02 21:56:15 -0600

Seen: 1,349 times

Last updated: Sep 10 '15