face_morpher icon indicating copy to clipboard operation
face_morpher copied to clipboard

Is there any way to morph the images without cropping just the face?

Open OtavioRMachado opened this issue 9 years ago • 9 comments

OtavioRMachado avatar Jun 17 '15 12:06 OtavioRMachado

Do you mean morphing something other than a face? Opencv's face detector does require the face to be fairly prominent in the image but you shouldn't need to crop the face.

alyssaq avatar Jun 17 '15 23:06 alyssaq

No, morphing faces, but with the rest of the image too. I'd like to reposition the faces, but don't want to delete the rest of the image around the faces.

OtavioRMachado avatar Jun 29 '15 21:06 OtavioRMachado

Ah, I see. It is possible and can be complex depending on the images. face_morpher uses the face points automatically detected from stasm, and it detects points only on the face whilst wonderfully handling different face, eyes, mouth shapes, tilts, etc.

To morph the rest of the image, you would have to add more points surrounding the outside of the face. Getting it consistent across all face images will be tricky. It would require detecting and aligning the neck, collar, hair, etc. and handle all inconsistencies of the background across images.

Alternatively, you can manually define your own control points for all images and supply the array of points into locator.py.

Alyssa

alyssaq avatar Jun 30 '15 10:06 alyssaq

Hi, Alyssa. First of all I would like to thank you for this great app! No hand driven triangulation, resizing, etc. But maybe it's possible to crossfade the rest of the image as background with no geometry changes? We mostly looking at the face while magic is going and having some background on video is better than black nothing. Unfortunately I have not enough programmer skills to modify the program that way but I think it would be useful improvment!

Slava

b3qkc avatar Aug 25 '15 12:08 b3qkc

Hi Slava

Thanks for the comment. Do you mean adding a static background image instead of the black?

alyssaq avatar Aug 26 '15 05:08 alyssaq

Not quite.. I mean crossfade entire images as background and place face morphing over it. I've made some examples.. background face_alpha face_over_backgnd

b3qkc avatar Aug 26 '15 06:08 b3qkc

What you've done looks pretty cool! Its the reason the app provides an alpha background --- for users to put any background.

I like your use case but probably not going to implement this cross-fade effect as its user/application specific. Its also more of a photoshop effect rather than the scientific implementation of morphing (which was the goal of this project). That said, I really like the last gif!

alyssaq avatar Aug 26 '15 06:08 alyssaq

Please, please, please!...

b3qkc avatar Aug 26 '15 06:08 b3qkc

I've done just that in my branch... ;-)

azazel75 avatar Oct 18 '15 22:10 azazel75