A program to track movement using openCV (only CPU)
Work fine with a Raspberry pi (lower framerate)
You can test with a sample video (Ex. this site)
The camera/video must have a fixed point to have an optimal result.
# Run with file
python3 objtrack.py -i /path/to/your/file.mp4
# Run with camera
python3 objtrack.py
# Change the display size
python3 objtrack.py --width 640 --height 480
Install openCV 4 on your raspberry pi (Ex. this tutorial)
git clone https://github.com/ThiBsc/myOpenCVprojects.git
cd myOpenCVprojects
workon cv
python moveTracking/src/objtrack.py -i /path/to/your/file.mp4
- Follow this tutorial
pip3 install telepot
- Create 5 commands:
runtracking
,stoptracking
,status
,capture
,video
cp src/telegram_cfg.py.dist src/telegram_cfg.py
- In
telegram_cfg.py
set your API key inTELEGRAM_API
and add youruser_id
inTELEGRAM_USRID_WHITELIST
- Just run
python3 src/telegram.py