Diana Thompson, Sci-Fi

HAL 5 full-body exoskeleton


Biometric payments with Vein Scanning


Processing project

happy nothappy

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

Capture video;

OpenCV myopencv;

void setup() {
size(640, 480);
video = new Capture(this, 640/2, 480/2);
myopencv = new OpenCV(this, 640/2, 480/2);
myopencv.loadCascade(OpenCV.CASCADE_FRONTALFACE);
video.start();
}

void draw() {
scale(2);
myopencv.loadImage(video);
image(video, 0, 0 );
noFill();
stroke(123, 255, 24);
strokeWeight(9);
Rectangle[] faces = myopencv.detect();
println(“Number of Faces Detected:” + faces.length);

if(faces.length >0){
fill();
smooth();
stroke(0);
strokeWeight(5);
ellipseMode(CENTER);
ellipse(125, 125, 100, 100);
ellipse(110, 100, 10, 10);
ellipse(145, 100, 10, 10);
arc(125, 110, 80, 100, 0.2, PI – 0.2);
}
else{
fill(255);
smooth();
stroke(0);
strokeWeight(5);
ellipseMode(CENTER);
ellipse(125, 125, 100, 100);
ellipse(110, 100, 10, 10);
ellipse(145, 100, 10, 10);
arc(125, 150, 60, 0, 0.2, PI – 0.2);
}

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

void captureEvent(Capture c) {
c.read();
}

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s