Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connect mouth points #15

Open
EVERYTHINGING opened this issue Apr 18, 2017 · 5 comments
Open

connect mouth points #15

EVERYTHINGING opened this issue Apr 18, 2017 · 5 comments

Comments

@EVERYTHINGING
Copy link

Hey there, I am wondering how I would go about connecting the mouth points to each mask so that when I open my mouth it opens the mouth of the mask?

@hrastnik
Copy link
Owner

In the function FaceSwapper::getMasks() you should use the facial points to zero out the masks on the mouth area.

@EVERYTHINGING
Copy link
Author

is there a diagram to see which numbers correlate to which points? I thought that I would be adding the mouth points in FaceSwapper::getFacePoints() ? Thanks

@hrastnik
Copy link
Owner

Here you go. Keep in mind that the points are 0 indexed in the code. https://i.stack.imgur.com/05uIT.jpg

@EVERYTHINGING
Copy link
Author

Thank you I appreciate the replies. I am confused as to where to use this. You said to zero out the masks in the mouth area. Not sure how to do this. I thought by adding mouth points to the array for bob and ann that the fillConvexPoly would automatically cut it out? Anything more you can tell me would help. Thanks

@hrastnik
Copy link
Owner

In the method getMasks() the empty (all zeroes) matrix is being filled with 255. These are the areas where the faces are located or simply - face masks. If you zero out the part of the face masks where the mouth are located, I think it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants