Giter Site home page Giter Site logo

morphing's Introduction

Morphing

Facial Feature Detection:

  1. git clone https://github.com/spmallick/dlib
  2. cd dlib/examples
  3. mkdir build
  4. cd build
  5. cmake ..
  6. 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

Add Extra Points:

DLib gives 68 facial points as output. We need to add 8 extra points of image boundary. Run AddExtraPoints.py for this.

Average of File:

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.

Triangulation:

We obtain delaunay triangles using file Triangulation.py.

Morphing:

Last step is to obtain morphed frames, use file FaceMorph.py for this.

Reference :

https://www.learnopencv.com/facial-landmark-detection/
https://github.com/spmallick/dlib/

morphing's People

Contributors

garimachhikara128 avatar

Forkers

datomi79

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.