Here, we will be installing the libraries that are required to perform image processing operations. We will be using the following Python libraries
- OpenCV
- Numpy
- Matplotlib
Why we are using OpenCV, not Matlab or any other?
- Because it is open source, fast(written in C/C++), memory efficient and easy to install (can run on any device that can run C).
- if you really want to learn about how computer vision works from the initial steps to the last, I suggest you learn OpenCV first then use any deep learning library like Tensorflow, pytorch etc when you’re ready to train a deep learning algorithm for better performance/accuracy results.
Installing Numpy, OpenCV or any library (For WINDOWS)
There are two ways to install any library in Python IDLE,
- using pip command: In the installed Python folder, go to Scripts folder and open command prompt(press and hold Shift + Right Click and select Open command window here). Then write pip install library name to get it installed. For example
1pip install numpy - using .whl file: First download .whl file of any library (version corresponding to your Python) from here. Then open the command prompt where you have downloaded this file and write pip install filename.whl. For example
1pip install numpy‑1.14.2+mkl‑cp36‑cp36m‑win32.whl
Installing Numpy, OpenCV or any library (For UBUNTU)
First, install pip using apt-get, then you can install any library as shown below
1 2 |
sudo apt-get install python-pip sudo pip install numpy |
Anaconda: open the Anaconda prompt and write pip install numpy or any other library name which you want to install.
Now, you might have got some feeling about how to install Python libraries. Hope you enjoy reading.
If you have any doubt/suggestion please feel free to ask and I will do my best to help or improve myself. Good-bye until next time.
while installing the python- pip ,it shows an error at apt in Jupiter notebook