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
Face Detect (Mac)  by Jaegon Lee (Read 2035 times)
Face Detect (Mac)  by Jaegon Lee
Nov 27th, 2008, 10:41pm
 
I'm using this library and works very well, but keep trhowing me this in the output

java(585,0x8c4c00) malloc: *** error for object 0x2: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
2008-11-27 19:33:50.975 java[585:15103] Camera central already inited - probably duplicate register. Skipping...
[000:000] Error(magiccammac.cc:265): MagicCam 0: MagicCamOpen: Not an allowed process!
[000:000] Error(magiccammac.cc:265): MagicCam 1: MagicCamOpen: Not an allowed process!
2008-11-27 19:33:51.858 java[585:1a907] *** _NSAutoreleaseNoPool(): Object 0x8a9af310 of class NSThread autoreleased with no pool in place - just leaking
Stack: (0x93a85adf 0x939921f2 0x93997f54 0x8a6d7216 0x8a6de3ab 0x8a6dc3f6 0x8a6e1bc4 0x8a6e044d 0x9682fded 0x9544cc98 0x9532837c 0x953286e8 0x9682fded 0x9544f05c 0x95331057 0x953286e8 0x9682fded 0x9544d960 0x95314bcd 0x953199c2 0x953140d7 0x9682fded 0x90a1d330 0x3587d07)

FaceDetect 052b

2008-11-27 19:33:51.934 java[585:1a907] Video frame delay = 33 ms.
[000:938] Error(magiccammac.cc:265): MagicCam 0: MagicCamOpen: Not an allowed process!
[000:936] Error(magiccammac.cc:265): MagicCam 1: MagicCamOpen: Not an allowed process!
2008-11-27 19:33:52.076 java[585:1a907] Video frame delay = 41 ms.
[001:054] Error(magiccammac.cc:265): MagicCam 0: MagicCamOpen: Not an allowed process!
[001:052] Error(magiccammac.cc:265): MagicCam 1: MagicCamOpen: Not an allowed process!

[0] "DVCPRO HD (1080i50)"
[1] "DVCPRO HD (1080i60)"
[2] "DVCPRO HD (720p60)"
[3] "Google Camera Adapter 0"
[4] "Google Camera Adapter 1"
[5] "IIDC FireWire Video"
[6] "Sony HD Eye for PS3 (SLEH 00201)"
[7] "USB Video Class Video"
[8] "Vídeo DV"

2008-11-27 19:33:52.154 java[585:1a907] Video frame delay = 19 ms.
2008-11-27 19:33:52.241 java[585:1a907] Video frame delay = 39 ms.
2008-11-27 19:33:52.325 java[585:1a907] Video frame delay = 24 ms.
2008-11-27 19:33:52.402 java[585:1a907] Video frame delay = 34 ms.
2008-11-27 19:33:52.479 java[585:1a907] Video frame delay = 11 ms.
2008-11-27 19:33:52.554 java[585:1a907] Video frame delay = 19 ms.
2008-11-27 19:33:52.661 java[585:1a907] Video frame delay = 27 ms........and so on

how can i deactivate this? anyone knows?,i think the first lines point me some error and then show me all the devices avaiables in my mac and then "Video frame delay = 11 ms."

here is the code

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

FaceDetect fd;
Capture cam;
PImage a;
PImage b;

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(640,480);
 a = loadImage("2.png");
 b = loadImage("mesada.png");
 cam = new Capture(this, 640, 480,"Sony HD Eye for PS3 (SLEH 00201)");
 //myCapture = new Capture(this, width, height, "Camera Name", 30);
 fd = new FaceDetect(this);
 fd.start("haarcascade_frontalface_default.xml", width,height,50);
 stroke(255,200,0);
 noFill();
 println(Capture.list());
}

void draw(){
 if (cam.available()) {
   cam.read();
   imageMode(CORNER);
   image(cam,0,0);
   Faces = fd.face(cam);
   int count = Faces.length;
   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;
       ///
       rectMode(CENTER);
       rect(x[i],y[i],r[i],r[i]);
       ellipse(x[i],y[i],r[i],r[i]);
       point(x[i],y[i]);
       ///
       imageMode(CORNER);
       image(a,x[i]-(r[i]/2),y[i]-(r[i]*1.4),r[i]+10,r[i]+10);
     }
   }
 }
 imageMode(CORNER);
 image(b,0,0);

}
Re:  Face Detect (Mac)  by Jaegon Lee
Reply #1 - Dec 1st, 2008, 1:28pm
 
I get a error

void setup(){
 size(640,480);
 a = loadImage("2.png");  
 b = loadImage("mesada.png");  
 cam = new Capture(this, 640, 480,"Sony HD Eye for PS3 (SLEH 00201)");
 //myCapture = new Capture(this, width, height, "Camera Name", 30);
 fd = new FaceDetect(this);
 fd.start("haarcascade_frontalface_default.xml", width,height,50);
 stroke(255,200,0);
 noFill();
 println(Capture.list());
}

it says the construtor FaceDetect is undifend
does anybody know how to solve this problem?
Re:  Face Detect (Mac)  by Jaegon Lee
Reply #2 - Dec 2nd, 2008, 5:19am
 
it seems you are using an older version of the faceDetect (mac) library. i am running face_example.pde(processing video library) with library version 05 from the faceDetect library page. works fine. the data folder as provided in the download goes into the sketch folder of your own faceDetect sketch.
Re:  Face Detect (Mac)  by Jaegon Lee
Reply #3 - Dec 10th, 2008, 11:21am
 
Do you have a link to the right libary? can't find it
Re:  Face Detect (Mac)  by Jaegon Lee
Reply #4 - Dec 10th, 2008, 11:16pm
 
sojamo is probably referring to this page for the facedetect library for mac" http://tokage.cafe24.com/facedetect/
Re:  Face Detect (Mac)  by Jaegon Lee
Reply #5 - Dec 12th, 2008, 9:05pm
 
I've found this library and all the problems solved works fine in my mac the only problem i have now is  i can't access the settings of my camera




http://ubaa.net/shared/processing/opencv/
Page Index Toggle Pages: 1