You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, please, i need help. At me it is impossible to understand from functions setROI(). It is necessary to look for eyes in a face, I send parameters of the person to function opencv_eyes.setROI(face_x, face_y, face_width,face_height), and eyes are not on a face (pic "ROI apply.png"). If I comment on a line "opencv_eyes.setROI(face_x, face_y, face_width,face_height);", all ok (pic "ROI coment.png").
What do I do not so?
With respect for Strunkin Stepan.
if (webcameras.length == 0) {
println("There are no webcameras available for capture.");
exit();
} else {
println("Available webcameras:");
for (int i = 0; i < webcameras.length; i++) {
println(webcameras[i]);
}
// The webcamera can be initialized directly using an
// element from the array returned by list():
webcam = new Capture(this, webcameras[4]); // 32024030
webcam.start();
opencv_face = new OpenCV(this, width, height);
opencv_eyes = new OpenCV(this, width, height);
Hi, please, i need help. At me it is impossible to understand from functions setROI(). It is necessary to look for eyes in a face, I send parameters of the person to function opencv_eyes.setROI(face_x, face_y, face_width,face_height), and eyes are not on a face (pic "ROI apply.png"). If I comment on a line "opencv_eyes.setROI(face_x, face_y, face_width,face_height);", all ok (pic "ROI coment.png").
What do I do not so?
With respect for Strunkin Stepan.
roi apply
roi coment
sketch_to_Greg.zip
sketch:
//-----------------------------------------------------------------------------------------------------------------------------
import processing.video.;
import gab.opencv.;
import java.awt.Rectangle;
OpenCV opencv_face, opencv_eyes;
Rectangle[] faces, eyes;
int face_x, face_y, face_width, face_height;
Capture webcam;
void setup() {
size(320, 240);
String[] webcameras = Capture.list();
if (webcameras.length == 0) {
println("There are no webcameras available for capture.");
exit();
} else {
println("Available webcameras:");
for (int i = 0; i < webcameras.length; i++) {
println(webcameras[i]);
}
// The webcamera can be initialized directly using an
// element from the array returned by list():
webcam = new Capture(this, webcameras[4]); // 32024030
webcam.start();
opencv_face = new OpenCV(this, width, height);
opencv_eyes = new OpenCV(this, width, height);
opencv_face.loadCascade(OpenCV.CASCADE_FRONTALFACE);
opencv_eyes.loadCascade(OpenCV.CASCADE_EYE);
};
}
void draw() {
if (webcam.available() == true) {
webcam.read();
opencv_face.loadImage(webcam);
opencv_eyes.loadImage(webcam);
image(opencv_eyes.getInput()/webcam/, 0, 0);
}
}
The text was updated successfully, but these errors were encountered: