Overlay Image on Face

Hopefully someone here can help and it is okay to ask on this forum.

I’m looking for a written or video tutorial on overlaying an image (say glasses) onto a face using the camera. I have searched but could not find.

Is there one available on this site? I need it to be iOS 10 or less. If there is not one on this site, anyone have any tips.

Thanks heaps :slight_smile:

@zane. Thanks very much for your question! I unfortunately can’t think of anything that would show you how to do this off the top of my head. In truth, this sounds like something that can be very easily accomplished using ARKit, but you’ve made it clear you need something for iOS 10. Perhaps you should do a search for something like, “Augmented Reality in iOS 10” on Google, and see what you find?

I hope that helps.

All the best!

You can try using OpenCV, a cross-platform open-source vision library.

The main downside is that you will have to write a lot of mathematical code in order to make it work, but at least you will have a solid and well-tested base to detect faces, for start.

Maybe one day it will be as simple as this snippet : ^^

guard let faces = image.foundFaces(), let mainFace = faces.first() else {
mainFace.add([.glasses, .mustache])

I wish you good luck, face detection and AR are really interesting domains :slight_smile:

This topic was automatically closed after 166 days. New replies are no longer allowed.