Giova
YaBB Newbies
Offline
Posts: 9
Re: Problem exporting application
Reply #2 - Jul 24th , 2008, 5:17pm
Thanks a lot for your response! So, i send all these information to the Processing Bug Report. For your information, i use Processing 0135 Beta with a macbook with Leopard 10.5.4. This error come every time i try to export any sketches using Shift+cmd+E. I put my sketches in one folder located in my Desktop. This is the code, for any suggestion: import hypermedia.video.*; PImage img; OpenCV opencv; // contrast/brightness values int contrast_value = 0; int brightness_value = 0; void setup() { size( 640, 480 ); PImage a; // Declare variable "a" of type PImage img = loadImage("Max.png"); // Load the images into the program 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" // print usage println( "Drag mouse on X-axis inside this sketch window to change contrast" ); println( "Drag mouse on Y-axis inside this sketch window to change brightness" ); } public void stop() { opencv.stop(); super.stop(); } void draw() { // grab a new frame // and convert to gray opencv.read(); opencv.convert( GRAY ); opencv.contrast( contrast_value ); opencv.brightness( brightness_value ); // proceed detection Rectangle[] faces = opencv.detect( 1.2, 2, OpenCV.HAAR_DO_CANNY_PRUNING, 40, 40 ); // display the image image( opencv.image(), 0, 0 ); // draw face area(s) noFill(); stroke(255,0,0); for( int i=0; i<faces.length; i++ ) { image(img, faces[i].x+180, faces[i].y-200); // image(img, faces[i].width, faces[i].height ); } } /** * Changes contrast/brigthness values */ void mouseDragged() { contrast_value = (int) map( mouseX, 0, width, -128, 128 ); brightness_value = (int) map( mouseY, 0, width, -128, 128 ); } Thanks a lot PhiLho!