- git clone https://github.com/spmallick/dlib
- cd dlib/examples
- mkdir build
- cd build
- cmake ..
- cmake --build . --config Release
Download the file from https://github.com/spmallick/dlib and extract it.
Update your face_landmark_detection_to_file.cpp with the one mentioned above.
Desktop$ cd JournalNewVideos/
Desktop/JournalNewVideos$ cd dlib-master/examples/
Desktop/JournalNewVideos/dlib-master/examples$ mkdir build
Desktop/JournalNewVideos/dlib-master/examples$ cd build
Desktop/JournalNewVideos/dlib-master/examples/build$ cmake ..
Desktop/JournalNewVideos/dlib-master/examples/build$ cmake --build . --config Release
Download file from "http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2" and save it on desktop. Extract this file and save the extracted file "http://dlib.net/files/shape_predictor_68_face_landmarks.dat." in Desktop/JournalNewVideos/dlib-master/examples/build
Now put the folder containing images in Desktop/JournalNewVideos/dlib-master/examples/build/YourFolder
Run the following command :
Desktop/Journal/dlib-master/examples/build$ ./face_landmark_detection_to_file shape_predictor_68_face_landmarks.dat ThresholdDynamic/*.png
DLib gives 68 facial points as output. We need to add 8 extra points of image boundary. Run AddExtraPoints.py for this.
We want to calculate a morphed image between img1 and img2, then obatin the average of facial points of img1.txt and img2.txt. Use file AverageFileContentNew.java for this.
We obtain delaunay triangles using file Triangulation.py.
Last step is to obtain morphed frames, use file FaceMorph.py for this.
https://www.learnopencv.com/facial-landmark-detection/
https://github.com/spmallick/dlib/