Ubuntu14.04 installation OPENCV3.0 process and problems encountered
[Email protected]
Http://www.cnblogs.com/mcjj
Machunjiej
June 14, 2017 22:38:23 My Computer environment: Ubuntu14.04lts + CUDA8.0 + CUDNN5.0 + Nvidia-367.44 driver + Opencv3.0-beta I am following this article: Ubuntu14.04 Installation Opencv3.0-linux System tutorial
first of all, there was a mistake at the beginning,Unsupported GPU architecture ' compute_11 ', workaround click here.
then, in the middle of time,You will also encounter an error that appears on the Graphcuts.cpp file, which is located at: Opencv-3.0.0-beta/modules/cuda/src/graphcuts.cpp after you open the file, change the following file: # Include "PRECOMP.HPP"//#if!defined (Have_cuda) | | Defined (Cuda_disabler) #if!defined (Have_cuda) | | Defined (Cuda_disabler) | | (cudart_version >= 8000) Save after changing, then recompile.
At the end of the day, the following error may appear:Error:cannot declare variable lsquo;orbrsquo; To is of the abstract terror:cannot declare variable ' orb ' to be of abstract type ' cv::orb The reason is that the Orb class can no longer be called this way, the workaround is as follows:
Opencvroot/samples/gpu/performance/tests.cpp found in OpenCV root directory
Modify the code as follows.
TEST (ORB)
{
Mat src = imread (Abspath (". /data/aloel.jpg "), Imread_grayscale);
if (Src.empty ()) Throw Runtime_error ("can ' t open: /data/aloel.jpg ");
Orb Orb (4000);
ptr<orb> ORB = orb::create (4000,1.2f,8,31,0,2,orb::harris_score,31,20);
Vector<keypoint> keypoints;
Mat descriptors;
Orb->detectandcompute (SRC, Mat (), keypoints, descriptors);
Orb (SRC, Mat (), keypoints, descriptors);
cpu_on;
Orb (SRC, Mat (), keypoints, descriptors);
Orb->detectandcompute (SRC, Mat (), keypoints, descriptors);
Cpu_off;
Cuda::orb_cuda D_orb;
Cuda::gpumat d_src (SRC);
Cuda::gpumat d_keypoints;
Cuda::gpumat d_descriptors;
D_orb (D_SRC, Cuda::gpumat (), d_keypoints, d_descriptors);
cuda_on;
D_orb (D_SRC, Cuda::gpumat (), d_keypoints, d_descriptors);
Cuda_off;
}
Here is the original address: http://www.68idc.cn/help/makewebs/asks/20150209215355.html I met basically these mistakes. Any new errors that you encounter will be added at any time. ================================2017 June 13 23:46:25 supplement ================================ Today in the virtual machine on their own computer installed a Ubuntu14.04, and then install OPENCV, follow the "Ubuntu14.04 installation OpenCV3.0" This tutorial, until make, the whole process did not have any problems, samples inside the program also tried, is functioning properly. Then installed the darknet, and then the OpenCV compiled, in the run YOLO test, the picture is normal bounce out, but there is a problem, is a hint below: Failed to load OpenCL runtime does not affect normal use, However, this prompt will always appear, enter a command in the terminal can be resolved: sudo apt-get updatesudo apt-get Install Ocl-icd-opencl-dev If this problem occurs under Windows, The following software can be installed:
Opencl_runtime_15.1_x86_setupSearch Opencl_runtime_15.1_x86_setup + Intel to find
= = Original ==ubuntu14.04 installation OPENCV3.0 process and problems encountered