dlib-android-app icon indicating copy to clipboard operation
dlib-android-app copied to clipboard

Lips detection

Open WaqarAhmadGit opened this issue 8 years ago • 17 comments

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.

WaqarAhmadGit avatar Jan 23 '17 06:01 WaqarAhmadGit

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

tzutalin avatar Jan 23 '17 06:01 tzutalin

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

WaqarAhmadGit avatar Jan 23 '17 06:01 WaqarAhmadGit

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 avatar Jan 23 '17 06:01 WaqarAhmadGit

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

WaqarAhmadGit avatar Jan 23 '17 06:01 WaqarAhmadGit

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();

tzutalin avatar Jan 23 '17 07:01 tzutalin

Ok let me try than I will tell you

WaqarAhmadGit avatar Jan 23 '17 13:01 WaqarAhmadGit

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?

WaqarAhmadGit avatar Jan 23 '17 13:01 WaqarAhmadGit

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 avatar Feb 17 '17 10:02 Amrutha52

@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); }

Amrutha52 avatar Feb 17 '17 10:02 Amrutha52

@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

EzequielAdrianM avatar Feb 28 '17 20:02 EzequielAdrianM

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

Amrutha52 avatar Mar 07 '17 08:03 Amrutha52

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

WaqarAhmadGit avatar Mar 09 '17 05:03 WaqarAhmadGit

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.

EzequielAdrianM avatar Mar 09 '17 05:03 EzequielAdrianM

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

WaqarAhmadGit avatar Mar 09 '17 05:03 WaqarAhmadGit

@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.

EzequielAdrianM avatar Mar 09 '17 08:03 EzequielAdrianM

ok thanks

WaqarAhmadGit avatar Mar 09 '17 12:03 WaqarAhmadGit

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?

aijaz070110 avatar Jul 10 '17 16:07 aijaz070110