A Video Capture Question??? (Capture finds device, but only get black screen.)
in
Core Library Questions
•
1 month ago
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:
- import processing.video.*;
- Capture cam;
- void setup() {
- size(720, 480);
- String[] cameras = Capture.list();
- if (cameras.length == 0) {
- println("There are no cameras available for capture.");
- exit();
- } else {
- println("Available cameras:");
- for (int i = 0; i < cameras.length; i++) {
- println(cameras[i]);
- }
- cam = new Capture(this, 720, 480, cameras[0], 30);
- cam.start();
- }
- }
- void draw() {
- if (cam.available() == true) {
- cam.read();
- }
- image(cam, 0, 0);
- }
2