- Windows 10 Professional
- Python 3.6
- OpenCV 3.3.0
1.安裝 OpenCV-Python
先下載下列兩個檔案,到特定的資料夾
http://www.lfd.uci.edu/~gohlke/pythonlibs/tuft5p8b/numpy-1.13.1+mkl-cp36-cp36m-win_amd64.whl
http://www.lfd.uci.edu/~gohlke/pythonlibs/tuft5p8b/opencv_python-3.3.0-cp36-cp36m-win_amd64.whl
再到該資料下,進行安裝
$ pip install numpy-1.13.1+mkl-cp36-cp36m-win_amd64.whl
$ pip install opencv_python-3.3.0-cp36-cp36m-win_amd64.whl
(Ignore)$ pip install opencv_python-3.3.0+contrib-cp36-cp36m-win_amd64.whl
2.辨識特徵檔下載位置
Sources Download from OpenCV releases page
解壓縮後,進入 data 資料夾,將「haarcascades」放到專案的特定資料夾中,以便存取
- Easy Install OpenCV 3.2 for Python 3.6 / 2.7 on Windows
- Install OpenCV 3 with Python 3 on Windows
- Docs from opencv.org for videos
- Read, Write and Display a video using OpenCV