We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpVideo Capture,  Movie Playback,  Vision Libraries › Webcam working with Macam, but missing in sketch
Page Index Toggle Pages: 1
Webcam working with Macam, but missing in sketch (Read 2579 times)
Webcam working with Macam, but missing in sketch
Sep 2nd, 2009, 8:01am
 
Hi

I got my hands on a "PS3 Creative Eye" cam, I think thats the official name.
It shows up in Macam instantly, no problem, but I cant find a reference to it in Processing.
I am on a OS X 10.5.8 system.

I have tried:
Code:
  String[] cams = Capture.list();
println( cams );


which gives me:
Quote:
[0] "DV Video"
[1] "IIDC FireWire Video"
[2] "USB Video Class Video"


First one is not used and the next two are the build in iSight.
I have had success in the past with all sorts of cheap webcams and they always showed up in the Capture list.

I also tried with GSCapture, but that is giving a number of other errors..(think it is not quite plug n' play on the Mac yet)

What could be a next step to have this device show up in the Capture list?

Cheers.
Re: Webcam working with Macam, but missing in sketch
Reply #1 - Sep 2nd, 2009, 9:09pm
 
Have you read this old thread

http://processing.org/discourse/yabb2/?num=1190790093
Re: Webcam working with Macam, but missing in sketch
Reply #2 - Sep 3rd, 2009, 12:30am
 
Hi jaylfk
Thank you for the link. It makes sense as I have been developing stuff on my iMac at work, which has a different setup(used with a podcast server recording through the built in iSight) so that has probably made processing se the external cam because QT used the internal one.
I hope to solve it using the "settings()" approach. Well, of to the lab.

Thanks again:) I'll just drop a line in this thread if the link solves the issue.
Re: Webcam working with Macam, but missing in sketch
Reply #3 - Sep 3rd, 2009, 1:34am
 
Well, no luck this time :/

I can't find a single reference to someone getting the Playstation EYE working with Processing on OS X, or Quicktime for that matter.

Actually a bit frustrating when it performs so well using Macam
Re: Webcam working with Macam, but missing in sketch
Reply #4 - Sep 3rd, 2009, 6:38am
 
I works!! Smiley ... on my Work iMac as opposed to my MacBook Air which I have been trying on all day :/

I have no idea what "component/framework/library/woodoo" I have installed on my iMac as opposed to my MacBook Air.

Same OS and version.
Same Java version.
Same Macam app.
Same Macam component.
Same Processing Libraries.

The only difference I can find is the plugin components in the Library/quicktime/ folder, there are a few more on the iMac. I will try copying all the components to the MacBook to see if that does anything.

Anyways..  any ideas as how to test the fps in Processing, now that I got the camera working.
I did this sketch, but I fear that video.available() does not change from true to false fast enough, leaving time for me to ask for a new picture more than once before it gets locked:
Code:
/**
* PS3 EYE Speed Test
* by Ricki Gregersen (www.rickigregersen.com)
*
* Measure the frameRate possible with the Playstation EYE camera
*/


import processing.video.*;

Capture video;
float currentTime = 0.0;
float previousTime = 0.0;
int frame = 0;
float fps;

void setup()
{
size(320, 240);
frameRate(1000);

video = new Capture(this, width, height, "Sony HD Eye for PS3 (SLEH 00201)", 1000);
}

void draw()
{
currentTime = millis();
if (video.available())
{
video.read(); // Read a new video frame
frame++;
if( currentTime > previousTime + 1000 )
{
println(frame);
frame = 0;
previousTime = currentTime;
}
}
image(video, 0, 0);
}






Any good ways of measuring the fps, without affecting the result?

Cheers!
Page Index Toggle Pages: 1