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
Any ideas?