Fun Project – A Primitive Snapchat Effect With Matlab

Fun Project – A Primitive Snapchat Effect With Matlab


I have already written about what the Viola jones algorithm is and how it works. If you have not read it, you might want to look at this first. So, i will brief it at this time. I told that with Matlab we could detect the faces in a streaming video with the cascade object detector which uses this algorithm. In fact, we can also determine certain parts of the face, such as mouth, eyes, nose or upper body. Here is the options at the properities section.

These are the options MATLAB offers us ready to use. But how about train this detector to determine any other objects or facial expressions? We can make even a very primitive snapchat effect easily with this way 🙂 You know, the snapchat playing some animation on your face while you are opening your mouth or doing something. For this, it needs to be able to identify separately the face region and the mimics you are doing. Likewise, i tried to play an animation on my face while i am smiling. To do this, we need a smile detector in addition. So, this mean we need some smiling and not smiling images. I used this database for this task, it works but not very accurate, you can find or create more positive and negative samples to make more accurate detector. I also used the training image labeler app of matlab to define the ROI(region of interest) of my positive samples. See how to use that app from here and look at here for training process. It’s pretty easy to make your own detector just like this for objects /facial expression detection anything you want if you have a good database for your task. You can download the source code and database directly from github. See you again 🙂






Leave a Reply

Your email address will not be published. Required fields are marked *