jeeliz / jeelizFaceFilter

Javascript/WebGL lightweight face tracking library designed for augmented reality webcam filters. Features : multiple faces detection, rotation, mouth opening. Various integration examples are provided (Three.js, Babylon.js, FaceSwap, Canvas2D, CSS3D...).
https://jeeliz.com
Apache License 2.0
2.68k stars 533 forks source link

Inconsistent div element placement across devices #6

Closed andrewdeutsch closed 6 years ago

andrewdeutsch commented 6 years ago

Hello again, I'm doing some tests with 2d masks for prototypes and am getting inconsistent eye placement across devices. I'm using the jeeFaceFilterCanvas to hold it. Here's my tweaks for the object. This image is closely cropped. var SETTINGS={ rotationOffsetX: 0, //negative -> look upper. in radians cameraFOV: 40, //in degrees, 3D camera FOV pivotOffsetYZ: [0,-0], //position the rotation pivot along Y and Z axis detectionThreshold: 0.9, //sensibility, between 0 and 1. Less -> more sensitive detectionHysteresis: 0.02, mouthOpeningThreshold: 0.5, //sensibility of mouth opening, between 0 and 1 mouthOpeningHysteresis: 0.05, scale: [4.5,4.5], //scale of the DIV along horizontal and vertical axis positionOffset: [-1.55, -.9,-0.2] //set a 3D position fofset to the div };

Any suggestions?

Thanks!

xavierjs commented 6 years ago

Hi,

What is the canvas resolution and CSS size ? Do you try the boilerplate DIV demo (https://jeeliz.com/demos/faceFilter/demos/CSS3D/div/) or have you tried to change some settings ? Do you have any screenshot ? Is is possible to reproduce the bug using Chrome mobile emulation of the web console ?

xavierjs commented 6 years ago

Hi,

I have added a canvas2D integration example, it can be found on https://jeeliz.com/demos/faceFilter/demos/canvas2D/faceDraw/

I think it is better to use it than the CSS3D one because :

andrewdeutsch commented 6 years ago

fantastic! thanks, xavier!