OpenKinect-for-Processing icon indicating copy to clipboard operation
OpenKinect-for-Processing copied to clipboard

Face detection very slow

Open DavidFlores79 opened this issue 8 years ago • 1 comments

Im trying the face detection example based on your library but the video is very slow, i read that i should give half size to the Opencv input but i dont know where?? PLease help me! Thanks

`import gab.opencv.*; import java.awt.Rectangle;

/* KINECT / import org.openkinect.freenect.; import org.openkinect.processing.*;

OpenCV opencv; Kinect kinect; Rectangle[] faces;

void setup() {

size(640, 480); // Kinectv1 kinect = new Kinect(this); kinect.initVideo();

}

void draw() {

//opencv.loadImage(kinect.getVideoImage()); opencv = new OpenCV(this, kinect.getVideoImage()); opencv.loadCascade(OpenCV.CASCADE_FRONTALFACE);

faces = opencv.detect();

image(kinect.getVideoImage(), 0, 0, 640, 480);

noFill(); stroke(0, 255, 0); strokeWeight(3); for (int i = 0; i < faces.length; i++) { rect(faces[i].x, faces[i].y, faces[i].width, faces[i].height); } }`

DavidFlores79 avatar Jul 26 '17 02:07 DavidFlores79

This is not a problem or anything to do with this library but something about OpenCV. I'd suggest asking this question on StackOverflow or any forum where they answer general coding questions.

aptoptout avatar Jan 23 '19 17:01 aptoptout