Multicam sync
Posted: 08 January 2010 02:42 PM   [ Ignore ]
New Member
Avatar
Rank
Total Posts:  20
Joined  2010-01-06

Hi,

I’m using three Eye cams on two PCs (since multicam driver detects only two cams on one PC). PCs are connected together with 1Gbps Ethernet cable. Is there any simple way to wire cams together and to do frame capture exactly the same time? I know that there is a vsync “thing” on camera’s PCB but I have only basic electronics knowledge (I’m a programmer). So i’ll repeat my question: is there any simple way to do this? smile

Thanks.


EDIT: In OV7720 datasheet there is information that sensor has an external frame synchronization capability using A4 pin called FSIN (Frame Synchronization INput?).

Profile
 
 
Posted: 08 January 2010 06:47 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  585
Joined  2009-09-17
Futhark - 08 January 2010 02:42 PM

Hi,

I’m using four Eye cams on two PCs (since multicam driver detects only two cams on one PC). PCs are connected together with 1Gbps Ethernet cable. Is there any simple way to wire cams together and to do frame capture exactly the same time? I know that there is a vsync “thing” on camera’s PCB but I have only basic electronics knowledge (I’m a programmer). So i’ll repeat my question: is there any simple way to do this? smile

Thanks.


EDIT: In OV7720 datasheet there is information that sensor has an external frame synchronization capability using A4 pin called FSIN (Frame Synchronization INput?).

It is possible, although kind of tricky. Even with cameras synced in hardware you’ll get some unavoidable latency in frame transmission over the wire. At what resolution at you capturing your data? Keep in mind that a single color camera at 640x480 @ 60fps generates about 421Mbps of data. If you have two of these you are pushing the bandwidth of 1Gbps link.
What is your target application? Is the latency important?

AlexP

Profile
 
 
Posted: 09 January 2010 06:19 AM   [ Ignore ]   [ # 2 ]
New Member
Avatar
Rank
Total Posts:  20
Joined  2010-01-06

1Gbps link is only for syncing purposes. All data processing from cameras is done on computers that cams are connected to. The latency is important because my application is kind of a real-time face motion capture app, but I can do postprocessing as well. I capture grayscale .(JavaScript must be enabled to view this email address). Every cam is connected to it’s own hardware usb controller.

Profile
 
 
Posted: 09 January 2010 11:30 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  585
Joined  2009-09-17
Futhark - 09 January 2010 06:19 AM

1Gbps link is only for syncing purposes. All data processing from cameras is done on computers that cams are connected to. The latency is important because my application is kind of a real-time face motion capture app, but I can do postprocessing as well. I capture grayscale .(JavaScript must be enabled to view this email address). Every cam is connected to it’s own hardware usb controller.

Since the latency is critical, it will be very hard for you to achieve what you want since Windows is not a real-time OS and there are no guaranties on how long any operation will take. I see here two problems:

1. Camera synchronization

In order for you to synchronize the cameras you would need some kind of way of time stamping every captured frame. Now in order to perform this over multiple machines you would absolutely need to have them both run and use exactly same time (up to ms resolution, at least). To add this you would have to calculate the latency of sync data packet transmission over Ethernet. And this is all assuming that your system is running stable without any CPU bursts that could mess things up. With all this you will achieve the sync between the frames, or at least know exactly how much they are off.
One thing that comes to mind is that since you will be doing blob tracking, besides blob position (x, y), you will probably keep track of blob delta (dx, dy) and acceleration values as well. Now even though the camera frames occur at discrete times and will be offset by at most 1 frame you could compensate for this by setting one camera as a reference and predicting the positions of all other captured blobs (based on dx, dy and acceleration) to match the time stamp of the reference camera.

2. Minimizing the latency

In order to minimize the latency basically you would want to process the frame data as soon as it comes to you.

In conclusion, as you see, these two methods are kind of complementary and you would need to set on one or the other. In another words, if you want to minimize latency you cannot have cameras fully in sync, and if you sync them your latency will go up.
So it comes down to what is the latency time that is acceptable for you? At 60fps the camera frames will be at most 8.33ms off. This is pretty fast, but if you add synchronization then this time will go up to 16.66ms or maybe a bit more.
Another option is to try and drop the resolution to 320x240 and run at 125fps thus reducing the latency and sync time in half.

Hope this helps a bit,
AlexP

Profile
 
 
Posted: 09 January 2010 11:45 AM   [ Ignore ]   [ # 4 ]
New Member
Avatar
Rank
Total Posts:  20
Joined  2010-01-06

Thank you very much AlexP. I think I’ll sync timers in PCs on my network and will do timestamps on every captured frame like you said and then some postprocessing. This may be even better approach in order to get full system performace than hardware camera syncing.

Profile
 
 
Posted: 10 January 2010 04:26 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  585
Joined  2009-09-17
Futhark - 09 January 2010 11:45 AM

Thank you very much AlexP. I think I’ll sync timers in PCs on my network and will do timestamps on every captured frame like you said and then some postprocessing. This may be even better approach in order to get full system performace than hardware camera syncing.

Ofcourse another option will be to go with our multicam system that will allow you four or more cameras on a single computer. We are currently working hard on getting this released.

AlexP

Profile
 
 
Posted: 06 February 2010 01:54 PM   [ Ignore ]   [ # 6 ]
New Member
Avatar
Rank
Total Posts:  20
Joined  2010-01-06

I’ve asked user kylemcdonald from NUIGROUP forum if he found FSIN pin on PCB and he told me a way to find it (thanks Kyle):

1 Take the casing off the ps3eye (assuming you’ve done this already)
2 Get a camera, or better, a scanner
3 Scan the “back” (non-lens-side) of the ps3eye
4 Take the lens off the camera
5 Scan the “front” (with the sensor)
6 Align the pictures in Photoshop using the outlines of the ps3eye pcb
7 Overlay the sensor diagram on page 22 of the datasheet
8 Use the VSYNC or another pin to determine orientation

I took a photo of PCBs both sides and align it in GIMP, then I’ve overlay the sensor and found orientation. The result was confusing. I have two candidates to be a FSIN pin:

Photos of both sides of PCB with FSIN pin

But I have no idea how to check it.

BTW: I’ve found this post on nuigroup: http://nuigroup.com/forums/viewthread/7195/#43833 about Community Camera with interesting annotation: “Optional video sync for motion capture”.

Profile
 
 
Posted: 08 February 2010 09:00 AM   [ Ignore ]   [ # 7 ]
New Member
Avatar
Rank
Total Posts:  20
Joined  2010-01-06
AlexP - 09 January 2010 11:30 AM

Since the latency is critical…

I just realized that getting frames in exactly same time is much more important in this application than real-time processing of image so latency isn’t important anymore. I’m going to buy Arduino and make use of it in order to get synchronized frames by finding FSIN pin or by using VSYNC signal to get each frame precise time of capture.

AlexP, maybe you have any idea about FSIN pin and using it? You mention about it in this post: http://nuigroup.com/forums/viewthread/6903/P15/#42521

Profile
 
 
Posted: 12 March 2010 01:37 PM   [ Ignore ]   [ # 8 ]
New Member
Rank
Total Posts:  3
Joined  2010-02-22

Hi, I’m also interested in multiple webcam synchronization, recently I managed to get two Trust WB-5400 webcams synchronized by using the VSYNC output and FSIN input. Results of my experiments are described on my webpage:

http://sszymczy.rootnode.net/index.php?menu=projects&submenu=webcamsync2

Did you have any luck in accessing the FSIN pin in PS3 Eye sensor?

Profile
 
 
Posted: 13 March 2010 03:53 AM   [ Ignore ]   [ # 9 ]
New Member
Avatar
Rank
Total Posts:  20
Joined  2010-01-06

I’ve just connected one camera’s VSYNC output to the FSIN candidate on back of the second cam’s PCB and… image from the FIRST camera freezes(!) and not affected second cam’s frame rate. I’ll test front FSIN candidate today.

EDIT: I’ve a great news, the front candidate is a FSIN pin for 99%! And Daisy chain VSYNC -> FSIN—-VSYNC -> FSIN seems to work!

Thanks to users: kylemcdonald and sszymczy.

http://pokazywarka.pl/7j0ggp/#zdjecie233479

Profile
 
 
Posted: 02 April 2010 10:09 AM   [ Ignore ]   [ # 10 ]
New Member
Rank
Total Posts:  3
Joined  2010-02-22

I can confirm that FSIN input is working in PlayStation Eye camera. I also found an easy access to FSIN on the camera board:

ps3eye_signals.jpg

More details here.

Profile
 
 
Posted: 02 April 2010 10:34 AM   [ Ignore ]   [ # 11 ]
New Member
Avatar
Rank
Total Posts:  20
Joined  2010-01-06

Wow! That is really great news! I made my connections to pin using silver-based glue. Your solution is definitely much more simpler.

Profile
 
 
Posted: 08 April 2010 04:59 AM   [ Ignore ]   [ # 12 ]
New Member
Rank
Total Posts:  1
Joined  2010-04-06
sszymczy - 02 April 2010 10:09 AM

I can confirm that FSIN input is working in PlayStation Eye camera. I also found an easy access to FSIN on the camera board:

ps3eye_signals.jpg

More details here.

If I try to call the website, I get:
Error 503 Service Unavailable

Can you put the information about the FSIN on an other website?

Profile
 
 
Posted: 12 May 2010 06:53 AM   [ Ignore ]   [ # 13 ]
New Member
Rank
Total Posts:  25
Joined  2010-04-13

Hello everyone!

I have done some experiments with led synchronization using VSYNC pin, and it really works!

However, things get out of control, when exposure parameter of the
camera gets values about 200 and higher.

Please see more information in this thread:
http://codelaboratories.com/forums/viewthread/261/

You’ll also find there a little program to experiment with led synchronization,
without any need for hardware modifications - it uses camera built-in red diode.

Attached frame which should be all dark (the diodes are off).
It happens only with high exposure values.

Any advice?

Best regards,

Image Attachments
f0.jpg
Profile
 
 
Posted: 08 April 2011 08:09 AM   [ Ignore ]   [ # 14 ]
New Member
Rank
Total Posts:  1
Joined  2011-04-08

Hello there.

I tried to find FSIN and VSync pins on my ps3 eye cameras PCB, but it has new design ...
Does anyone know where theese pins are?

And the second question:
Can I use FSIN pin to control FPS? For example by connecting all FSINs from all cameras to one 60Hz square signal source.

Thanks in advance
smokeing

Profile
 
 
Posted: 25 April 2011 10:44 PM   [ Ignore ]   [ # 15 ]
New Member
Avatar
Rank
Total Posts:  1
Joined  2011-04-22

Hi, interesting post.

Profile
 
 
 
 


RSS 2.0     Atom Feed