ALL YOUR BASE ARE BELONG TO WASS

Category
  • Paula Deen Riding Me - ICM Final Project

    For my ICM Final I wanted to create a sketch in Processing that utilized the Kinect. I decided to riff off the meme "Paula Deen Riding Things" because memes are fun, physical play that comes with the Kinect is fun and because there would be a wedge to insert some social commentary and attention to health and food issues.

    "Paula Deen Riding Me" is a humorous way to vilify the cultural enablement of unhealthy decisions. Using the Kinect, the Player has to knock little, devilish "Deens" off his arms with fists of broccoli lest he turn into they type of evil that proclaims, "Life is too short to wonder where you hid your waffle maker."

    I was passionate about food justice, personal health and wellness, social/pop cultural critique.I was intrigued by Processing and the Kinect and wanted to craft a simple, fun game with a sense of humor that sneaks in a social agenda as a second read.

    Paula Deen is a Food Celebrity and TV Personality. Her brand relies on making Southern Cooking that is delicious specifically because it uses unhealthy staples of Southern Cuisine in excessive quantities. She promotes hyperbolic inclusion of ingredients known to cause diseases that make up the most visible epidemics in American culture.

    In 2011 the meme "Paula Deen Riding Things"(pauladeenridingthings.com) launched on tumblr.com. It featured .png files of Paula Deen excerpted from a photo stunt where she rode another celebrity chef like a horse. Immediately after the images were posted, a site was created that photoshopped the silhouetted shots of Deen onto other environments.

    Thanks to Vitor Freire, Caroline Sinders,Wyna Liu, Surya Mattu and David Rios for play-testing. Thanks to Craig Proetzel and Mimi Yin for helping me work through the logic of how to use Skeleton Tracking for the Kinect. Thanks to Maria Paula Saba dos Reis for sharing her code and expertise on background selection and conversion from infrared to RGB through the Kinect. And a special thank you to Lia Martinez for helping me take a fun idea and make it into a working, playable consistent sketch.

    The core of this code uses Greg Borenstein's Skeleton Anatomy Example from his book Making Things See.

     

    Here is my Processing code for this sketch. (It will be added to GitHub soon)

    import SimpleOpenNI.*;
    SimpleOpenNI kinect;

    import ddf.minim.*;

    Minim minim;
    AudioPlayer paulaSound;

    //**MPK is my note for Maria Paula Kinect sketch attributes

    //LIA is my note for Lia Martinez sketch attributes

    //Left siderz
    PVector shoulderL;
    PVector handL;
    PVector elbowL;
    //Right siderz
    PVector shoulderR;
    PVector handR;
    PVector elbowR;

    //LIA
    //some booleans for control
    boolean elbowUp;
    boolean timerOn;
    //LIA
    //for the timer
    int timer;
    int duration;

    //Declare Paula Images
    PImage pdL;
    PImage pdR;
    PImage broc;

    Paula p1;
    Paula p2;
    Paula p3;
    Paula p4;
    Paula p5;
    Paula p6;
    Paula p7;
    Paula p8;

    boolean droppedPaula = false;

    //MPK
    PImage backgroundImage;

    int[] userMap;
    color trans = color(0, 0, 0, 0);
    PImage resultImage;

    void setup() {
    size(640, 480);
    kinect = new SimpleOpenNI(this);
    kinect.enableDepth();
    kinect.setMirror(true);

    kinect.enableRGB();
    kinect.enableUser(SimpleOpenNI.SKEL_PROFILE_ALL);
    kinect.alternativeViewPointDepthToImage();

    minim = new Minim(this);
    paulaSound = minim.loadFile("creamy.wav"); //load paula sound

    //backgroundImage = loadImage("melting_butter2.png");
    backgroundImage = loadImage("chickenfrier150.jpg");
    resultImage = new PImage(640, 480, ARGB);

    //Before you intialize the Paula objects, load the Paula images
    pdL = loadImage("deenerLt2.png");
    pdR = loadImage("deenerRt2.png");
    broc = loadImage("broc.png");

    //These variables don't seem to change size...
    p1 = new Paula (width/2, height/2, pdL);
    p2 = new Paula (width/3, height/3, pdL);
    p3 = new Paula (width/3, height/3, pdL);
    p4 = new Paula (width/3, height/3, pdL);
    //
    p5 = new Paula (width/2, height/2, pdR);
    p6 = new Paula (width/3, height/3, pdR);
    p7 = new Paula (width/3, height/3, pdR);
    p8 = new Paula (width/3, height/3, pdR);
    }

    void draw() {
    imageMode(CORNER);
    kinect.update();
    //place bg image here
    image(backgroundImage, 0, 0);
    //image(kinect.rgbImage(), 0, 0);

    //remove background sketch goes here

    IntVector userList = new IntVector();
    kinect.getUsers(userList);

    if (userList.size() > 0) {
    int userId = userList.get(0);

    if ( kinect.isTrackingSkeleton(userId)) {
    //Below code existed pre-MPK
    //      println ("DRAW NOW " + userId);

    //MPK
    //cleaning background
    userMap = kinect.getUsersPixels(SimpleOpenNI.USERS_ALL);
    for (int i =0; i < userMap.length; i++) {
    // if the pixel is part of the user
    if (userMap[i] != 0) {
    // set the pixel to the color pixel
    resultImage.pixels[i] = kinect.rgbImage().pixels[i];
    }

    else {
    //set it to the background
    resultImage.pixels[i] = trans;
    }
    }
    //MPK
    resultImage.updatePixels();
    image(resultImage, 0, 0, 640, 480);
    drawSkeleton(userId);

    //My PVector variables
    shoulderL = new PVector(-1000, -1000);
    shoulderR = new PVector(1000, 1000);

    elbowL = new PVector(-1000, -1000);
    elbowR = new PVector(1000, 1000);

    handL = new PVector(1000, 1000);
    handR = new PVector(1000, 1000);
    }
    }
    }

    void drawSkeleton(int userId) {
    stroke(0);
    //strokeWeight(50);

    //kinect.drawLimb(userId, SimpleOpenNI.SKEL_NECK, SimpleOpenNI.SKEL_LEFT_SHOULDER);
    //kinect.drawLimb(userId, SimpleOpenNI.SKEL_LEFT_SHOULDER, SimpleOpenNI.SKEL_LEFT_ELBOW);

    //noStroke();
    //Make the joint nodes RED
    //fill(255,0,0);
    //drawJoint(userId, SimpleOpenNI.SKEL_LEFT_SHOULDER);
    // drawJoint(userId, SimpleOpenNI.SKEL_LEFT_ELBOW);

    stroke(0);
    // strokeWeight(30);

    shoulderL = getJoint(userId, SimpleOpenNI.SKEL_LEFT_SHOULDER);
    elbowL = getJoint (userId, SimpleOpenNI.SKEL_LEFT_ELBOW);
    handL =  getJoint (userId, SimpleOpenNI.SKEL_LEFT_HAND);

    shoulderR = getJoint(userId, SimpleOpenNI.SKEL_RIGHT_SHOULDER);
    elbowR = getJoint (userId, SimpleOpenNI.SKEL_RIGHT_ELBOW);
    handR =  getJoint (userId, SimpleOpenNI.SKEL_RIGHT_HAND);
    //
    //these were test lines and ellipses that I don't need
    //  line(shoulderL.x, shoulderL.y, elbowL.x, elbowL.y);
    //  fill (0, 255, 255);
    //  ellipse (shoulderL.x, shoulderL.y, 30, 30);
    //    fill (255, 0, 255);
    // // ellipse (elbowL.x, elbowL.y, 30, 30);

    //WRITING THE deenerL PImages
    image (broc, (handR.x - 50), (handR.y - 50));
    image (broc, (handL.x - 50), (handL.y - 50));

    //p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1p1
    //Paula on the camera left ELBOW using shoulderL
    // paulaSound = minim.loadFile("creamy.wav");
    float armAngle = atan2(shoulderL.y - elbowL.y, shoulderL.x - elbowL.x) + PI;
    float radius = shoulderL.dist(elbowL)*-.1;
    p1.px = shoulderL.x+radius*cos(armAngle);

    //********SET Y POSITION OF PAULA for p1
    if (p1.isDroppedPaula) {
    p1.dropPaula();
    paulaSound.play();
    //  paulaSound = minim.loadFile("creamy.wav");
    // println("PAULA'S Y POSITION: " + p1.py);
    }
    else {
    if (p1.handIsCloseToPaula(handR.x, handR.y)) {
    //  println("CLOSE TO PAULA!!!!! DROP HER!!!!!!!!!!!!!!");
    p1.isDroppedPaula = true;
    }
    else {
    p1.py = (shoulderL.y+radius*sin(armAngle)-30);
    // println("NOPE");
    }
    }
    //******************************

    p1.display();

    //p2p2p2p2p2p2p2p2p2p2p2p2p2p2p2p2
    //Paula on the camera left BICEP using shoulderL
    float armAngle2 = atan2(shoulderL.y - elbowL.y, shoulderL.x - elbowL.x) + PI;
    radius = shoulderL.dist(elbowL)*.3;
    p2.px = shoulderL.x+radius*cos(armAngle2);

    //********SET Y POSITION OF PAULA for p1
    if (p2.isDroppedPaula) {
    paulaSound = minim.loadFile("yall2.wav"); //load paula sound
    p2.dropPaula();
    paulaSound.play();
    // paulaSound = minim.loadFile("yall2.wav");
    //paulaSound.stop();
    //paulaSound.pause();
    //println("PAULA'S Y POSITION: " + p2.py);
    }
    else {
    if (p2.handIsCloseToPaula(handR.x, handR.y)) {
    // println("CLOSE TO PAULA!!!!! DROP HER!!!!!!!!!!!!!!");
    p2.isDroppedPaula = true;
    }
    else {
    p2.py = (shoulderL.y+radius*sin(armAngle2)-25);
    // println("NOPE");
    }
    }
    //******************************

    p2.display();
    //  //  //Paula on the camera left BICEP using shoulderL
    //  float armAngle2 = atan2(shoulderL.y - elbowL.y, shoulderL.x - elbowL.x) + PI;
    //  radius = shoulderL.dist(elbowL)*.3;
    //  p2.px = shoulderL.x+radius*cos(armAngle2);
    //  p2.py = shoulderL.y+radius*sin(armAngle2);
    //  p2.display();

    //p3p3p3p3p3p3p3p3p3p3p3p3p3p3p3p3
    //  //Paula on the camera left FOREARM using shoulderL
    float armAngle3 = atan2(shoulderL.y - elbowL.y, shoulderL.x - elbowL.x) + PI;
    radius = shoulderL.dist(elbowL)*.7;
    p3.px = shoulderL.x+radius*cos(armAngle3);

    //  //********SET Y POSITION OF PAULA for p1
    if (p3.isDroppedPaula) {
    p3.dropPaula();
    paulaSound.play();
    //  paulaSound = minim.loadFile("creamy.wav");
    // println("PAULA'S Y POSITION: " + p3.py);
    }
    else {
    if (p3.handIsCloseToPaula(handR.x, handR.y)) {
    // println("CLOSE TO PAULA!!!!! DROP HER!!!!!!!!!!!!!!");
    p3.isDroppedPaula = true;
    }
    else {
    p3.py = (shoulderL.y+radius*sin(armAngle3)-30);
    // println("NOPE");
    }
    }
    //******************************

    p3.display();
    //Paula on the camera left FOREARM using shoulderL
    //float armAngle3 = atan2(shoulderL.y - elbowL.y, shoulderL.x - elbowL.x) + PI;
    //  radius = elbowL.dist(handL)*.45;
    //  p3.px = elbowL.x+radius*cos(armAngle3);
    //  p3.py = shoulderL.y+radius*sin(armAngle3);
    //  p3.display();

    //p4p4p4p4p4p4p4p4p4p4p4p4p4p4p4p4p4p4p4p4p4p4
    //Paula on the camera left WRIST using shoulderL
    float armAngle4 = atan2(shoulderL.y - elbowL.y, shoulderL.x - elbowL.x) + PI;
    radius = shoulderL.dist(elbowL)*1.1;
    p4.px = shoulderL.x+radius*cos(armAngle4);

    //********SET Y POSITION OF PAULA for p1
    if (p4.isDroppedPaula) {
    p4.dropPaula();
    paulaSound.play();
    // paulaSound = minim.loadFile("butter.wav");
    // println("PAULA'S Y POSITION: " + p4.py);
    }
    else {
    if (p4.handIsCloseToPaula(handR.x, handR.y)) {
    //// println("CLOSE TO PAULA!!!!! DROP HER!!!!!!!!!!!!!!");
    p4.isDroppedPaula = true;
    }
    else {
    p4.py = (shoulderL.y+radius*sin(armAngle2)-30);
    // println("NOPE");
    }
    }
    //******************************

    p4.display();
    //  ////  //Paula on the camera left WRIST using shoulderL
    //  float armAngle4 = atan2(shoulderL.y - elbowL.y, shoulderL.x - elbowL.x) + PI;
    //  radius = elbowL.dist(handL)*.8;
    //  p4.px = elbowL.x+radius*cos(armAngle4);
    //  p4.py = shoulderL.y+radius*sin(armAngle4);
    //  p4.display();
    //  //

    //p5p5p5p5p5p5p5p5p5p5p5p5p5p5p5p5p5p5p5p5p5p5p5p5p5p5
    //Paula on the camera right ELBOW using shoulderR
    float armAngle5 = atan2(shoulderR.y - elbowR.y, shoulderR.x - elbowR.x) + PI;
    radius = shoulderR.dist(elbowR)*-.1;
    p5.px = shoulderR.x+radius*cos(armAngle5);

    //********SET Y POSITION OF PAULA for p1
    if (p5.isDroppedPaula) {
    p5.dropPaula();
    paulaSound.play();
    //  paulaSound = minim.loadFile("creamy.wav");
    //println("PAULA'S Y POISTION: " + p5.py);
    }
    else {
    if (p5.handIsCloseToPaula(handR.x, handR.y)) {
    //println("CLOSE TO PAULA!!!!! DROP HER!!!!!!!!!!!!!!");
    p5.isDroppedPaula = true;
    }
    else {
    p5.py = (shoulderR.y+radius*sin(armAngle5)-30);
    // println("NOPE");
    }
    }
    //******************************

    p5.display();
    //  //  //Paula on the camera right ELBOW using shoulderR
    //    float armAngle5 = atan2(shoulderR.y - elbowR.y, shoulderR.x - elbowR.x) + PI;
    //    radius = shoulderR.dist(elbowL)*.5;
    //   p5.px = shoulderR.x+radius*cos(armAngle5);
    //  p5.py = shoulderR.y+radius*sin(armAngle5);
    //  p5.display();
    //   p5.Jitter();

    //p6p6p6p6p6p6p6p6p6p6p6p6p6p6p6p6p6p6p6p6p6p6
    //Paula on the camera right BICEP using shoulderL
    float armAngle6 = atan2(shoulderR.y - elbowR.y, shoulderR.x - elbowR.x) + PI;
    radius = shoulderR.dist(elbowR)*.5;
    p6.px = shoulderR.x+radius*cos(armAngle6);

    //********SET Y POSITION OF PAULA for p1
    if (p6.isDroppedPaula) {
    p6.dropPaula();
    paulaSound.play();
    // println("PAULA'S Y POISTION: " + p6.py);
    }
    else {
    if (p6.handIsCloseToPaula(handL.x, handL.y)) {
    // println("CLOSE TO PAULA!!!!! DROP HER!!!!!!!!!!!!!!");
    p6.isDroppedPaula = true;
    }
    else {
    p6.py = (shoulderR.y+radius*sin(armAngle6)-30);
    //  println("NOPE");
    }
    }
    //******************************

    p6.display();

    //Paula on the camera right BICEP using shoulderL
    //  float armAngle6 = atan2(((shoulderR.y - elbowR.y) - 200), shoulderR.x - elbowR.x) + PI;
    //  radius = shoulderR.dist(elbowR)*.1;
    //  p6.px = shoulderR.x+radius*cos(armAngle6);
    //  p6.py = shoulderR.y+radius*sin(armAngle6);
    //  p6.display();
    //  p6.Jitter();

    //p7p7p7p7p7p7p7p7p7p7p7p7p7p7p7p7p7p7p7p7p7p7p7
    //Paula on the camera right FOREARM using shoulderR
    float armAngle7 = atan2(elbowR.y - handR.y, elbowR.x - handR.x) + PI;
    radius = elbowR.dist(handR)*.3;
    p7.px = elbowR.x+radius*cos(armAngle7);

    //********SET Y POSITION OF PAULA for p1
    if (p7.isDroppedPaula) {
    p7.dropPaula();
    paulaSound.play();
    // paulaSound = minim.loadFile("creamy.wav");
    // println("PAULA'S Y POSITION: " + p7.py);
    }
    else {
    if (p7.handIsCloseToPaula(handL.x, handL.y)) {
    //   println("CLOSE TO PAULA!!!!! DROP HER!!!!!!!!!!!!!!");
    p7.isDroppedPaula = true;
    }
    else {
    p7.py = (shoulderR.y+radius*sin(armAngle7)+40);
    //  println("NOPE");
    }
    }
    //******************************

    p7.display();

    //  //  //Paula on the camera right ELBOW using shoulderR
    //    float armAngle5 = atan2(shoulderR.y - elbowR.y, shoulderR.x - elbowR.x) + PI;
    //    radius = shoulderR.dist(elbowL)*.5;
    //   p5.px = shoulderR.x+radius*cos(armAngle5);
    //  p5.py = shoulderR.y+radius*sin(armAngle5);
    //  p5.display();
    //   p5.Jitter();

    //p8p8p8p8p8p8p8p8p8p8p8p8p8p8p8p8p8p8p8p8p8p8p8p8p8p8
    //Paula on the camera right ???? using shoulderR
    float armAngle8 = atan2(shoulderR.y - elbowR.y, shoulderR.x - elbowR.x) + PI;
    radius = shoulderR.dist(elbowR)*1.5;
    p8.px = shoulderR.x+radius*cos(armAngle8);

    //********SET Y POSITION OF PAULA for p8
    if (p8.isDroppedPaula) {
    p8.dropPaula();
    paulaSound = minim.loadFile("butter1.wav"); //load paula sound
    p8.dropPaula();
    paulaSound.play();
    // paulaSound = minim.loadFile("butter1.wav");
    //  println("PAULA'S Y POISTION: " + p8.py);
    }
    else {
    if (p8.handIsCloseToPaula(handL.x, handL.y)) {
    //    println("CLOSE TO PAULA!!!!! DROP HER!!!!!!!!!!!!!!");
    p8.isDroppedPaula = true;
    }
    else {
    p8.py = (shoulderR.y+radius*sin(armAngle8)-30);
    //   println("NOPE");
    }
    }
    //******************************

    p8.display();
    }
    //Paula on the camera right ELBOW using shoulderR
    //float armAngle5 = atan2(shoulderR.y - elbowR.y, shoulderR.x - elbowR.x) + PI;
    //radius = shoulderR.dist(elbowL)*.5;
    //p5.px = shoulderR.x+radius*cos(armAngle5);
    //p5.py = shoulderR.y+radius*sin(armAngle5);
    //p5.display();
    //   p5.Jitter();

    //Kinect Stuff

    PVector getJoint(int userId, int jointID) {
    PVector joint = new PVector();
    float confidence = kinect.getJointPositionSkeleton(userId, jointID, joint);
    if (confidence < 0.5) {
    return joint;
    }
    //This ellipse is where the joint nodes are. To plot the location of other images, set coordinates based on dist from convertedJoin.x & .y
    //E.G. convertedJoint.x + 10 etc.? No, it shifts
    PVector convertedJoint = new PVector();
    kinect.convertRealWorldToProjective(joint, convertedJoint);

    return convertedJoint;
    }

    void drawJoint(int userId, int jointID) {
    PVector joint = new PVector();
    float confidence = kinect.getJointPositionSkeleton(userId, jointID, joint);
    if (confidence < 0.5) {
    return;
    }
    //This ellipse is where the joint nodes are. To plot the location of other images, set coordinates based on dist from convertedJoin.x & .y
    //E.G. convertedJoint.x + 10 etc.? No, it shifts
    PVector convertedJoint = new PVector();
    kinect.convertRealWorldToProjective(joint, convertedJoint);
    ellipse(convertedJoint.x, convertedJoint.y, 5, 5);
    // ellipse(convertedJoint.x + 50, convertedJoint.y + 50, 50,50);
    }

    // user-tracking callbacks!
    void onNewUser(int userId) {
    println("start pose detection");
    kinect.startPoseDetection("Psi", userId);
    }

    void onEndCalibration(int userId, boolean successful) {
    if (successful) {
    println(" User calibrated !!!");
    kinect.startTrackingSkeleton(userId);
    }
    else {
    println(" Failed to calibrate user !!!");
    kinect.startPoseDetection("Psi", userId);
    }
    }

    void onStartPose(String pose, int userId) {
    println("Started pose for user");
    kinect.stopPoseDetection(userId);
    kinect.requestCalibrationSkeleton(userId, true);
    }

    void stop()
    {
    paulaSound.close();
    minim.stop();

    super.stop();
    }

    Tags

    Categories