Enable GPU module in opencv

Source: Internet
Author: User
Tags change settings

1. The GPU and OCL modules are not enabled for the libraries provided in the Development Kit provided by opencv. Although there are *** GPU. lib/*** GPU. DLL files, they cannot be used. If you call GPU: getcudaenabledevicecount (), return 0. To enable this function, you need to re-compile the library of opencv.

2. Refer to examples,
Qt (GUI), Cuda tool kit, Python and other programs.

3. When using cmake to generate a vs project, you need to enable the Cuda function. You can choose other functions. You need to use cmake to locate your location of TBB, QT, Cuda, and python.

4. If you want to compile a static library, you need to change the vs project. The change settings in different directories are different. The output is. for the EXE project, modify use of MFC to use MFC in a static library and modify it to/MT (d debug or release) in the Runtime Library in C/C ++ ), the output is. for DLL projects, you need to change the output. lib and modify configuration type to static library (. lib)

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.