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 › QT4Java Capture Problems + Eclipse
Page Index Toggle Pages: 1
QT4Java Capture Problems + Eclipse (Read 845 times)
QT4Java Capture Problems + Eclipse
Aug 8th, 2007, 8:28pm
 
Hi everyone,

I'm having issues making basic capture work from within Eclipse. I'm able to successfully add QTJava.zip and import processing.video.*. The issue seems to be opening and closing the camera. Sometimes when I Run as Applet, I just get a blank window (no exceptions, just silence), and can't turn on the camera. At random, it will occasionally work. The only way I consistently get it to work is to load something like GettingStartedCapture in Processing 0125, run its applet from there, close that applet, then launch the applet from Eclipse -- then it works perfectly, until I try to launch the applet a second time within Eclipse. Adding cam.stop() and cam.dispose() to an event before quick doesn't seem to help.

System I'm on currently:

JVM 1.5
QT 7.2
Eclipse 3.2.2
Processing 0125

So you can try something like:

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

public class HelloCapture extends PApplet {


Capture cam;



public void setup() {


size(640, 480);


cam = new Capture(this, 320, 240);

}



public void draw () {


cam.read();




set(160, 100, cam);

}


public void mousePressed() {


cam.stop();

}
}

Bizarrely, I had JMyron working perfectly within Eclipse on Windows; it was just switching to QT4Java + Mac that seems to be making me stumble.

Peter
PS -- need to check the main boards to see if someone has posted this yet, but QT 7.2 can wreak total havoc with QT4Java (among the many other things 7.2 can break) -- reinstalling from Apple's site seems to make everything happy again.
Re: QT4Java Capture Problems + Eclipse
Reply #1 - Aug 8th, 2007, 8:38pm
 
This is kind of interesting, too -- I can't even get
println(Capture.list());
... to work from within Eclipse. So it looks like maybe it's not seeing the capture devices, period?
Page Index Toggle Pages: 1