Camera Capture Issues

Hi,

I am trying a simple sketch to display a camera "viewfinder" with Processing. The sketch works on my desktop computer, but doesn't work on my laptop (Dell Venue 11 Pro):

import processing.video.*;

Capture cam;

void setup() { size(640, 480); cam = new Capture(this, width, height); cam.start(); }

void draw() { if (cam.available()) { // Reads the new frame cam.read(); println("initialized"); } image(cam, 0, 0); }

I have tried both v 2.1.1 and v 2.1. The camera does get initialized (as I can see the LED light up), but .available() is returning false (initialized never gets printed). And a blank Window is shown. Another symptom is that if I try to get Captuer.list(), the sketch doesn't even create a Window (it apparently hangs). There are no exceptions thrown. Any ideas on how to diagnose the problem?

Thanks! Bilal

Answers

  • edited February 2014

    When I run OP's sketch on the following environment it works fine.

    Windows 7 SP1 x64, AMD Athlon 64 X2 Dual Core 6400+, 3.2 GHz, 3 GB RAM, NVIDIA GeForce 9800 GT, GeForce 332.21 Driver, Processing 2.1, I don't think these matter in Processing 2.x but FYI, Java 1.7.0_51, Quicktime 7.7.4.

    This is very interesting since I've had many problems getting this to work on both my Desktop and my work laptop.

    Note: When testing OP's sketch in Processing 2.1.1 I get the following errors:

    (java.exe:5960): GStreamer-WARNING **: Failed to load plugin 'D:/Program Files (x86)/processing-2.1.1/modes/java/libraries/video/library/\windows64\plugins\libgstapetag.dll': `D:/Program Files (x86)/processing-2.1.1/modes/java/libraries/video/library/\windows64\plugins\libgstapetag.dll': The specified module could not be found.

    (java.exe:5960): GStreamer-WARNING **: Failed to load plugin 'D:/Program Files (x86)/processing-2.1.1/modes/java/libraries/video/library/\windows64\plugins\libgstapp.dll': `D:/Program Files (x86)/processing-2.1.1/modes/java/libraries/video/library/\windows64\plugins\libgstapp.dll': The specified module could not be found.

    This repeats for many more modules. Notice the extra slash between "library" and "windows64" and the change from forward to back slashes mid-stream.

Sign In or Register to comment.