-
The code belongs to PyImageSearch. There is absolutely no contribution to the original code and is purely meant for sharing purpose.
-
Video is downloaded from here.
pip
installation
$ pip install opencv-python
$ pip install --upgrade imutils
$ pip install numpy
conda
installation
$ conda install -c conda-forge opencv
$ conda install -c conda-forge imutils
$ conda install numpy
Make sure that you provide complete path to the video file or change the directory to the target location first.
To run on video-
$ python3 object_movement.py --video ball_video.mp4
To use Webcam-
$ python3 object_movement.py