How to compile OpenCV without CUDA support

OpenCV can be compiled from source easily on Ubuntu as explained here. By default, if you have CUDA installed on your Ubuntu, OpenCV will compiled with CUDA support enabled. This can increase the compilation time of OpenCV from a few minutes to several hours! If you don’t need the CUDA support and don’t want to wait that long to compile OpenCV, then it might be better to compile OpenCV with CUDA support turned off.

To disable CUDA support in OpenCV, add -D WITH_CUDA=OFF to the cmake compilation string used to compile OpenCV.

Tried with: CUDA 5.0, OpenCV 2.4.9 and Ubuntu 12.04 LTS


One thought on “How to compile OpenCV without CUDA support”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s