In this work, we constructed various algorithms in order to extract frames from videos using OpenCV Computer Vision library. The results are saved as a text file as well as a video file that consists of the extracted frames only.
Here you can download the text for the thesis. (It is written in the Greek language only)
Requirements: Opencv library
You can use the Makefile
in order to compile all the algorithms at once
Usage: make all # compile all algorithms
make <algorithm_name> # compile the source code
# for a specific algorithm
make clean # delete any object files
make help # Print this help message
where algorithm_name
choose one of the following:
- absdiff
- comprdiff
- ecrdiff_v1
- ecrdiff_v2
- histdiff
This Makefile calls a series of other Makefiles in order to compile all the source code
For each algorithm there is a set of executables
<algorithm_name>_export_images
: Exports video frames as images in PNG format (marked only). This images can be pass to ffmpeg in order to construct the resulting video../<algorithm_name>_export_images <input_video_file> <output_TXT_file>
<algorithm_name>_pipe_pixels
: Sends BGR (24 bpp) frames to stdout. For example, you can pipe the output to ffmpeg in order to write video having more choices and control over the encoding procedure../<algorithm_name>_pipe_pixels <input_video_file> <output_TXT_file>
<algorithm_name>_write_video
: Write marked frames in a video files using OpenCV. The resulting video includes only marked frames and has the duration of the original video../<algorithm_name>_write_video <input_video_file> <output_video_file> <output_TXT_file>
The
<output_TXT_file>
contains the results of the execution of the algorithm, i.e. marked frames, video stats etc.
##Platforms
- Linux
- Windows
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.