I want to make an augmented reality application for trying glasses on iphone.
To do that i need 3D head tracking ( providing X,Y,Z position and orientation ).
someting like this FaceApi but for iphone.
Can anyone propose me a solution to perform this type of tracking on iphone?
I'd recommend using OpenCV, which is a computer vision library. Searching online for how to detect faces using OpenCV will return a plethora of links, as it is a very common use of this library.
Here's a link relating to getting it to compile on the iPhone.
Yes, you can do this easily with OpenCV's built-in Haar classifiers, and you'll find a lot of demos and tutorials online for that. You don't need to find the Z position, just the face size. More important to you will be eye position - and there are Haar classifiers for that too. You can find a face region, and then find the eye regions within that region, and you'll have a very good basis for positioning your eyeglass overlay on the subject. There are lots of tweaks to speed up the process, like downsampling and telling the classifier to search for only one face. Good luck.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With