Originally, I wanted to use the depth camera and create words in the inside of someone's silhouette as a kind of meditation on their identity...but I realized a great difficulty was that the depth image or raw depth operates on pixel level, whereas the text command in p5 could operate on global canvas coordinates. I tried creating an offset, writing a character every Xth pixel, but it still wasn't working correctly...
I ended up needing to pivot my idea because I realized I would need help with my other implementation and it was too down to the wire. The idea I ended up with was more frivolous and silly, creating a fireball. I liked the fighting gestures used in various video games, anime, so I thought it could be fun to try to capture that.
Source: https://github.com/PaulineOC/ITP-BodyEWAH-HW3
Demo:
Originally, I wanted to capture a motion akin to this picture (sorry I realize the hands are a bit hard to distinguish), where the two palms are facing each and the wrist is bent at a 90 degree angle.
I tried using multiple detections for this gesture, but they evaluated true all the time/didn't evaluate correctly ...
Check if handTip.x < thumb.x and thumb.y > wrist.y
Using cameraX instead of colorX for above logic
Use angleBetween to see if angle between the handtip/thumb and the wrist was beyond a certain threshold (originally I thought 90 degrees...)
Since the previous gesture detection was wonky, I decided to pivot again and try to detect the soccer throw gesture since I thought it would allow me detect greater differences. I ended up checking if the handTip.y was above the eye.y and if the handTip.x was within a certain distance of the shoulder.x
From there, I ended up calculating the rough distance between the handtips x and y for creating the fireball itself.
I think I want to pretty up the skeleton. Previously, I commented out my skeleton code because it wasn't performing the way I wanted. But otherwise, here are the general experimentations with creating a fireball with the soccer throw pose.