OpenCV and Processing
Posted: 06 January 2010 06:50 AM   [ Ignore ]
New Member
Rank
Total Posts:  23
Joined  2010-01-06

1. Standard Processing video lib:
I try to use PS3Eye with your driver in Processing on Vista 32bit.
This works great with the standard lib processing.video.*: Thnx a lot.
Strange enough:
If I use println(Capture.list()) I get the message:
“Couldnt find any captuer devices, read…bla bla”. Without this line
everything works fine.

2. With opencv
If I try to use opencv.capture I ALWAYS get the error message:
“Error while starting capture: device 0”.
I tried a lot of things, but I could not get around this problem.

Any ideas for me ?

Profile
 
 
Posted: 06 January 2010 12:35 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  585
Joined  2009-09-17
knutl - 06 January 2010 06:50 AM

1. Standard Processing video lib:
I try to use PS3Eye with your driver in Processing on Vista 32bit.
This works great with the standard lib processing.video.*: Thnx a lot.
Strange enough:
If I use println(Capture.list()) I get the message:
“Couldnt find any capture devices, read…bla bla”. Without this line
everything works fine.

2. With opencv
If I try to use opencv.capture I ALWAYS get the error message:
“Error while starting capture: device 0”.
I tried a lot of things, but I could not get around this problem.

Any ideas for me ?

These are all standard DirectShow ways of using the PS3Eye camera.
For more power and control you could try and download the CL-Eye SDK and look at the examples included.
We have the PS3Eye multi-camera wrapper class for Java. Using that you will get access to full camera’s parameters and high capture frame rates.

AlexP

Profile
 
 
Posted: 06 January 2010 01:07 PM   [ Ignore ]   [ # 2 ]
New Member
Rank
Total Posts:  23
Joined  2010-01-06

AlexP
is the answer: It should and must work with OpenCV ?
knutl

Profile
 
 
Posted: 06 January 2010 04:51 PM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  585
Joined  2009-09-17
knutl - 06 January 2010 01:07 PM

AlexP
is the answer: It should and must work with OpenCV ?
knutl

Could you clarify in more detail what are you trying to accomplish. Are you trying to use OpenCV in Java?
DirectShow component of the driver works and it is intended for the end users primarily for web chat applications.
In the SDK there is a C++ sample that provides the usage example with OpenCV and multiple cameras.
For Java, we have a wrapper class that provides direct image data in Java environment.
Again, if you provide some more info on what is exactly the issue (with maybe some code that we can look at) we might be able to work and resolve it.

AlexP

Profile
 
 
Posted: 07 January 2010 03:10 AM   [ Ignore ]   [ # 4 ]
New Member
Rank
Total Posts:  23
Joined  2010-01-06

AlexP
thank you for your help.

I try to do some color/movement tracking for an art application.
Best for me would be to use OpenCV in Processing, because it has lots of useful functions
for my application.
Below is a little example to show the problem. I just want to read
a videostream into OpenCV


import hypermedia.video.*;
OpenCV opencv;

void setup() {
  size( 320, 240 );
  opencv = new OpenCV( this );
  opencv.capture( width, height );            // open video stream
}

public void stop() {
  opencv.stop();
  super.stop();
}

void draw() {
  opencv.read(); //get the next frame
  image(opencv.image(),0,0); // show it
}

If I run this I always get the error message:
“Error while starting capture: device 0”

If I do the same with the Standard video Processing lib it works:

import processing.video.*;
Capture cam;

void setup() {
  size(640, 480);
  cam = new Capture(this, 320, 240);
}


void draw() {
  if (cam.available() == true) {
  cam.read();
  image(cam, 160, 100);
  }
}

Just tryed to I use a work around with OpenCV:
Use processing.video to read the camera and copy the image to the opencv buffer.
And go from there with openCV.
This works, but I have no idea how much performance this costs.
greetings knutl

Profile
 
 
Posted: 07 January 2010 08:35 AM   [ Ignore ]   [ # 5 ]
New Member
Rank
Total Posts:  23
Joined  2010-01-06

Hi AlexP
I did what you sayed and used your SDK to capture the camerea input and
it worked smoothly.
I copy the captured image to opencv and go from there without
using opencv.capture() any more.
So forget about my problem, I am happy working with the SDK and opencv
Thnx a lot
knutl

Profile
 
 
Posted: 07 January 2010 12:03 PM   [ Ignore ]   [ # 6 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  585
Joined  2009-09-17
knutl - 07 January 2010 08:35 AM

Hi AlexP
I did what you sayed and used your SDK to capture the camerea input and
it worked smoothly.
I copy the captured image to opencv and go from there without
using opencv.capture() any more.
So forget about my problem, I am happy working with the SDK and opencv
Thnx a lot
knutl

You’re welcome. Using this API you should see the better performance as well.

AlexP

Profile
 
 
 
 


RSS 2.0     Atom Feed