#raspberrypitutorials #raspberry #pi #tutorials #tutorialspoint #opencv
In this video we are sharing information of installation process of openCV. It is it most easy and quick way to install opencv in raspberry pi.
I am here writing all commands for installation
First open terminal and start line by line enter below commands. After completion of below commands opencv will be installed successfully.
For check memory card space type below command. Do not copy "$" :D
$ df -h
If not all memory card space showing. then you have to type below command and follow some steps:
$ sudo raspi-config
after above command one window box will open. In this box select advance option and then select expand file system then press ok and then finish and restart the raspberry pi.
Now you have to remove some extra application which is not needed. So here I am removing wolfram-engine and libreoffice.
$ sudo apt-get purge wolfram-engine
$ sudo apt-get purge libreoffice*
$ sudo apt-get clean
$ sudo apt-get autoremove
Now we have to update and upgrade
$ sudo apt-get update && sudo apt-get upgrade
Now start the suppoting library install
$ sudo apt-get install build-essential cmake pkg-config
$ sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng-dev
$ sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
$ sudo apt-get install libxvidcore-dev libx264-dev
$ sudo apt-get install libfontconfig1-dev libcairo2-dev
$ sudo apt-get install libgdk-pixbuf2.0-dev libpango1.0-dev
$ sudo apt-get install libgtk2.0-dev libgtk-3-dev
$ sudo apt-get install libatlas-base-dev gfortran
$ sudo apt-get install libhdf5-dev libhdf5-serial-dev libhdf5-103
$ sudo apt-get install libqtgui4 libqtwebkit4 libqt4-test python3-pyqt5
$ sudo apt-get install python3-dev
$ wget bootstrap.pypa...
$ sudo python get-pip.py
$ sudo python3 get-pip.py
$ sudo rm -rf ~/.cache/pip
$ sudo pip install virtualenv virtualenvwrapper
Now we have to update bashrc file. So first open up the file
$ nano ~/.bashrc
Now append below 4 lines at the bottom of the file
virtualenv and virtualenvwrapper
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3
source /usr/local/bin/virtualenvwrapper.sh
Now save the file press ctrl+O and enter then ctrl+x to exit
Now load updated file
$ source ~/.bashrc
Now we have to create virtual environment. Here I am creating techYogi anything you want you can type
$ mkvirtualenv techYogi -p python3
Now we have to install camera
$ pip install "picamera[array]"
Now time comes to install open cv library
$ pip install opencv-contrib-python==4.1.0.25
Here you can change version number which you wants to install.
Now you openCV library has been installed successfully.
Now you can test the version of opencv you have installed by typing below code:
$ cd ~
$ workon cv
$ python
After then you can see angled bracket here you have to type:
import cv2
cv2.__version__
Then it will show the version
'4.1.1'
Thanks for watching my videos.
Team Tech-Yogi
Негізгі бет Install OpenCV in easy and quick way | Process of OpenCV installation in raspberry pi
No video
Пікірлер: 13