import hypermedia.video.*; OpenCV opencv; int contrast_value = 0; int brightness_value = 0; PImage hotdude; PFont font; int MODE = 0; void setup() { size(640, 480); opencv = new OpenCV( this ); opencv.capture( width, height ); // open video stream opencv.cascade( OpenCV.CASCADE_FRONTALFACE_ALT ); // load detection description, here-> front face detection : "haarcascade_frontalface_alt.xml" stroke(200, 200, 200); strokeWeight(2.0f); fill(255); font = createFont("FFScala", 32); hotdude = loadImage("HotGuy2.png"); textFont(font); } public void stop() { opencv.stop(); super.stop(); } void draw() { opencv.read(); image(opencv.image(), 0, 0); Rectangle[] faces = opencv.detect( 1.2, 2, OpenCV.HAAR_DO_CANNY_PRUNING, 40, 40 ); for(int i=0; i 1) { MODE = 0; } }