Cómo instalar OpenCV (exactamente 2.3. *, No 2.1. *) Con enlaces de python en Ubuntu (o generalmente, en Linux)? He visto algunos manuales en instalaciones de Windows, pero ninguno para Linux. He leído y utilizado instructions from willow garage site:Configuración de OpenCV 2.3 con enlaces de python en ubuntu
wget downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.3.1/OpenCV-2.3.1a.tar.bz2
tar -xvf OpenCV-2.3.1a.tar.bz2
cd OpenCV-2.3.1/
mkdir release
cd release
cmake -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=OFF -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON ..
make
sudo make install
Todo parece estar bien, excepto que make install
de salida no menciona pitón. Después de que yo estoy tratando de importar el módulo OpenCV en REPL pitón:
~$ python
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy # so numpy is installed
>>> import cv
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named cv
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named cv2
¿Qué estoy haciendo mal?
En caso de que la gente tropiece con esto, en Ubuntu simplemente instale el paquete 'python-opencv' si no necesita usar las versiones más recientes. – letmaik