Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

A Video Capture Question??? (Capture finds device, but only get black screen.)

$
0
0
Hello,
I recently purchased this device from ebay, Link  The device works great with the Ulead software that came with it. I have a micro camera connected to it for a project I am working on. The problem is when I try to capture the feed in Processing all I get is a black frame. I have included a test sketch as follows. Am I missing a codec or perhaps coding the sketch improperly? Any help would be greatly appreciated as this is a integral part of a bigger project I am working on.

Thanks
Ron

Test sketch:
  1. import processing.video.*;

  2. Capture cam;

  3. void setup() {
  4.   size(720, 480);
  5.   String[] cameras = Capture.list();
  6.   if (cameras.length == 0) {
  7.     println("There are no cameras available for capture.");
  8.     exit();
  9.   } else {
  10.     println("Available cameras:");
  11.     for (int i = 0; i < cameras.length; i++) {
  12.       println(cameras[i]);
  13.     }
  14.     cam = new Capture(this, 720, 480, cameras[0], 30);
  15.     cam.start();     
  16.   }      
  17. }

  18. void draw() {
  19.   if (cam.available() == true) {
  20.     cam.read();
  21.   }
  22.   image(cam, 0, 0);
  23. }

Viewing all articles
Browse latest Browse all 1768

Trending Articles