I am using opencv 3.0.0 in ubuntu 14.04. I install the AMD Catalyst Video Driver to use OpenCV with OpenCL.
The /etc/OpenCL/vendor have "amdocl32.icd amdocl64".icd with "libamdocl32.so" and "libamdocl64.so".
In the opencv cmake file, the OpenCV appears as:
-- 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
-- OpenCL:
-- Version: dynamic
-- Include path: /home/eduardo/Install-OpenCV/Ubuntu/OpenCV/opencv-3.0.0/3rdparty/include/opencl/1.2
-- Use AMDFFT: NO
-- Use AMDBLAS: NO
-- Use OpenCL: YES
When I include the ocl.hpp file in my projet (#include ). The compiler return his message:
In file included from main.cpp:11:0:
/usr/include/opencv2/ocl/ocl.hpp: In member function ‘cv::ocl::Hamming::ResultType cv::ocl::Hamming::operator()(const unsigned char*, const unsigned char*, int) const’:
/usr/include/opencv2/ocl/ocl.hpp:1170:46: error: ‘normHamming’ was not declared in this scope
return normHamming(a, b, size);
^
/usr/include/opencv2/ocl/ocl.hpp:1170:46: note: suggested alternative:
In file included from /usr/local/include/opencv2/core/base.hpp:56:0,
from /usr/local/include/opencv2/core.hpp:54,
from /usr/local/include/opencv2/core/core.hpp:48,
from /usr/include/opencv2/ocl/ocl.hpp:50,
from main.cpp:11:
/usr/local/include/opencv2/hal.hpp:70:5: note: ‘cv::hal::normHamming’
int normHamming(const uchar* a, const uchar* b, int n, int cellSize);
^
In file included from main.cpp:11:0:
/usr/include/opencv2/ocl/ocl.hpp: At global scope:
/usr/include/opencv2/ocl/ocl.hpp:1932:9: error: expected class-name before ‘{’ token
{
^
/usr/include/opencv2/ocl/ocl.hpp:1950:9: error: expected class-name before ‘{’ token
{
^
/usr/include/opencv2/ocl/ocl.hpp:1956:23: error: ‘CvSVMParams’ has not been declared
CvSVMParams params=CvSVMParams());
^
/usr/include/opencv2/ocl/ocl.hpp:1956:54: error: ‘CvSVMParams’ was not declared in this scope
CvSVMParams params=CvSVMParams());
^
make: *** [main.o] Error 1`
I need test the erode and dilate filter on GPU.
Do someone know why is this happening?