Code Monkey home page Code Monkey logo

Comments (5)

jovan-fernandes avatar jovan-fernandes commented on September 24, 2024 1

I think that the information about Face Pitch, Face Yaw and Face Roll are on the vector "FaceTracker ->_clm._pglbl". The first one ( at(1,0) ) is the pitch, the second is the yaw ( at(2,0) ) and the last one is the Roll ( at(3,0) ). Other information are also in this vector, perhaps kyle could answer what means the content at the position 4 and 5 of this vector.

from facetracker.

prometuse avatar prometuse commented on September 24, 2024

Thank you very much! I tried to print out content of (4,0) and (5,0). They are probably the coordinate of head on the 2d image plane. What I need is the 3D position including the depth info of face w.r.t camera. Hope somebody could give me a hint?

from facetracker.

jovan-fernandes avatar jovan-fernandes commented on September 24, 2024

Well, to get the head position in an opencv type vector you could do something like this:

const Mat& mean = faceTracker->_clm._pdm._M;
const Mat& variation = faceTracker->_clm._pdm._V;
const Mat& weights = faceTracker->_clm._plocal;
vector<Point3f> face3DPoints = mean + variation * weights;

With this code you get the facial points in 3d. That is what you want?

from facetracker.

prometuse avatar prometuse commented on September 24, 2024

@jovanoasis Thanks very much again! The code you offered is very helpful, but it seems to be the coordinate of a 3D distribution model relative to the head because the coord didn`t change when I move my head relative to the camera. So what I actually want is the depth info of head, usually obtained by a kinect.

from facetracker.

kylemcdonald avatar kylemcdonald commented on September 24, 2024

for more examples of using data from inside FaceTracker, check out https://github.com/kylemcdonald/ofxFaceTracker/blob/master/src/ofxFaceTracker.cpp

to get 3d position, you have a projective version here:

https://github.com/kylemcdonald/ofxFaceTracker/blob/master/src/ofxFaceTracker.cpp#L247-L250
https://github.com/kylemcdonald/ofxFaceTracker/blob/master/src/ofxFaceTracker.cpp#L253-L256

these tell you 2d position and scale. from there you can convert to 3d position if you have a model of the camera intrinsics.

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.