This is an instance of video tracking or the process of locating a moving object (or multiple objects) over time using a camera. If you are holding a an object in hand, please do make movements with it near the camera so that the object gets detected. I have taken help from various online blogs and youtube channels. To reproduce this code, please fork and clone this repo to get started!
We require openCV for this. The major dependancies are mentioned here Enter the following commands into your terminal:
sudo apt-get install python-opencv
#We need CMake to configure the installation, GCC for compilation, Python-devel and Numpy for building Python bindings etc.
sudo apt-get install cmake
sudo apt-get install python-devel numpy
sudo apt-get install gcc gcc-c++
#Next we need GTK support for GUI features, Camera support (libv4l), Media Support (ffmpeg, gstreamer) etc.
sudo apt-get install gtk2-devel
sudo apt-get install libv4l-devel
sudo apt-get install ffmpeg-devel
sudo apt-get install gstreamer-plugins-base-devel
conda install opencv
conda install -c anaconda cmake
conda install -c anaconda numpy-devel
sudo apt-get install gcc
sudo apt-get install g++
conda install -c anaconda gtk2-devel-cos6-x86_64
#conda install -c groakat ffmpeg-dev
#conda install -c danielballan ffmpeg
conda install -c conda-forge gstreamer
conda install -c anaconda pkgconfig
conda remove opencv
conda update conda
conda install --channel menpo opencv
git clone https://github.com/opencv/opencv.git
mkdir build
cd build
cmake ../
Use python 2 as python 3 does not support xrange function.
Your dependancies may be installed with Python 3.6.5 :: Anaconda, Inc.
, but still run with python 2. It does not matter.
python2 project.py