Mirror Mirror

Mirror Mirror

RAW VIDEO: https://vimeo.com/253456807/c6cc6acc5a

PS. It’s black because my face is way too near. Scroll down for my process journal!


30/01/18
Tuesday, 1604

Hmm.. During lesson I decided not to look at the model codes and wanted to homebrew my own nasty concoction!

Firstly, I restarted everything(ok that’s mainly because I have not started my trial)! I started a fresh with the mindset of completing the project only with efficient and clean blocks of code to maximise my thought process.

Started with the simple idea that I wanted to have a subpatcher to open up the web cam, 1 to do facial recognition and 1 to scale it for the slider.

This was the easy part. I referenced most of the codes from the help directory and what I’ve done last week. The harder part would be the calculations behind the scaler.

This may look simple because this was the final output but this went through many itinerations. Before arriving at my final code I was looking through the proper usage of scale to find the sweet spot and also how I could create the effect of dimming the mirror instead of the other way round(as below).

I automatically knew there was a problem with the scaler as it wasn’t giving me the output I needed(which is the percentage of my face per screen pixel ratio). However I was faced with the dilemma that I could not place my square area on the right as it would not automatically update if 76800px(320px*240px resolution) was a constant on my left.

I went on to check the references on MAX MSP Jitter’s website and found out about the !/(inverse division) and decided to give it a go! It was a success and gave me the exact percentage I needed to achieve my result!

It was a success! It was delivering exactly what I wanted! But because I was wearing glasses, the facial recognition wasn’t detecting me well enough. I even added a jit.window as a prelude that would lead me to my full screen!

Full screen was pretty simple! All I did was a simple Key > Select 32(spacebar) which was taught in class! However I identified a problem that the screen was flashing way too often due to the facial recognition not picking up faces properly. I knew I was done with it at this point but I wasn’t about to give up knowing that it isn’t perfect.

To tackle my problem, I had to stop the unnecessary flickering. I noticed whenever my face isn’t present, the screen turns dark and the value becomes 0. So I limited my scale patcher to never hit 0. This is important because then I’d split out the value of 0 to become 1 and let everything else flow as a per norm.(refer to my finished patcher at the start)

I searched far and wide the MAX MSP Jitter references, trying out line, line~, rampsmooth~ within the scaler, outside the scaler and within the main patcher and found out that all I needed was a parameter to be in between the values that could be changed thanks to a simple slide parameter that receives the values of my “face not present brightness 1” and my “varying brightness from square area” values. And it works like a charm!


23/01/18
Tuesday, 1618

Was super stoked and excited about facial recognition and had to show my friend how it worked! I basically applied whatever I’ve learnt and integrated the facial recognition but was unable to draw out the x1, y1, x2, y2 coordinates. Guess I’ll wait for LP to teach it next week!