Week 3: February 15th, 2023

Live Code Session :

BodyPix

Working with: poseNet, bodyPix


Idea: Wallflower game. As the foreground, try to blend into background!

I started by taking a look at the code for bodypix-parts-custom.

Originally, the code for coloring the body parts was part of a global variable declaration.

However, since I wanted the colors to change in response to conditions, instead of remaining as a preset color, I moved the code to the gotResults function. Then, I could replace the hard coded numbers to variables.

Untitled

I ran into a few issues. After setting the variables to equal 0, the color didn’t change. I even tried scrapping the variables and hard setting the color to [0, 0, 0] manually. I tried moving the code into setUp, but still no luck.

I realized I was only able to a visual change to the body part’s color after changing the numbers when it was defined next to the global variable.

Since I would have to set the color first before being able to draw it in the color I want, it would mean that my wallflower game wouldn’t be able to work.

New Idea:

Another Idea: