IMG_6316.JPG

itp

Week 8 ICM: Video Input

Inspiration:

Daniel Rozin’s “Mirror Number 5” and Chuck Close’s portraits served as the inspiration for my ICM homework this weekend. I wanted to make a photobooth that created a rainbow, pixelated portrait of themselves, and also allowed them to save “photos” from the photbooth.

close.jpg

I started off referencing the code for the Brightness Mirror example. I changed the code so that the outputted pixels were circles instead of rectangles and filled with random colors, and then filled them with random color. In order to make the video feed easier on the eye, I slowed the frame rate down to 5 frames per second.

 Photo captured from the photobooth

Photo captured from the photobooth

 Photo captured from the photobooth

Photo captured from the photobooth

WHAT WORKED:

I played around with the vScale to affect the pixelation. I liked the distortion effect of having the image made out of larger circles. I wanted to give the user the option to adjust the pixelation of the image, which I did using a slider, and also to save the photo, like in a real photobooth. I used the saveCanvas function, wrapped in a button call, to let the user download their image on the canvas at specific moments.

myCanvas (9).jpg

WHAT I COULDN’T GET TO WORK

  • When I included the p5 DOM library, my code stopped working. Not having the DOM library caused the following issues:

    • I wanted to add multiple sliders, to change the colors of the circles, but without a way to position them, they overlapped and couldn’t be labelled, which I thought would be too user-unfriendly.

    • I wanted to add labels to the sliders, but ended up having to hardcode them as a createElement(p, x, y), which gave me less freedom to position and stylize them.

    • I tried to add an option (first with a checkbox, then with a radio button) to change the pixel shape from ellipse to rectangle using an if/ else statement in the rainbowPixel() function, but when I added this option and it was checked, the capture went black.

      • let val = radio.value();

        if (val) {

        rc = random(255);

        gc = random(255);

        bc = random(100, 255);

        noStroke();

        fill(rc, gc, bc);

        rectMode(CENTER);

        rect(x * vScale, y * vScale, w + slider.value());

        }

        else {

        rc = random(255);

        gc = random(255);

        bc = random(100, 255);

        noStroke();

        fill(rc, gc, bc);

        rectMode(CENTER);

        ellipse(x * vScale, y * vScale, w + slider.value());

        }

        }

ITP, ICMCaroline NeelComment