First, install opencv correctly and pass the test.
I understand that the GPU environment configuration consists of three main steps.
1. Generate the associated file, that is, makefile or project file.
2. compile and generate library files related to hardware usage, including dynamic and static library files.
3. Add the generated library file to the program. The addition process is similar to that of the opencv library.
For more information, see:
Http://wenku.baidu.com/link? Url = GGDJLZFwhj26F50GqW-q1ZcWek-QN2kAgVJ5SHrQcmte-nx9-GyIUKxGwIvtzJ_WoBddvasI7gv59BBGqzBykxTAnenbwId3VTegc3ayX1q
Http://blog.csdn.net/fengbingchun/article/details/9831837
Http://blog.csdn.net/quanquanyu/article/details/8917765
According to references, the Cuda and opencl environments are configured at the same time. I only run the test program. After the configuration is complete, the getcudaenableddevicecount () output is 1.
During step 4 Compilation, there will be errors. I don't care, I will continue to do it, and finally the test is successful.