Closed sonidiaz closed 5 years ago
With positionScale you got Px,Py,s relative to the viewport To get x,y,w,h in pixels you have: x = W(Px+1)/2 y = H(Py+1)/2 w = W*s h = w (because the face detection is a square) W,H are the size of the viewport in pixels. x,y are the coordinates of the center of the detection window (not the corner).
Thanks for the quick reply! I will review that function.
Hi @xavierjs,
Sorry to bother you, but I can't get the data correctly, I'm probably doing something wrong, but with the data I get I can't do much. Do you have an example of how to apply it?
Thanks and sorry again!
Hi,
I did a mistake, I correct it and commit the changes, it should be working now :)
I also updated the documentation. x and y are given between 0 and 1
Only 3 floats are returned by get_positionScale
. Indeed since the detection window is a square we don't need the scale along the vertical axis.
It also allows me to detect and correct a bug relative to stabilization :).
To resume, To get x,y,w,h in pixels you have: x = WPx y = HPy w = W*s h = w (because the face detection is a square) W,H are the size of the viewport in pixels. x,y are the coordinates of the center of the detection window (not the corner).
Hi, @xavierjs Yea!!! Now it works very well and the stabilization has improved a lot. Thank you!
Hi, guys, me again In the app that I am working I need to get a picture of the face for each gesture that the user makes. For that I need to get the data of the x, y, width and height coordinates like jeelizFaceFilter does with detectState. I saw that they added the method get_positionScale() (https://github.com/jeeliz/jeelizWeboji/issues/5) but I can not get the data correctly and I do not know if it will help me for what I need. Could you tell me if that is the way to go to get that data (x, y, w, h) with JEEFACETRANSFERAPI?
Thank you!