Giter Club home page Giter Club logo

Comments (6)

auduno avatar auduno commented on September 25, 2024

Hi, glad you like the library! The coordinates should be relative to the upper left on the html video as you expected, i.e. coordinates (0,0) should be top left on the video (unless of course I've done something wrong). Exactly how wrong is the x-value?

from clmtrackr.

urielefren avatar urielefren commented on September 25, 2024

well i put my face on the upper left html video and the point 19 gave me the following values:

x: 238.15687982454853, y : 21.141415153990234,

always give me a range between value 200 and 300 in the x coordinate

regards...

from clmtrackr.

auduno avatar auduno commented on September 25, 2024

I did a test now, and getCurrentPosition() seems to work as expected here, i.e. x-values are correct. Do you have any example code to reproduce wrong x-values?

from clmtrackr.

urielefren avatar urielefren commented on September 25, 2024

based in your example code,

in the drawLoop method i do this:

var facialPoints = ctrack.getCurrentPosition(); //get the facial array
var arrFacePoints = []; //for save face points in json array
for(int i=0, i<=70;i++) { //number of points in your face representation
var strAux = facialPoints[i]; //get the current couple of coordinates
var coorX = strAux[0]; //get x
var coorY = strAux[1]; //get y
arrFacePoints.push({punto: i, coorX: coorX, coorY: coorY}); //save in json array
}
console.log(arrFacePoints); //print result

and then i want to asking about which one is the maximun range of values for your coordinate representation for the x and y axis?

by the way, sorry for the late respond.

regards...

from clmtrackr.

auduno avatar auduno commented on September 25, 2024

Hi,

well I was a bit late responding as well. I tried your code, and it works as expected (though there were some small errors), the coordinates are correct. I think the reason for what you are seeing is that in the examples I've put online, I flip the video horizontally with CSS, so that the movements in the video match your movements, i.e. when you move your head to the right, the head in video moves right, etc. This was just to make it more natural, since I always got confused by the actual unflipped video. Since the source of the video is not flipped, just the styling, the x-coordinates you receive refers to the unflipped video. So when you move your head to top left, in the (unflipped) video you are actually in top right, therefore the x-coordinate will not be close to 0, but close to the width of the video source, which in this case I guess it means it is close to 300.

Let me know if this is the case for you.

from clmtrackr.

urielefren avatar urielefren commented on September 25, 2024

Hi,

Don't worry man it's fine. I checked what you saying me and everything it's wonderfull. I thought the origin was in the other side in my hand left (me in front of the computer) and now i know is in the right side of the canvas, thanks for all.

Regards...

from clmtrackr.

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.