For Image processing Python with OpenCV library is widely used. OpenCV provides a vast list of Image Processing techniques (like Enhancement, Segmentation, Feature extraction etc.).
Along with “numpy” and “matplot” OpenCV provides easy and strong facilities for image processing.
Follow these steps to install Python and OpenCV:
- Download Python 2.7.13 (Freeware) [32 bit/64 bit].
- Install Python 2.7.13 on your system with default settings.
- Download numpy 1.10 and install it with default setting.
Open IDLE (Python GUI) from All Programs → Python 2.7 and type “import numpy”. If no error ⇒ installed properly. - Download matplotlib 1.3 and install it.
In IDLE type “import matplotlib”. If no error ⇒ installed properly.
Following errors may come:
dateutil library not found
Solution: Open cmd (start → type “cmd” enter).Fig1: Matplot requires dateutil library
If you are connected with proxy server:
SET HTTPS_PROXY=http://domain\<login username_internet>:<password_internet>@<proxy address>:<port number>
ex. SET HTTPS_PROXY=http://JII12\jonny.pandey:[email protected]:3128
Otherwise no need to do this step.Fig2: Setting proxy in cmd and installing packages using pip
In cmd type “pip install python-dateutil”.
Verify the installation by in IDLE type “import matplotlib”. If no error => installed properly.
If following error appears, set the environment path for python.
Similarly install all the required libraries which are missing.Fig3: Python path is not set in environment variable list
- Download OpenCV (Freeware).
- Double click to extract it in the folder “C:\python27\opencv\”.
- Copy cv2.pyd file from “opencv\build\python\2.7\x86” [for 32 bit] to “c:\Python27\Lib\site-packages\”.
- In IDLE type “import cv2”. If no error ⇒ installed properly.
Comments 1
Pingback: Set environment variables in windows - Study Korner