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.
Pages: 1 2 
Some PS3 Eye test results (Read 8975 times)
Some PS3 Eye test results
Nov 24th, 2009, 1:20pm
 
Note: under vista 32-bit the JMyron is only able to get 320*240. I must have made a mistake writing the table below.

More notes: with the system on row 3, (2.4GHz) I was able to capture 640*480 at 60FPS without skipping frames.

Even more notes: I tested one more core 2 duo gateway laptop with vista 64-bit. It works fine. With an integrated video card it's able to get 50FPS on my processing program and 60FPS with AlexP's test program. Now I suspect my blasted Lenovo Ideapad Y530 has some compatibility issues. It's same spec as gateway but with dedicated video. It won't recoginze a firewire express card I bought either. It has Intel ICH9 chipset compared with gateway's ICH8 chip, maybe that's the problem?

Original post: I've done some testings on the stability of PS3 Eye camera on several PC operating systems and programs. Here's some results just in case you're curious. It seems the 64-bit system driver has some issues while the 32-bit system driver is perfect.
The system driver is written by Alex Popovich, follow this link for the driver.
http://go2.wordpress.com/?id=725X1342&site=alexpopovich.wordpress.com&url=http%3A%2F%2Fwww.codelaboratories.com%2Ffiles%2FPS3Eye%2520Camera%2520Setup%2520v3.0.0.0901.exe

The Amcap, virtual-dub, JMyron processing lib can be googled. Den Ivanov's library is in working progress and is posted on his original post on the video capturing board (latest version on the reply of this post).

...
Re: Some PS3 Eye test results
Reply #1 - Nov 24th, 2009, 11:43pm
 
liudr
very useful data, thanks a lot.
Question: How did you mange to run the PS3eye with
a resolution of 640*480 in JMyron ?
This does not work in my environment (vista home premium + sp2, 32 bit)
or I do something wrong.
Re: Some PS3 Eye test results
Reply #2 - Nov 25th, 2009, 7:18am
 
knutl,

It's a mystery to me. I was running the same program on all three systems. All I did in the program was to set the capture to 640 by 480. I was running on vista home basic 32-bit though instead of your home premium 32-bit. Now I'm guessing it may depend on Java version. I'll check when I get home.

I unzipped the .jar file in JMyron's lib and that file indicated it was last updated in 2004 and I am not surprised that since things changed so much in the last 5 years, the lib may not be as compatible as it was 5 years back. Now I am hoping that Dan Ivanov with pick up the torch left by Josh Nimoy and bring us a better capture library on PC.

The things JMyron doesn't have:
Getting a list of capture devices and choose which one to use
Setting capture mode and fps
Programatically setting capture properties like exposure
And possibly capturing multiple sources (maybe relevant to smaller amount of audience than the rest)

I really like this PS camera. It is fast and cheap ($30 at amazon). It makes processing look fast in video capturing Grin Grin Grin
Re: Some PS3 Eye test results
Reply #3 - Nov 25th, 2009, 2:07pm
 
Bad news: I had the hope that you found a way to get along with the limitations of JMyron (:. I have really no interest in fiddeling around too much with Java and JMyron versions in order to find probably a way for 640*480 and the rest...
Unfortunately I need the JMyron functionality and will now try to use Dans lib for capturing as a "front end" of JMyron through hijacking. Lets see if this works.
And yes: PS3eye is really a good piece of hardware, works well for quite a nice prize.
Re: Some PS3 Eye test results
Reply #4 - Nov 25th, 2009, 11:30pm
 
If you need JMyron blobs functionality i think i can easy move it to my ps3eye c++ code without any problems. as for capture pin and camera settings this will be a tricky part ) but i will try to implement all this controls too. I think i will post update on this weekends.
Re: Some PS3 Eye test results
Reply #5 - Nov 25th, 2009, 11:43pm
 
Yes, that was exactly was I was looking for. Of course it would be very nice to have that in your lib too !!
Thnx a lot, waiting for your updated lib.
Re: Some PS3 Eye test results
Reply #6 - Nov 26th, 2009, 8:16am
 
Thank you big time Den! I've looked at your code and could "understand" what is going on but I'm not experienced with c++ or interoperating java with c++. If you could wrap the following besides the ones you already did so that I can call them in java that will be great!

     virtual bool IsAutoAGC() PURE;
     virtual void AutoAGC(bool enable) PURE;
     // Gain value [0..79]
     virtual int GetGain() PURE;
     virtual void SetGain(int value) PURE;

     virtual bool IsAutoAEC() PURE;
     virtual void AutoAEC(bool enable) PURE;
     // Exposure value [0..511]
     virtual int GetExposure() PURE;
     virtual void SetExposure(int value) PURE;

     virtual bool IsAutoAWB() PURE;
     virtual void AutoAWB(bool enable) PURE;
     virtual void GetWhiteBalance(BYTE *r, BYTE *g, BYTE *b) PURE;
     virtual void SetWhiteBalance(BYTE r, BYTE g, BYTE b) PURE;

     virtual bool IsColorBar() PURE;
     virtual void ColorBar(bool enable) PURE;

If anyone wants a property dialog, they can still use controlP5 library for processing to do it. Righ now I need a programatic way to control exposure say keep it at 1/250 seconds so I can capture images without blur. My intention is to use images to analyze the physics of motion in college physics labs.

Re: Some PS3 Eye test results
Reply #7 - Nov 26th, 2009, 8:24am
 
knutl,

I tested again on my vista 32-bit system and this time the JMyron gives garbled imagesand fps is capped at 30 unlike the previous >50. Weired. I also had a misfortune when I had my flash drive on a nearby usb port. The screen freezes on ps3eyetest and Dan's test program. But it only occured once and after unplugging and replugging it never happened again although I was trying to re-create the program by connecting a flash drive. Just a warning to you, don't use anything highspeed like flash drive while using the ps3eye cam.
Re: Some PS3 Eye test results
Reply #8 - Nov 26th, 2009, 9:06am
 
liudr,
yes yes, JMyron is a difficult friend Smiley Thanks for the warning.
I guess I will stick to Dans lib, because he promised to include
JMyrons tracking stuff also in his lib and if he does the programmatic settings interface you are asking for: what else do I need.
Re: Some PS3 Eye test results
Reply #9 - Nov 26th, 2009, 3:36pm
 
liudr, i added new version with Gain/Exposure controls.

http://ps3eye.googlecode.com/files/PS3Eye.v.0.0.2.zip

all stuff below work for me Wink

Code:
public boolean IsAutoAGC() 
public void AutoAGC(boolean enable)
// Gain value [0..79]
public int GetGain()
public void SetGain(int value)
public boolean IsAutoAEC()
public void AutoAEC(boolean enable)
// Exposure value [0..511]
public int GetExposure()
public void SetExposure(int value)
public boolean IsAutoAWB()
public void AutoAWB(boolean enable)
public void SetWhiteBalance(byte r, byte g, byte b)
public boolean IsColorBar()
public void ColorBar(boolean enable)


i dont implement 'GetWhiteBalance' method for this moment, have some problems with C++ pointers ))) will look into this more tomorrow. also will check blobs stuff from jMyron.

below some dirty code i used for testing
Code:
import ru.cleoag.*;

PS3Eye p;
PImage img;

int cameraWidth = 640;
int cameraHeight = 480;
int cameraRate = 60;

void setup(){
 size(640,480);
 p = new PS3Eye(this);
 p.start(cameraWidth,cameraHeight,cameraRate);
 img = createImage(cameraWidth,cameraHeight,RGB);
}
void draw(){
 background(0);
 p.update();
 p.imageCopy(img.pixels);
 img.updatePixels();
 image(img,0,0,width,height);
}
void mouseDragged(){
 int gain = (int)map(mouseX,0f,640f,0f,79f);
 int exposure = (int)map(mouseY,0f,480f,0f,511f);
 byte r = (byte)map(mouseX,0f,640f,0f,255f);
 byte g = (byte)map(mouseY,0f,480f,0f,255f);
 byte b = 127;
 p.SetWhiteBalance(r,g,b);
 //p.SetGain(gain);
 //p.SetExposure(exposure);
}
void keyPressed(){
//  p.ColorBar(!p.IsColorBar());
 p.AutoAGC(!p.IsAutoAGC());
 p.AutoAEC(!p.IsAutoAEC());
 p.AutoAWB(!p.IsAutoAWB());
 println(p.IsAutoAGC());
}

void stop(){
 p.stop();
}

Re: Some PS3 Eye test results
Reply #10 - Nov 27th, 2009, 11:42am
 
Den,

Your lib is awsome! I tested/incorporated the following functions in my program:
SetGain(), SetExposure(), AutoAWB(),  GetGain() and GetExposure(). They all work. I will yet need to think about how to set white balance manually without too much hassle, maybe writing a swing dialog (note to myself: read more books on this topic). Right now I use two buttons to select whether to adjust gain or exposure and use mouse wheel to make the adjustment.

A couple of things I noticed:
Among hundreds of trials I made, a couple of them started with black screen, because of unknown reasons. No big deal.

Also I noticed the limited speed the camera digitizes the image. It must be scanning line by line from top to bottom. I turned down the exposure and was swinging a ball in my hand as fast as I could. I could see on it way up, the ball appears narrow vertically. On its way down it appears wide vertically.
......

I will test out more functions you wrote. Again I thank you very much for your work! You should publisize this so that the multitouch screen community knows about this library.
Re: Some PS3 Eye test results
Reply #11 - Nov 28th, 2009, 11:53pm
 
Solved - see following posts check out reply #13 and #15

Can someone elaborate on how they got Jmyron to see the PS3 eye. I am doing a project where 320x240 video is acceptable but when I try to run the simple capture example I get the following error.  

UnsatifiedLinkError C:.....library\JMron.dll. Can't find dependent libraries

I am running on xp 32 bit and I have installed the alexP driver as well as copying dll's. The test video program is fine.

Thanks for any help or any suggestions of ways to be able to use blob detection, windows, and the ps3 eye
Re: Some PS3 Eye test results
Reply #12 - Nov 29th, 2009, 12:36am
 
gcolefla
see Dens posting above:
Quote:
If you need JMyron blobs functionality i think i can easy move it to my ps3eye c++ code without any problems. as for capture pin and camera settings this will be a tricky part ) but i will try to implement all this controls too. I think i will post update on this weekends.
Re: Some PS3 Eye test results
Reply #13 - Nov 29th, 2009, 9:28am
 
gcolefla,

I looked in my processing.exe folder. It has PS3EyeLib.dll, myron_ezcam.dll, and DSVL.dll. My system32 folder has PS3EyeLib.dll but JMyron still runs without PS3EyeLib.dll in either directory. I guess you may have forgotten to copy JMyron's dll's to processing.exe folder (myron_ezcam.dll, and DSVL.dll). I did a test and run JMyron with the two dll's removed and got the same error message. Also, check what version of AlexP's driver you're using. The current version is 3.0.0.0901. Find his PS3EyeTest program and right click to show some details. Sometimes you search the web and get his older versions that may not work with a lot of applications. Plus, if you're using a laptop, disable your integrated cam from device manager (right click my computer and choose manage, then click device manager on the left and look for imaging devices). JMyron only picks the first one down the imaging device list to use. Good luck.
Re: Some PS3 Eye test results
Reply #14 - Nov 29th, 2009, 10:18am
 
Thank you Liudr, I will be trying that on my machine in a few hours. All of that information is extremely helpful for troubleshooting. Keep us up to date with your projects, thanks

knutl,
Yeah I read that earlier, I will definitely watch for updates from this project. Jmyron's trackNotColor function is what my project is centered around though and I wouldn't want to have to rework a different library. Plus it is due 12/9 which is really soon. Thanks
Pages: 1 2