Loading...
Logo
Processing Forum
Hello, I m using Mac book pro and OS10.7 Lion, Processing 1.51

I get the problem when I run the code for video capture with iSight camera.
OS 10.5 Leopard did not have this error.
On OS10.7, now any codes I could not run with the function "capture()", also the basic code below.

import processing.video.*; 
Capture myCapture; 

void setup() 
      size(200, 200); 
      myCapture = new Capture(this, width, height, 30); 

void captureEvent(Capture myCapture) { 
      myCapture.read(); 

void draw() { 
      image(myCapture, 0, 0); 
}

---

Once I gave up the using capture class, and tried to use OpenCV library.
But it also does not work on my computer. The code is below.

import hypermedia.video.*; 
OpenCV opencv;   
void setup() { 
      size( 640, 480 );   
// open video stream 
opencv = new OpenCV( this ); 
opencv.capture( 640, 480 ); 
}   

void draw() {   
opencv.read();   
image( opencv.image(), 0, 0 ); 
}


I saw the same topics on the web, but I could not find the way to solve these problem.

Please give me any advise .

thanks.

Replies(2)

Hi,

i just realized, that i get the same errors now (maybe because of an update to osx 10.7.4).
Adding the Camera-name to the Capture()-call, seems to fix it.
Copy code
  1.       myCapture = new Capture(this, width, height,  Capture.list()[1], 30); 
Hello, 


Thanks for your big advise. As the way you wrote, it seems to fix.
Thank you very much, I can go forward now.
I will think about the case of openCV as same reason.