Capture with Macbook Air internal Cam

edited December 2015 in Kinect

Dear all.

I am trying to resize my cam size to 640x480 with Macbook Air internal Cam. My cam size and and OpenCV size are 320x240 now, and when I try to change to 640x480 I am keep having trouble..

here's my cam list.. 스크린샷 2015-12-04 오전 5.27.00

When I am using 'Capture.list()[3]' and size 320x240 it works fine.. but when I change to 'Capture.list()[0]' and size 640x480 it is still working but really slow.. I just guess because of Rectangle but still I don't know why..

here's my code..

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

OpenCV openCV; Capture cam; Rectangle[] faces;

void setup() { size(640, 480);

cam = new Capture(this, Capture.list()[0]); cam.start();

openCV = new OpenCV(this, 640, 480); openCV.loadCascade(OpenCV.CASCADE_FRONTALFACE);

noFill(); stroke(0,255,0); }

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

faces = openCV.detect();
for (int i=0; i<faces.length; i++) {
  rect(faces[i].x, faces[i].y, faces[i].width, faces[i].height);

} }

Thank you so much. Stella.

Sign In or Register to comment.