The goal of the project is to detect the speed of an object through three steps:
- Color detection (green or blue to black and white)
- Shape detection (via color)
- Detection of the center of the object (via the shape)
- Velocity judgment (v = d / t)
- Video support (work with photos / video and camera)
- Detection of a specific object (via the 3 steps: color detection, shape and finally the center of the object)
- Object speed detection
- Minimization of errors / cost function (deletion of extravagant data, if any)
- Python 3.7+
- opencv_python ~= 4.2.0.34
- numpy ~= 1.16.4
- picamera ~= 1.13
How to install all the requirements :
pip3 install -r requirements.txt
If you have an error installing picamera try :
export READTHEDOCS=True
You can test the color detection with three programs :
- Green detection from webcam
- Green detection from video (car example) -> needed for step 2
- Blue detection from video (bouncy ball example) -> need for step 2
If you want to test the color detection thanks to your camera (works with flashy green) :
./cameraGreenDetection.py
This will generate a black and white video (outpyColor.avi) from an other one. It will only generate white when there is green on the original video. If you want to test it :
./videoGreenDetection.py
This will generate a black and white video (outpyColor.avi) from an other one. It will only generate white when there is blue on the original video. If you want to test it :
./videoBlueDetection.py
For shape and speed detection you need to do one of the two steps that will generate a video. (This step is based on the generated video) :
- Blue detection (bouncy ball example)
- Green detection (car example)
./videoRoundDetection.py
With the bouncy ball example :
- Luis Rosario - Member 1 - Luisrosario
- Matthieu Daugas - Member 2 - MatthieuDaugas