-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Thib edited this page Jan 3, 2023
·
1 revision
Before going further, please install the following packages:
- Numpy:
pip install numpy
- Matplotlib:
python -m pip install -U pip
python -m pip install -U matplotlib
- scikit-learn:
pip install -U scikit-learn
- OpenCV:
pip install opencv-python
The only file that needs to be modified is the main.py
.
You need to:
-
Modifiy the 4 paths that need to be provided:
-
original_frames
: the folder that contains all the frames from the original video as.jpg
. -
edges_frames
: the folder that will contain all the frame converted to Canny Edge Detection. -
dense_flow_frames
: the folder that will contain all the frame with Dense Optical Flow. -
video_folder
: the folder that will contain the video rendered by the algorithm.
-
-
Modify the video parameters:
video = CreateVideos((400,320), 3)
- The size of the video must match the image size in the
original_frames
folder (for instance (400,320)) - Specify the number of frames per second (for instance 3)
- The size of the video must match the image size in the
You are ready to launch the algorithm !
- Click on the image to points out the interface. It is normal that the points are not drawn while clicking, they will be shown once the number of points specified has been reached.
- Once the number of points has been reached, press a key on your keyboard.
- The validation curve of our Model appears. (just here for information)
- Then the Polynomial Regression appears with its equation. The equation do not take into account the rotation of the curve !
As output, you will have:
- Canny Edge Detection images
- Dense Optical Flow images
- Original Video
- Dense Optical Flow video