0

I have this image, and wanted to detect the eye's and mouth position of image on the screen that could be phone, or tablet using Ionic2.

I've came across this blog Dlib 18.6 released: Make your own object detector! about using dlib C++, and this post Find eyes and mouth in an face image suggests to use OpenCV, but I'm not sure that I can use those libraries with Ionic2.

The expected return result should be similar to something like this:

left_eye: {
    top: 150px,
    left: 50px,
    width: 30px,
    height: 15px
}
right_eye: {
    top: 150px,
    left: 100px,
    width: 30px,
    height: 15px
}
mouth: {
    top: 300px,
    left: 75px,
    width: 50px,
    height: 20px
}

Honestly, I have no idea of how can I get this done for my client project as they want to draw the canvas of the dark circle below the eyes, and find some other dark spot on the face, which is another part of the project.

Hope you guys can help me out, or give me some suggestion of how can I get this done using Ionic2.

Thanks you for your time.

enter image description here

Community
  • 1
  • 1
Vicheanak
  • 6,444
  • 17
  • 64
  • 98

1 Answers1

1

You should go with a JS face tracking library.

I reccommend you clmtracker or trackingjs, very simple to use if you only wanna get face element's position (eyes, mouth, nose).

EDIT: This is supposing you want to proccess the facial information in the browser, if the operation is too heavy you can take a look to OpenCV in the server side (there is also a node-open-cv, for Node JS but with less posibilities), and make there the processing work.

AlexAcc
  • 601
  • 2
  • 10
  • 28