Lab 10 Angelica Castro-Mendoza/ Professor Daniel Mikesell

For my last lab, I was inspired by snapchat, as was seemingly everyone else, and a book I really loved as a child. The book is called Daisy-Head Mayzie by Dr. Seuss. The girl in the book, Mayzie, has a daisy growing out of her head. So as an ode to Dr.Seuss, I used Open CV to make a sketch that would recognize someone’s face and show a daisy on top of their head.

Here is the code:

opencv.loadCascade(OpenCV.CASCADE_FRONTALFACE);
video.start();
daisy = loadImage (“daisy.png”);
}

void draw() {
scale(2);
opencv.loadImage(video);
image(video, 0, 0 );
noFill();
stroke(0, 255, 0);
strokeWeight(1);
Rectangle[] faces = opencv.detect();
println(faces.length);
for (int i = 0; i < faces.length; i++) {
println(faces[i].x + “,” + faces[i].y);
image(daisy, faces[i].x*1.2, faces[i].y*.2, faces[i].width*.3, faces[i].height*.4);
}
}
void captureEvent(Capture c) {
c.read();
}

Here is a picture of daisy-headed me:

daisy headed angelica 2

Leave a Reply