Ask Your Question

getCudaEnabledDeviceCount() returns 0 ?!!

asked 2013-07-16 09:45:04 -0500

Farzan gravatar image


I have installed the pre-compiled OpenCV 2.4.6 and CUDA 5.0 with latest graphics drivers.

While I call the getCudaEnabledDeviceCount() it returns 0 and I can not use its functions. However, when I ran the deviceQuery test I saw that I have a compatible graphics card and every thing is OK! (The code successfully runs with CPU functions)

I wonder why openCV can not access my Graphic Card?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2013-07-16 11:29:39 -0500

Vladislav Vinogradov gravatar image

Pre-compiled OpenCV binaries were built without CUDA support. It you want to use CUDA functionality you have to build OpenCV from sources.

edit flag offensive delete link more


And this topics solution can help you with it if you get stuck :)

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-16 11:38:56 -0500 )edit

Thanks guys, this sounds strange, why they did such a thing?!!

Farzan gravatar imageFarzan ( 2013-07-17 17:41:40 -0500 )edit

Because building them with CUDA support, for every possible architecture, leads to giant downloads in dll's and lib's. Also, depending on your system you could specify which architecture your card uses and built it only for that, which speeds up the build process.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-07-18 02:02:44 -0500 )edit

Hmm... Thanks for the info @StevenPuttemans

Farzan gravatar imageFarzan ( 2013-07-19 12:41:40 -0500 )edit

Question Tools


Asked: 2013-07-16 09:45:04 -0500

Seen: 1,651 times

Last updated: Jul 16 '13