Code Monkey home page Code Monkey logo

Comments (7)

kylemcdonald avatar kylemcdonald commented on September 24, 2024

tracker.getImageFeature(ofxFaceTracker::LEFT_EYE);
tracker.getImageFeature(ofxFaceTracker::RIGHT_EYE);
tracker.getImageFeature(ofxFaceTracker::OUTER_MOUTH);
tracker.getImageFeature(ofxFaceTracker::INNER_MOUTH);

these return polylines for the features you're interested in.

from facetracker.

Neogene avatar Neogene commented on September 24, 2024

Thank you, but this is for openframeworks not for the FaceTracker OpenCV plain (only c++) project.

from facetracker.

kylemcdonald avatar kylemcdonald commented on September 24, 2024

sorry! i thought we were talking ofxFaceTracker :)

that said, ofxFaceTracker is a good reference for how to get this kind of data.

inner mouth: {48,60,61,62,54,63,64,65}
outer mouth: consecutive(48, 60)
left eye: consecutive(36, 42)
right eye: consecutive(42, 48)

and the place you're looking is:

const Mat& shape = tracker._shape;
int n = shape.rows / 2;
shape.db(i, 0), shape.db(i + n, 0)

from facetracker.

Neogene avatar Neogene commented on September 24, 2024

Thank you, for others users in need i'm listing here all the points intervals:

face: consecutive (0,16)
left eyelash: consecutive(17,21)
right eyelash: consecutive(22,26)
nose: consecutive(27,30) (33 may be counted too)
nostrils: consecutive(31,35) (may be splitted in 31&32 for left, 34&35 for right and 33 for center)
left eye: consecutive(36, 42)
right eye: consecutive(42, 48)
inner mouth: {48,60,61,62,54,63,64,65}
outer mouth: consecutive(48, 60)

from facetracker.

kylemcdonald avatar kylemcdonald commented on September 24, 2024

next time i need to refactor ofxFaceTracker, i will try to move extra API features like this into FaceTracker directly.

from facetracker.

Neogene avatar Neogene commented on September 24, 2024

Yes, a nice addition would be to add/enable full face shape detection, including the forehead, i've seen this in other samples around the web, the only way for now i've found is to shift upward (ok i know it's really a crap way) the eyelash points to simulate the forehead area.

from facetracker.

mosspassion avatar mosspassion commented on September 24, 2024

@Neogene How did you raise the eyelash points higher? I want a forehead mask too, and I'm trying to get ride of the eyes and mouth hole.

from facetracker.

Related Issues (20)

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.