Ubuntu 下搭建Opencv!
转载:http://hi.baidu.com/beizhengzsf/item/ffa1bac172c8272e47d5c05b
I tried to install the both opencv-2.3.0 and opencv-2.3.1 for several times and it never works, which disappointed me very much. Open a blog for this issue, hoping solve it one day.
I have tried the opencv-2.4.0, it works very well and seems that it does not show any error in my compilation process.
Issue 1. when using cmake, the result always gives:
"CUDA_TOOLKIT_ROOT_DIR not found or specified", CUDA is a parallel computing platform and programming model that enables dramatic increases in computing performance by harnessing the power of the graphics processing unit (GPU). It is only developed for NVdia GPU. However, it seems that not all PC will be equipped with that kind of GPU, theoretically, it is not necessary to install it and we make the option WITH_CUDA OFF. Also the opencv only support CUDA 4.0 now from the post bellow.
http://tech.groups.yahoo.com/group/OpenCV/message/85791
From below link, you can install CUDA 4.0 successfully
http://blog.ryant.org/2011/12/installing-cuda-toolkit-on-ubuntu-1110.html
Issue 2. ImportError: No module named sphinx:
Just copy the following line, then this problem disappear.
sudo apt-get install python-sphinx
Issue 3. ImportError: No module named numpy.distutils
sudo apt-get install python-numpy
Issue 4. JASPER (JASPER LIBRARY, JASPER_INCLUDE_ADDR)
sudo apt-get install libjasper-dev