cuda support in standard libraries for OpenCV 3.0.0

asked 2015-08-19 16:44:10 -0600

Rolf gravatar image

I've tried to create a small sample application that calls a few cuda functions. The cv::cuda::getCudaEnabledDeviceCount() seems to be available in the import library for the opencv_world_300.dll but trying to call the cv::cuda::createCannyEdgeDetector() instantiation function gives first an error that CannyEdgeDetector is not a member of the cv::cuda:: namespace.

If I add the <opencv>\sources\modules\cudaimgproc\include\opencv2 to the <opencv>\build\include\opencv2\core\cuda directory and add an include then I can compile but the link fails with an unresolved external symbol for the cv::cuda::createCannyEdgeDetector().

Is this intended behavior and are those more advanced cuda functions only available with a self build OpenCV 3.0.0 module? Or did these simply fall off in the change to OpenCV 3.0.0?

edit retag flag offensive close merge delete

Comments

1

try a cerr << cv::getBuildInformation(); to see, what support was compiled in.

most likely you will have to build opencv from src with the cuda sdk present.

(afaik, the prebuilt binaries are fairly bare-metal)

berak gravatar imageberak ( 2015-08-20 00:11:52 -0600 )edit

Like @berak said, only the hardware detection functions for cuda are standard built-in. To have cuda support you need to built OpenCV from scratch. The decision to do this was done around version 2.4.9 because the binaries with support for every possible GPU architecture became just too large.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-08-20 02:51:38 -0600 )edit