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.
IndexProgramming Questions & HelpIntegration › video capture with Processing under Eclipse
Page Index Toggle Pages: 1
video capture with Processing under Eclipse (Read 1950 times)
video capture with Processing under Eclipse
Feb 12th, 2006, 8:53pm
 
Hi,

Reading the different threads about using Processing with Eclipse, I have managed to run simple P5 sketches from Eclipse.

But I'm not able to make following one to work.
I think I have "imported" in my Eclipse project all the requested JARs. (core; video; opengl; jogl; QTJava)

I get no error but the screen stay black.

Any ideas are welcome....thanks

code:

import processing.core.*;
import processing.video.*;

public class CaptureVideo extends PApplet {  


Capture camera;

public void setup()
{
size(320, 240, OPENGL);
String s = "PCTV USB2 2821 Capture-WDM";
camera = new Capture(this, s, width, height, 30);
// Opens the settings page for this capture device
//camera.settings();
}

void captureEvent(Capture camera)
{
camera.read();
}

public void draw()
{
image(camera, 0, 0);
}

}

Re: video capture with Processing under Eclipse
Reply #1 - Feb 17th, 2006, 4:19am
 
nobody has an idea ?

To add to my previous post.

I can access the camera when using "camera.settings();".
I mean I get the pop-up window will all the params, and it works fine.

so why don't I get the video in the applet ?

//h
Re: video capture with Processing under Eclipse
Reply #2 - Feb 26th, 2006, 3:53pm
 
Either:

make captureEvent public

public voic captureEvent(Capture cap) {
 cap.read();
}

or use available() in the draw loop

public void draw() {
 if(cap.available() {
   cap.read();
 }
}
Re: video capture with Processing under Eclipse
Reply #3 - Mar 27th, 2006, 10:50pm
 
Thank you!! making captureEvent public works.
Page Index Toggle Pages: 1