EyeCapture - Save image sequences from the PS3Eye with timing information
Posted: 09 November 2011 07:40 AM   [ Ignore ]
New Member
Rank
Total Posts:  9
Joined  2011-11-09

First of all, I hope I’m not breaking the CL Eye Platform SDK EULA in any way by posting this program here.

Second, I hope I’m not infringing on any copyrights or licenses by basing this little program on the examples provided in the CL Eye Platform SDK. I could not find any licensing information except the copyright notice in the source files.

Third, If I am infringing on something or someone, please be gentle, and know that I’m not out to make any money from this.

That said, I present to you EyeCapture

It is not shiny and equipped with a fancy GUI, but it provides some interactive control of the capture settings, and allows the capture of image sequences directly from the PS3 Eye Camera, and it provides a timestamp for each individual frame (conveniently listed in a .txt file).

I made the program for a research project where we are tracking the rotation speed of a spindle (don’t ask, it’s very geeky). We needed reasonably accurate time information for each picture, and reasonably high speed image acquisition, on a reasonably tiny budget.

Beware that the timing information seems to have high precision, but the accuracy of it does not match the number of digits. It is based on the QueryPerformanceCount whatchamacallit, and the exactness if QPC has been questioned (especially on speed-stepping CPUs).

The images are written directly to disk without any buffering(works for the speed and resolution I needed, I might add buffered write in the future.) Monochrome images and low resolution allows for capture in up to 187Hz, though I have not verified it empirically.

For now EyeCapture is Vista/Win 7 only, and it has only been tested on Windows 7.

If it complans about MSVCsomething.dll you need the Visual C++ 2010 Runtime Libraries (x86), run setup.exe when installing to avoid this problem completely.

I would attach the files to the post, but I get an error which I think means I’m not trusted so here is a link instead:

http://conceptotheorist.com/download/EyeCapture.zip
Anyways, enjoy, and post feedback in this thread.

- peb.


Edit:
I’m guessing most people doesn’t trust my installer, here is a link to the raw program:
http://conceptotheorist.com/download/eyecapture_noinstall.zip

I also forgot to mention that the source was included in the installer, here is a direct download of that too:
http://conceptotheorist.com/download/eyecapture_source.zip

Cheers,

peb.

Profile
 
 
Posted: 09 November 2011 08:18 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  585
Joined  2009-09-17

Peb,

Thank you for sharing your excellent work.

Profile
 
 
Posted: 09 November 2011 08:21 AM   [ Ignore ]   [ # 2 ]
New Member
Rank
Total Posts:  9
Joined  2011-11-09

I hope that means it works for you?

Haven’t had time to test it on more than a few systems so far… smile

Also, you are the one doing excellent work with the drivers/SDK, I’m just bolting some functionality to it.

Profile
 
 
Posted: 05 December 2011 01:36 AM   [ Ignore ]   [ # 3 ]
New Member
Rank
Total Posts:  9
Joined  2011-11-09

I’m guessing most people doesn’t trust my installer, here is a link to the raw program:
http://conceptotheorist.com/download/eyecapture_noinstall.zip

I also forgot to mention that the source was included in the installer, here is a direct download of that too:
http://conceptotheorist.com/download/eyecapture_source.zip

Cheers,

peb.

Profile
 
 
Posted: 10 April 2012 03:31 AM   [ Ignore ]   [ # 4 ]
New Member
Rank
Total Posts:  10
Joined  2012-04-10

Thanks peb.

I tried this out last night and it works a charm.  Couple of questions though: What application did you use to make the program and is there any way to add a greater selection of framerates during “interactive” mode?

Profile
 
 
Posted: 10 April 2012 06:43 AM   [ Ignore ]   [ # 5 ]
New Member
Rank
Total Posts:  9
Joined  2011-11-09

It’s written in C++ using Visual Studio 2010.

The framerates are unfortunately hard-coded, but I still have the development environment for this set up, so I can make you a patch if you just list the modes you want to add…

These are the modes in the current version:

float ratesVGA[] = { 15, 20, 30, 40, 50, 60, 75 };
float ratesQVGA[] = { 15, 20, 30, 40, 50, 60, 75, 90, 100, 120, 150, 187 };

Profile
 
 
Posted: 10 April 2012 08:17 AM   [ Ignore ]   [ # 6 ]
New Member
Rank
Total Posts:  10
Joined  2012-04-10

It would be usefull to have the following:

float ratesVGA[] = { 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 2, 15, 20, 30, 40, 50, 60, 75 };

Also I read that you can flip the image horizontally and vertically.  Would you be able to add switches to do this? I think the code is as follows:

CLEYE_HFLIP,          // [false, true]
CLEYE_VFLIP,          // [false, true]

Profile
 
 
Posted: 10 April 2012 10:32 AM   [ Ignore ]   [ # 7 ]
New Member
Rank
Total Posts:  9
Joined  2011-11-09

Alright, not as straightforward as I assumed, but I guess it never is…

It’s not pretty, I give no guarantees, and I haven’t tested the horizontal and vertical flip function from the command line interface.

Switching between framerates and exiting the application is slow, caused by the long exposure times… I also noticed some crashing when switching between framerates too quickly, so beware :D

Horizontal and vertical flip does work in interactive mode, ‘m’ for vertical, ‘n’ for horizontal flip. Flip is visible in processed mode, not in raw.

http://conceptotheorist.com/download/eyecapture_russelhq_edition.zip

Let me know if it works. smile

edit:
I haven’t changed the instructions in interactive mode, or the help text in commandline. If the mirroring doesn’t seem to work, make sure you are not in any of the “raw” modes.

Profile
 
 
Posted: 10 April 2012 11:30 AM   [ Ignore ]   [ # 8 ]
New Member
Rank
Total Posts:  10
Joined  2012-04-10

Thanks peb, that worked a treat!

Think I’ll download Visual Studio and have a go myself as I’d like to control other aspects of the camera like the following within a small GUI:

CLEYE_AUTO_GAIN [false, true]
Automatically determines best gain value.

CLEYE_GAIN [0, 79]
Controls the camera signal gain (when auto gain is false).

CLEYE_AUTO_EXPOSURE [false, true]
Automatically determines best exposure value.

CLEYE_EXPOSURE [0, 511]
Controls the sensor exposure time (when auto exposure is false).

CLEYE_AUTO_WHITEBALANCE [false, true]
Automatically determines best color settings.

CLEYE_WHITEBALANCE_RED [0, 255]
Controls the red color gain (when auto white balance is false).

CLEYE_WHITEBALANCE_GREEN [0, 255]
Controls the green color gain (when auto white balance is false).

CLEYE_WHITEBALANCE_BLUE [0, 255]
Controls the blue color gain (when auto white balance is false).


I also wonder if there is any way to slow down the FPS past 0.1fps? Would be really usefull for astrophotography if you could expose the sensor for minutes at a time.

Profile
 
 
Posted: 10 April 2012 12:15 PM   [ Ignore ]   [ # 9 ]
New Member
Rank
Total Posts:  9
Joined  2011-11-09

It is possible to set the framerate lower (call it from the commandline: eyecapture.exe -h 0.01), but I’m not getting the results I would expect.

It seems that the buffer is read during the exposure, when saving images I’m getting timestamps that are about 2 seconds apart, but it seems the buffer is not cleared between images…

I might have some time to look at that tomorrow… smile

Profile
 
 
Posted: 16 April 2012 02:47 AM   [ Ignore ]   [ # 10 ]
New Member
Rank
Total Posts:  10
Joined  2012-04-10

Hi peb. Any luck setting a lower fps?

I’ve been playing about with your code with the goal to get it working from a form; but having only basic skills in VB the going is a bit slow!

Profile
 
 
Posted: 24 April 2012 06:49 AM   [ Ignore ]   [ # 11 ]
New Member
Rank
Total Posts:  10
Joined  2012-04-10

Any joy Peb? I’m still struggling along getting to grips with C++

Profile
 
 
Posted: 24 April 2012 06:55 AM   [ Ignore ]   [ # 12 ]
New Member
Rank
Total Posts:  9
Joined  2011-11-09

Sorry for not replying sooner…

I’m extremely busy with work and other projects right now, so I don’t have much time to play with this right now.

I might have time this weekend, but don’t count on it.

C++ is a bit of a beast in the beginning, have you managed to build the c++ CL-eye examples at all?

Profile
 
 
Posted: 24 April 2012 07:03 AM   [ Ignore ]   [ # 13 ]
New Member
Rank
Total Posts:  10
Joined  2012-04-10

Thanks Peb.

I’v managed to build your project (took a while to get everything installed and set up correctly!) but got there. Then managed to add extra controls for turning the gain up and down and also changing the FPS.

Profile
 
 
Posted: 24 April 2012 07:05 AM   [ Ignore ]   [ # 14 ]
New Member
Rank
Total Posts:  9
Joined  2011-11-09

So it is the image buffer being read while an exposure is still in progress that is the big issue now?

Profile
 
 
Posted: 24 April 2012 07:12 AM   [ Ignore ]   [ # 15 ]
New Member
Rank
Total Posts:  10
Joined  2012-04-10

Yip! I posted in the SDK forum last week about this to ask if it was something inherent to the device but haven’t had a response yet.

It looks like 0.1FPS was hard coded into the SDK (See changelog 02/17/2010 - CL-Eye Platform SDK Release Version: 1.1.0.0217 http://codelaboratories.com/kb/CL-Eye-Platform-SDK-Changelog/ ). So I’m not sure if there is a way around this?

Profile
 
 
1 of 2
1
 


RSS 2.0     Atom Feed