Exercise 8

For this assignment, I wanted to go back to object programming, because that confuses me more than most things, and I tend to be a generally confused person.

I also decided I was going to use Processing, because I’ve been watching a ton of coding train videos and I got tired of seeing suggestions come up on the side of my screen that look super cool but use Processing and had me thinking “that’s probably going to take me a while, I can’t learn how to use that right now.”


I used a blob detection code that allowed me to track a colour using my computer camera. I then decided I wanted to detect someone’s facial expression by using the shape of their lips. I could then use my millenial/gen X social media skills to create emojis that reflect typical facial expressions, and flash the related emoji at the user. Using my stellar illustrator skills and some photo bits and pieces off of the internet, I collaged a couple of emojis. I then used my a-ma-zing object programming skills to decode the code I was using and integrate an analysis of blob sizes and numbers. This took an insane amount time, because there are just so many objects, but I have it working! It’s super jittery though, especially between the “shock” face and “happy” face, and you have to be at just the right distance from the camera.

(I also started thinking: hey, if I can detect colors, maybe I’ll be able to detect light colors my arduino gives off and have an elementary replacement to my malfunctioning serial control.)


If anyone wants to test this code out, your skin and lip color will be too similar, and if you mess with the code’s colour threshold you will definitely make it worse, so here’s the easiest fix: Put on some bright lipstick. If you’re reluctant to do so you’re going to have to figure out a way to make your lips change colour. Once you’ve defied the laws of nature (or used someone’s makeup kit) hit the ‘i’ key and click on your lips, then hit the ‘i’ key again.

It’s preset to a bright red, so if you already have a bright red lipstick on, you’re all set.


I sincerely apologize for the weird faces.

code and image files:


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.