We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
FaceDetect -can't start example (Read 601 times)
FaceDetect -can't start example
Jun 14th, 2008, 11:22pm
 
Hi

I wanted to try the FaceDetct library for Mac, but I can't get it to work.

I'm running Mac Os X 10.5.3 Leopard and Processing 135.
I installed OpenCV into /Frameworks and everything else correctly. My sketch also has the data folder with the xml files.

When I run the example code I get the following error message

Code:

/tmp/build42629.tmp/Temporary_9104_5661.java:18:8:18:27: Semantic Error: No applicable overload was found for a constructor with signature "FaceDetect(Temporary_9104_5661)" in type "FaceDetect.FaceDetect". Perhaps you wanted the overloaded version "FaceDetect();" instead?

/tmp/build42629.tmp/Temporary_9104_5661.java:19:3:19:62: Semantic Error: No applicable overload for a method with signature "start(java.lang.String, int, int, int)" was found in type "FaceDetect.FaceDetect". Perhaps you wanted the overloaded version "void start(int $1, int $2);" instead?

/tmp/build42629.tmp/Temporary_9104_5661.java:30:13:30:24: Semantic Error: No applicable overload for a method with signature "face(processing.video.Capture)" was found in type "FaceDetect.FaceDetect". Perhaps you wanted the overloaded version "int[][] face();" instead?


I'm running this example code:


Code:

import processing.video.*;
import FaceDetect.*;

FaceDetect fd;
Capture cam;

int MAX = 10;

int[] x = new int[MAX];
int[] y = new int[MAX];
int[] r = new int[MAX];
int[][] Faces = new int[MAX][3];

void setup(){

 size(320,240,P3D);
 cam = new Capture(this, 320, 240);
 fd = new FaceDetect(this);
 fd.start("haarcascade_frontalface_alt.xml", width,height,30);
 stroke(255,200,0);
 
 noFill();
}

void draw(){
 if (cam.available()) {
   cam.read();
   image(cam,0,0);

   Faces = fd.face(cam);
   int count = Faces.length;
   //    println(count);
   if (count>0) {
     for (int i = 0;i<count;i++) {
       x[i] = Faces[i][0];
       y[i] = Faces[i][1];
       r[i] = Faces[i][2] * 2;
       ellipse(x[i],y[i],r[i],r[i]);
     }
   }
 }
}






deleating the following lines
fd = new FaceDetect(this);
 fd.start("haarcascade_frontalface_alt.xml", width,height,30);
   Faces = fd.face(cam);
helps run the skecth but of course doesn't do any face tracking Tongue



Any ideas?






Re: FaceDetect -can't start example
Reply #1 - Aug 7th, 2008, 4:22pm
 
I cannot reproduce your problem here, your code runs as it should.

Are you absolutely shure that you have the right framework installed in the right location? (Mine resides in ~/Library/Frameworks.)

Which one did you download and where exactly did you put it?
Page Index Toggle Pages: 1