Create a controller that uses facial tracking in use for different video games.
The controller will be made to interact with DosBox in order to play retro games such as pacman, mortal kombat etc.
- Windows
- C++ Boost Library version 1.6.2 or later
- Available here
- Or at
www.boost.org
- CMake version 2.8.4 or later
- Available here
- Or at
www.cmake.org
- C++ Dlib version 19.2 or later
- Available here
- Or at
www.dlib.net
- A C++11 compiler (Visual Studio is recommended)
- Available here
- Or at
www.visualstudio.com/free-developer-offers
- OpenCV
- Available here
- Or at
www.opencv.org
- Install CMake.
- Download the OpenCV self-extracting archive and place it in a location you can access.
- Run the CMake GUI and build the OpenCV library.
- Select the source code of OpenCV, which is in the
OpenCV/sources/
folder. - Build the binaries in the
OpenCV/build
folder - Press 'Configure', and wait for it to complete
- Press 'Generate' to finish the installation
- Once OpenCV is built, download the provided
dlib
folder - Build the folder using CMake
- For the source code, select the
dlib/Face
folder - Build the binaries in that folder
- Press 'Configure' and wait for completion
If you get an error saying that OpenCV is not found, find theOpenCV_DIR
variable and change the path to point to your OpenCV build folder - Generate the code
- Once the code is generated, press 'Open Project'
- Run the Visual Studio project file from the \verb|dlib/build| folder and build the project inside Visual Studio
- Change mode to 'Release' using the build menu
To use GameFace, simply double-click the webcam_face_pose_ex.exe
file and you're good to go!
Currently the controls are as follow:
- Head up: w
- Head down: s
- Look left: a
- Look right: d
- Roll left: left-click (mouse 0)
- Roll right: right-click (mouse 1)
Original Speed(fps) using dlib is usually between 5~8, now it is increse to more than 20 when playing video.