Creating Installation 3

12 Jan

After working with the face tracking code and blur feature with mouse tracking I now been working on implementing these two ideas together. Using the code from face tracking and the blur feature I implemented on my earlier mouse tracking implementation i was able to finalise the project into a working installation.

Using the blur function i was able to remove the box tracking the face and place the blur in its place. Subsequently this made the screen blur when a face was detected on screen and no blur when no face was detected. The overall process of this implementation wasn’t to challenging. I found the whole process very interesting, from being able to understand the code and then being able to manipulate what happens on the screen.

Below I shall be posting a video of the process working and the code used to create the effect.

import gab.opencv.*;
import java.awt.*;

// initiate video and openCV
Capture video;
OpenCV opencv;

void setup() {
size(640, 480);
//scale video down to make it run smoother
video = new Capture(this, 640/2, 480/2);
opencv = new OpenCV(this, 640/2, 480/2);


void draw() {
//scale everything back up to fit window

image(video, 0, 0 );

stroke(0, 255, 0);

//create array for faces
Rectangle[] faces = opencv.detect();

for( int i=0; i<faces.length; i++ ) {
rect(faces[i].x, faces[i].y, faces[i].width, faces[i].height );

void blur() {
filter(BLUR, 6);

void captureEvent(Capture c) {;


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: