title: Which opencv cuda library do I need to run a simple opencv cuda program?
body: <p>I have built opencv with cuda support using visual studio 2010 on win7 x64. To run a simple opencv cuda program I wrote this code and placed output released exe file to <code>opencv\built\install\x64\vc10\bin</code> near all lib and dll files.</p>
  
  <p>But when I run the exe file it produce error <code>No CUDA support  (The library is compiled without CUDA support)</code></p>
  
  <p>Here is my code:</p>
  
  <pre><code>#include &lt;opencv2/opencv.hpp&gt;
  #include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;chrono&gt;
  #include &lt;ctime&gt;
  #include &lt;opencv2/core/cuda.hpp&gt;
  
  using namespace cv;
  using namespace cv::cuda;
  using namespace std;
  
  string source_image_addr, gray_image_addr="", source_image_name="";
  
  int convert2gray()
  {
      Mat image;
      GpuMat d_image, d_gray_image;
      image = imread((char *)source_image_addr.c_str(), IMREAD_COLOR);
  
      if(image.empty())
      {
          cout&lt;&lt;"Could not open or find the image"&lt;&lt;std::endl;
          return -1;
      }
  
      CV_Assert(image.depth() != sizeof(unsigned char));
      std::chrono::time_point&lt;chrono::system_clock&gt; start, end;
      start = chrono::system_clock::now();
      d_image.upload(image);
      cuda::cvtColor(d_image, d_gray_image, CV_RGB2GRAY);
      Mat gray_image(d_gray_image);
      end = chrono::system_clock::now();
      chrono::duration&lt;double&gt; elapsed = end - start;
      cout&lt;&lt;"for image["&lt;&lt;image.cols&lt;&lt;"*"&lt;&lt;image.rows&lt;&lt;"] elapsed = "&lt;&lt;elapsed.count()&lt;&lt;endl;
  
      //namedWindow("Gray Window", WINDOW_AUTOSIZE);
      //imshow("Gray Window", gray_image);
      imwrite((char *)gray_image_addr.c_str(), gray_image);
  }
  
  int main(int argc, char** argv)
  {
      if(argc &gt;= 2)
      {
          source_image_addr = argv[1];
          source_image_name = source_image_addr.substr(0, source_image_addr.find_last_of("."));
  
          if(argc &gt;= 3)
              gray_image_addr = argv[2];
          else
              gray_image_addr = source_image_name + "-gray.jpg";
  
          if(!convert2gray())
              return -1;
      }
      else
      {
          cout&lt;&lt;"Usage: convert2gray ImageAddress [gray_image_addr]"&lt;&lt;endl;
          return -1;
      }
  
      //waitKey(0);
      return 0;
  }
  </code></pre>
  
  <p>I have placed <code>opencv_world300.dll</code> in the same folder.</p>
  
  <p><strong>Edit:</strong>
  Here is outout for <code>std::cout &lt;&lt; cv::getBuildInformation() &lt;&lt; std::endl;</code>:</p>
  
  <pre><code>  videoio: Removing WinRT API headers by default
  
  General configuration for OpenCV 3.0.0 =====================================
    Version control:               3.0.0
  
    Platform:
      Host:                        Windows 6.1 AMD64
      CMake:                       2.8.11.2
      CMake generator:             Visual Studio 11 Win64
      CMake build tool:            C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe
      MSVC:                        1700
  
    C/C++:
      Built as dynamic libs?:      YES
      C++ Compiler:                C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin/x86_amd64/cl.exe  (ver 17.0.50727.1)
      C++ flags (Release):         /DWIN32 /D_WINDOWS /W4 /GR /EHa  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /wd4251 /wd4324 /MP8  /MD /O2 /Ob2 /D NDEBUG  /Zi
      C++ flags (Debug):           /DWIN32 /D_WINDOWS /W4 /GR /EHa  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /wd4251 /wd4324 /MP8  /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 
      C Compiler:                  C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin/x86_amd64/cl.exe
      C flags (Release):           /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi    /MP8  /MD /O2 /Ob2 /D NDEBUG  /Zi
      C flags (Debug):             /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi    /MP8  /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 
      Linker flags (Release):      /machine:x64   /INCREMENTAL:NO  /debug
      Linker flags (Debug):        /machine:x64   /debug /INCREMENTAL 
      Precompiled headers:         YES
      Extra dependencies:
      3rdparty dependencies:       ippicv
  
    OpenCV modules:
      To be built:                 hal core flann imgproc ml photo video imgcodecs shape videoio highgui objdetect superres ts features2d calib3d stitching videostab world
      Disabled:                    -
      Disabled by dependency:      -
      Unavailable:                 cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python2 viz
  
    Windows RT support:            NO
  
    GUI: 
      QT:                          NO
      Win32 UI:                    YES
      OpenGL support:              NO
      VTK support:                 NO
  
    Media I/O: 
      ZLib:                        build (ver 1.2.8)
      JPEG:                        build (ver 90)
      WEBP:                        build (ver 0.3.1)
      PNG:                         build (ver 1.5.12)
      TIFF:                        build (ver 42 - 4.0.2)
      JPEG 2000:                   build (ver 1.900.1)
      OpenEXR:                     build (ver 1.7.1)
      GDAL:                        NO
  
    Video I/O:
      Video for Windows:           YES
      DC1394 1.x:                  NO
      DC1394 2.x:                  NO
      FFMPEG:                      YES (prebuilt binaries)
        codec:                     YES (ver 55.18.102)
        format:                    YES (ver 55.12.100)
        util:                      YES (ver 52.38.100)
        swscale:                   YES (ver 2.3.100)
        resample:                  NO
        gentoo-style:              YES
      OpenNI:                      NO
      OpenNI PrimeSensor Modules:  NO
      OpenNI2:                     NO
      PvAPI:                       NO
      GigEVisionSDK:               NO
      DirectShow:                  YES
      Media Foundation:            NO
      XIMEA:                       NO
      Intel PerC:                  NO
  
    Other third-party libraries:
      Use IPP:                     8.2.1 [8.2.1]
           at:                     C:/buildslave64/win64_amdocl/master_PackSlave-win64-vc11-shared/opencv/3rdparty/ippicv/unpack/ippicv_win
      Use IPP Async:               NO
      Use Eigen:                   NO
      Use TBB:                     NO
      Use OpenMP:                  NO
      Use GCD                      NO
      Use Concurrency              YES
      Use C=:                      NO
      Use pthreads for parallel for:
                                   NO
      Use Cuda:                    NO
      Use OpenCL:                  YES
  
    OpenCL:
      Version:                     dynamic
      Include path:                C:/buildslave64/win64_amdocl/master_PackSlave-win64-vc11-shared/opencv/3rdparty/include/opencl/1.2 C:/Program Files (x86)/AMD/clAmdFft/include C:/Program Files (x86)/AMD/clAmdBlas/include
      Use AMDFFT:                  YES
      Use AMDBLAS:                 YES
  
    Python 2:
      Interpreter:                 c:/python27_x64/python.exe (ver 2.7.5)
  
    Python 3:
      Interpreter:                 NO
  
    Python (for build):            c:/python27_x64/python.exe
  
    Java:
      ant:                         C:/Program Files (x86)/apache-ant/bin/ant.bat (ver 1.9.2)
      JNI:                         C:/Program Files/Java/jdk1.6.0_45/include C:/Program Files/Java/jdk1.6.0_45/include/win32 C:/Program Files/Java/jdk1.6.0_45/include
      Java wrappers:               NO
      Java tests:                  NO
  
    Matlab:
      mex:                         NO
  
    Tests and samples:
      Tests:                       NO
      Performance tests:           NO
      C/C++ Examples:              NO
  
    Install path:                  C:/buildslave64/win64_amdocl/master_PackSlave-win64-vc11-shared/build/install
  
    cvconfig.h is in:              C:/buildslave64/win64_amdocl/master_PackSlave-win64-vc11-shared/build/opencv_build
  -----------------------------------------------------------------
  
  
  Could not open or find the image
  </code></pre>