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

How to get work a uEye cam in processing?

$
0
0
Hello guys, 
I was trying to make a tracking with a IR cam, but the problem is that processing doesn't recognize my cam. 

I'm working with a Asus Eee PC 1000H and I've tested this little script with three cam's. First with the internal cam from my Netbook. Secondly with a Logitech C310 and at last with the IDS uEye UI-1555LE-C-GL. Which is my IR cam.

My result was that the first and second cam works, but the third not. I have all the drivers and progs installed that I could find for this cam, but it only works with the own programs. Of course I've Quick Time Player and VDig installed. 

I try this script also in to different processing Versions. First the 1.5.1 and secondly the 2.0b7. In the first Version nothing works and in the second only the first and the second cam. 

This is the script that I found here in the processing Website, which I've used for trying:
  1. import processing.video.*;

  2. Capture cam;

  3. void setup() {
  4.   size(640, 480);

  5.   String[] cameras = Capture.list();
  6.   
  7.   if (cameras.length == 0) {
  8.     println("There are no cameras available for capture.");
  9.     exit();
  10.   } else {
  11.     println("Available cameras:");
  12.     for (int i = 0; i < cameras.length; i++) {
  13.       println(cameras[i]);
  14.     }
  15.     
  16.     // The camera can be initialized directly using an 
  17.     // element from the array returned by list():
  18.     cam = new Capture(this, cameras[0]);
  19.     cam.start();     
  20.   }      
  21. }

  22. void draw() {
  23.   if (cam.available() == true) {
  24.     cam.read();
  25.   }
  26.   image(cam, 0, 0);
  27.   // The following does the same, and is faster when just drawing the image
  28.   // without any additional resizing, transformations, or tint.
  29.   //set(0, 0, cam);
  30. }

I don't know if this example doesn't work with IR cams. 
I was also trying to solve it with the other processing Video examples and also with OpenCV, but it doesn't works at all. Only with this example. 

Maybe you have an idea for my solution. Thanks for your time. 

 

Viewing all articles
Browse latest Browse all 1768

Trending Articles