Issues with quicktime.std.STDQtException
in
Core Library Questions
•
1 year ago
Hello all,
I am trying to create a basic screen capture program with Java and Processing, however I am coming across the following exceptions when attempting to run the program:
Exception in thread "Animation Thread" java.lang.NoClassDefFoundError: quicktime/std/StdQTException
at Camera.setup(Camera.java:38)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: quicktime.std.StdQTException
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 4 more
Here is the code that produced said exceptions. Any help would be greatly appreciated! Thanks, Mike
- }
- import processing.video.*;
- import processing.core.*;
- public class Camera extends PApplet {
- Capture myCapture;
- //Instance Variables
- private int width;
- private int height;
- private int fps;
- //Not sure if a main is necessary
- public static void main(String [] args) { }
- public Camera(){
- super();
- }
- //Possible constructor, also not sure if needed
- public Camera(PApplet p, int iWidth, int iHeight, int iFps) {
- super();
- width = iWidth;
- height = iHeight;
- fps = iFps;
- }
- public void setup()
- {
- size(640, 480);
- // The name of the capture device is dependent on
- // the cameras that are currently attached to your
- // computer. To get a list of the
- // choices, uncomment the following line
- //println(Capture.list());
- // To select the camera, replace “Camera Name”
- // in the next line with one from Capture.list()
- // myCapture = new Capture(this, width, height, “Camera Name”, 30);
- // This code will try to use the camera used
- //myCapture = new Capture(this, width, height, 30);
- }
- void captureEvent(Capture myCapture) {
- myCapture.read();
- }
- public void draw() {
- image(myCapture, 0, 0);
- loadPixels();
- for (int i = 1; i < width*height; i++) {
- float c1 = (red(pixels[i]) + blue(pixels[i]) + green(pixels[i]))/3;
- float c2 = (red(pixels[i-1]) + blue(pixels[i-1]) + green(pixels[i-1]))/3;
- float c3 = (255 + (c1-c2))/2;
- pixels[i-1] = color(c3,c3,c3);
- }
- updatePixels();
- }
- }
1