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

Blend a portion of the face's image #6

Open
seifselmi opened this issue Oct 26, 2017 · 2 comments
Open

Blend a portion of the face's image #6

seifselmi opened this issue Oct 26, 2017 · 2 comments

Comments

@seifselmi
Copy link

Hello @MarekKowalski, Thank you for this good work it is really impressive.
Now i want to try out making only the eyes appear for example and not the whole face, let's say for example i want to crop from the nose down to the jaw to show only moustache and beard, is there a way to do that i found my self stuck and might need a help.
Thank you in advance.

@MarekKowalski
Copy link
Owner

Hi!

If I remember correctly, the easiest way would be to remove some of the triangles in the 3D face mesh.
You can do that by removing entries in the mesh variable loaded in zad2.py

It might be easier to do this in a graphical way. To do so you would have to save the mesh to a file, for example an obj or ply file format, edit the mesh in, for example MeshLab, save it back and read it in Python. While this might sound hard, it is actually very easy, those file formats are not hard to work with.

Marek

@seifselmi
Copy link
Author

Hi Marek,

Thanks for your reply, I actually got it to work by editing the photo of the original face and remove the unwanted parts (eyes, nose, etc ..) using photoshop and save it a png image file, and then blend the modified image and not the original face's image. It might sound weird but this trick worked.
I'll try to do your solution later and learn to play with the mesh.

Thanks.

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