tzutalin / dlib-android-app

:dragon: Android app to demo dlib-android(https://github.com/tzutalin/dlib-android). Use the prebuilt shared-lib built from dlib-android
Apache License 2.0
676 stars 247 forks source link

Lips detection #18

Open WaqarAhmadGit opened 7 years ago

WaqarAhmadGit commented 7 years ago

Hello I need help to just detect lips of user and than change color of lips kindly guide me where to make changes in this code. waiting for response.

tzutalin commented 7 years ago

Hi, Modify your cpp code and build the library from https://github.com/tzutalin/dlib-android, then the output will be *.so. And copy the shared library to https://github.com/tzutalin/dlib-android-app/tree/master/dlib/src/main/jniLibs

WaqarAhmadGit commented 7 years ago

I am working in android studio than kindly guide me about that.

WaqarAhmadGit commented 7 years ago

I am working on app in android in which i need to change color of lips to check different lipsticks so kindly guide me how to achieve that i will be much thankful to you.

WaqarAhmadGit commented 7 years ago

I am in much trouble kindly guide me to achieve this. Waiting for your response

tzutalin commented 7 years ago

You can draw different colors for each landmark points, then you will be clear how to change the color for lips. ArrayList<Point> landmarks = ret.getFaceLandmarks();

WaqarAhmadGit commented 7 years ago

Ok let me try than I will tell you

WaqarAhmadGit commented 7 years ago

But how to remove other points i just want to detect lips m new in android so sorry about that i just want to detect lips kindly tell me how to achieve that?

Amrutha52 commented 7 years ago

I want to show landmark points of lip without entire image in android studio.Also i want to draw line between that points.Is that possible?please help me.

Amrutha52 commented 7 years ago

@WaqarAhmadAwan I think just give for-loop for landmark points. for (int i = 48; i <= 67; i++) { point = landmarks.get(i); int pointX = (int) (point.x resizeRatio); int pointY = (int) (point.y resizeRatio); canvas.drawCircle(pointX, pointY, 2, paint); }

EzequielAdrianM commented 7 years ago

@tzutalin Hi, I think my question concerns the same issue. If the method getFaceLandmarks() does not specify which part of the face does the landmark belongs, how can I detect which landmarks are for eyes/nose/mouth?

Can you suggest me how to achieve this modifying the library? I have experience with Camera2 and Google Vision. Check out my repo Camera2Vision

Amrutha52 commented 7 years ago

I want to extract and display only lip portion from entire image.Is it possible in this program?? Please let me know...

WaqarAhmadGit commented 7 years ago

I want same like that but after detecting lip portion want to change color of lips

EzequielAdrianM commented 7 years ago

This library/software only helps you detect faces and where are located the parts of the face. Any additional modifications like changing color of parts of the face is out of the scope of this library, hope you understand.

WaqarAhmadGit commented 7 years ago

But any idea about that or any library you know for this work kindly guide me

EzequielAdrianM commented 7 years ago

@WaqarAhmadAwan If you want to go the slow way, you can do it with canvas and line path through face landmarks, you can even add bitmap textures. But It would be too slow. If you want it frame by frame on a preview, running smoothly, you should rely on OpenGL.

WaqarAhmadGit commented 7 years ago

ok thanks

aijaz070110 commented 7 years ago

Face detection with landmarks is done successfully.

Issue: there is FloatingCameraWindow.java, where the landmarks are shown as overlay screen. I want to draw those landmark dots on live preview with FloatingCameraWindow class. How is it possible to do that?