Multiple objects tracker using openCV and dlib
- openCV 3.0
- dlib-19.3
- visual studio 15 (c+11 is necessary)
1. dlib-19.3
dlib
2. tracker
Source files in src and visual studio solution in vs_solution
3. video_frame
Video frame images
To run this program, you need to compile opencv and dlib. You will be able to compile opencv easily from many websites. The folliwing instruction is how to compile dlib given that you are done with opencv compiling clearly and using visual studio in window. If you have troubles in compiling dlib then you can just use tracker/vs_solution/MultiObjectTracker.sln instead, but you need to change opencv path and dlib path with your environment in the project property.
-
Make a new visual studio project.
-
Include dlib-19.3/dlib/all/source.cpp and tracker/src/Tracker.cpp to your project. Tracker.cpp file will be divided into several files soon.
-
Make new folder(filter) in your project. Include all files(all cpp files and headers) in dlib-19.3/dlib/external/libjpeg to your project.
-
Open project properties -> Configuration Properties -> C/C++. You can see additional include directory. Write dlib-19.3 (next directory should be dlib) to there.
-
Opem project properties -> Configuration Properties -> C/C++ -> Preprocessor. You can see Preprocessor Definitions. Write DLIB_JPEG_STATIC and DLIB_JPEG_SUPPORT to there.
-
Build.
-
Open cmd and move to the directory which has exe file.
-
Write command : MultiObjectTracker.exe "YOUR_FRAME_IMAGE_PATH". If you're using frame images in this repository, the command is MultiObjectTracker.exe ../../../../video_frame.
-
You will be able to see a window with the first frame image. Draw rectangles around the targets you want to track. You can use
ESC
if you want to remove rectangles andENTER
if you are done with drawing. -
Now you can see tracking all targets you made.
-
Attach detector. (Pedestrian detector as an example)
-
Divide tracker/Tracker.cpp into several files => DONE.
-
Multi thread => DONE