için ekstra modüllerle birlikte yükleyin (daha fazla) Python için OpenCV 3.0'ı ekstra paket (sift, sörf ...) ile birlikte yüklemeyi denedim ama her zaman başarısız olurum. sıkışmak.OpenCV 3.0'ı python
cd git
git clone https://github.com/Itseez/opencv_contrib.git
cd ..
wget https://github.com/Itseez/opencv/archive/3.0.0-beta.zip
unzip 3.0.0-beta.zip
cd opencv-3.0.0-beta/
mkdir release
cd release/
workon OCR
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/home/jbd/src/opencv-3.0.0b -D OPENCV_EXTRA_MODULES_PATH=/home/jbd/git/opencv_contrib/modules -D BUILD_opencv_python3=ON -D PYTHON2_EXECUTABLE=/home/jbd/.virtualenv/OCR/bin/python -D PYTHON_INCLUDE_DIR=/home/jbd/.virtualenv/OCR/include/python2.7 -D PYTHON_LIBRARY=/usr/lib/libpython2.7.so -D PYTHON2_NUMPY_INCLUDE_DIRS=/home/jbd/.virtualenv/OCR/local/lib/python2.7/site-packages/numpy ..
make -j7
make install
cd ~/.virtualenv/OCR/lib/python2.7/site-packages/
ln -s /home/jbd/src/opencv-3.0.0b/lib/python2.7/site-packages/cv2.so
bunu yüklemeye çalışırken yolu, hep olsun ne olursa olsun:
Traceback (most recent call last): File "/home/jbd/git/ocr/test.py", line 10, in sift = cv2.xfeatures2d.SIFT() AttributeError: 'module' object has no attribute 'SIFT'
ile Ben burada
ne yaptım, sanal olanlar daha sonra ana ortamda çalıştı: yanılıyorum neredeimport numpy as np
import cv2
sift = cv2.xfeatures2d.SIFT()
birisi ...
görürsenizÇok teşekkürler opencv3.0 ile
Çok teşekkür ederim, bunu özledim ve kurulumum Sonunda iyi :) – jbdemonte