Hairstyle

Description

This project is to explore the camera and facial capturation functions of p5.js. It is simply to write a filte for the users to play with. The filter could be made either by color or effection changing or to add some additional graphic centered around faces. In order to do that, facial recognition is required.

Design Process

By following last projects idea of trump, I decided to use trump's feature as my filter. The most significant appearance features of Trump are his haircut and his red tie, so my idea is to turn these 2 features of him to be added on to the audience whoever plays with the filter.

I first used the camera comment and uploaded the hair picture in and make it able to show up on the camera screen. When it goes to the part of facial recognition, I use faceTrack to connect to the position of the graphic so the haircut graphic is able to move by following the movement of actual human face.

Besides the haircut style, I also thought about adding tge red tie as another filter that the audience could choose to use whatever they want. I think I will add that funtion into the filter in the future.

Reflection

There are some issue with using the camera, sometime because of the internet unstability or the inner bugs of p5, when I try to test my code, it didn't work everytime, and most of the times I have to refresh the pages. Also, I figured that when I first uploaded the haircut picture and have it showed up on the camera screen, it is a mirrored picture, so I later changed the position.

The graphic quanlity and the sensity of the facial capturing also highly affected the feelings of the filter. One thing is that the haircut graphic would not change based on the distance of actual human face to the camera. I would further research on that part to see if it is possible to change that.