- See LibMP - MediaPipe as a Shared Library for more information on LibMP
- This example application does the following in realtime:
- Streams video frames from an attached camera/webcam (OpenCV Device #0)
- Runs MediaPipe Face Mesh on each frame
- Uses LibMP to get the XYZ coordinates of detected landmarks
- Draws a circle at each landmark's location on the input frame
- Displays the result using OpenCV/HighGUI
- Compilation is managed using CMake - see
CMakeLists.txt
andlibprotobuf.cmake
- Change
${MEDIAPIPE_DIR}
inCMakeLists.txt
to match your installation of LibMP
- Change
- Other MP example graphs should be supported, though they I haven't yet tested them. As described below, any of MediaPipe's many Protobuf-based data types should work with LibMP.
- Tested on Windows (MSVC 17.3.5)
- Clone and build LibMP
- Compile using CMake
cd
into output directory containingmain
binary- Run
main
binary
Some (most?) MediaPipe data types are based on Protobuf messages. Thus, their data can be easily serialized and deserialized. LibMP provides functions which accomplish this, and this project imports both Protobuf & the Protobuf-based MediaPipe types - allowing for practically native use of MediaPipe data types in an external C++ application.
Questions, suggestions, issues, pull requests, etc. are all welcome!