This is a C++ implementation to convert a video file into a folder of frame images.
./src/
folder: Source codetrack1.sh
: Example bash file to process the Track 1 datatrack3.sh
: Example bash file to process the Track 3 data
- Download and make the OpenCV library. A tutorial is given here.
- Compile using g++ in Linux environment. If you are new to g++ compilation with OpenCV, please refer to this link. In the command window, you can
cd
to the current directory and use the following command to compile our source code, wherebin
is the executable file generated. Note that you may need to addsudo
at the beginning to grant the admin permission.
g++ -I/usr/local/include/ -L/usr/local/lib/ -g -o bin ./src/main.cpp -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_imgcodecs -lopencv_videoio -lm
- Run the executable file.
./bin <input video path> <output image folder path>
- Or run a bash file.
bash track1.sh
For any question you can contact Zheng (Thomas) Tang.