Webcam synchronization

Hi, is it possible to synchronize capture from two webcams by removing the crys tal oscillator from one of them and using the clock from the other as a mas ter clock for the two cameras? The goal is to build a stereo camera system and compute stereo maps from disparity images. If it's not possible, is th ere any other inexpensive solution for this problem? I currently have two L ogitech C310 cameras, which (as far as I know) do not have any pin for an e xternal trigger signal. Thanks in advance!

Reply to
Eduardo
Loading thread data ...

Doubtful -- esp not for cheap kit!

If images are static, then synchronization is unimportant. How "unstatic" they can be depend on scan rates of cameras, project goals, etc.

Why not combine two visual fields *optically into a single camera? I.e., left half of image sees scene from one perspective; right half sees same scene from slightly different perspective.

Reply to
Don Y

Well, I believe that would require more complex lenses, and might also intr oduce other problems into the system. Why do you say that using the same cl ock for both cameras will not work? The project goal is to obtain good qual ity depth information using the stereo system, and the images are not neces sarily static. In fact, I'm assuming the cameras can move at fairly high sp eeds. Regarding the frame rate, I can achieve up to 30 fps with the C310 ca ms.

Reply to
Eduardo

If you started with identical cameras then at best you'd be able to make the frame rates exactly the same, but you wouldn't be able to make them happen at the same time.

If you're lucky there's a cheap web cam that lets you do fine adjustment on frame rate.

--
Tim Wescott 
Control system and signal processing consulting 
www.wescottdesign.com
Reply to
Tim Wescott

probabaly not.

one camera and mirrors?

if you want to synchronise you probably need video cameras.

--
For a good time: install ntp 

--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
Reply to
Jasen Betts

Yes. "No free lunch" :>

Possibly.

Because there are several "clock" involved in video that are all "harmonicly" related (bad choice of words).

An image is composed of frames/fields (depends on whether the image is interlaced or not). These occur at a fixed "frame/field" rate. I.e., think of a "clock" that marks the start of a field/frame and repeats as often as fields/frames repeat!

Fields/frames, in turn are composed of *scan lines*. Some number of scan lines per field/frame. So, there is a fixed *line* rate! Think of (another) clock that runs at some MULTIPLE of the field/frame clock rate that marks the start of each successsive "scan line" and repeats as often as the scan lines repeat!

Each scan line consists of some number of dots (pels). Some number of dots per scan line. So, there is a fixed *dot* rate! Think of (yet another!) clock that runs at some multiple of the scan line clock rate that marks the start of each *dot* and repeats as often as the dots repeat.

Which eventually determines how often the scan lines repeat.

Which eventually determines how often the field/frames repeat.

The "clock" you are thinking of is probably most closely related to (though not necessarily identical to!) the dot clock.

If you drive two identical cameras with an identical clock signal, all you can guarantee is that the dots are *sampled* at the same rate. But, on any particular clock, camera 1 could be sampling dot 27 of line 19 in field 0 while camera 2 is sampling dot 294 of line 300 in field 1!

They aren't "looking" at the same thing at the same time.

If you can tolerate this, then you can probably tolerate the skew that will invariably exist between two "free-running" cameras!

Then if one "snapshot" of he image is 1/100th of a second skewed from the other, in time, it will have moved relative to the image the other camera is reporting.

29.97 is all RS170 equired :>
Reply to
Don Y

How about using a stroboscope as the light source ?

Reply to
upsidedown

On a sunny day (Sun, 24 Nov 2013 21:01:43 -0800 (PST)) it happened Eduardo wrote in :

I already did that, used a PLL with a transistor on one of the crystals, you need a H, V comparator, and allow some time for the lock to happen, for a small delta f that may take seconds (depends how far you can tune the xtal). Was published here, google should have it, some pics of the mod:

formatting link
formatting link
formatting link
formatting link
formatting link

Remember you can only tune _down_ , so you have to modify the fastest camera. I played a bit with it, but never finished that project, it reminded me a bit of syncing a TV studio to an outside broadcast in the sixties of last century.

The plan is to use it perhaps for stereo from my drone, but I already have a third analog camera (Sony starlight super HAD 2) so that would make 3. The 2 older ones would only work in daylight. Where to put those (so those do no see the propeller), 2 on each wing tip. One (Sony) facing down, transmit frame sequential, use LCD shutters for stereo on the locked ones..

formatting link
That gives you 12.5 fps for each eye, flicker, see the problems? Digital HAS advantages... But latency, latency latency. So it is not at the top of the to do list to hang it on the plane for stereo.

:-)

2 Sony Super HADs, now that would be.... But do not want to mess with that board (DSP), although it is more easily accessible.
Reply to
Jan Panteltje

Thanks for the replies!

Reply to
Eduardo

On a sunny day (Mon, 25 Nov 2013 03:33:51 -0800 (PST)) it happened Eduardo wrote in :

Please note if you want color and PAL it is not sufficient to sync to any frame, as the color phase of the PAL signal will be only the same every 4 frames (8 fields).

formatting link

This requires quite some extra electronics in the phase comparator.

Reply to
Jan Panteltje

EXCELLENT! split image using thick blocks of calcite?

Along that line of thinking, I designed a system to turn a single security camera into 'multiple' cameras. Just instead of 30 fps, you get 5 fps in order to effectively gain 6 cameras. More convenience than advantage.

Reply to
RobertMacy

On Monday, November 25, 2013 3:13:20 AM UTC-5, snipped-for-privacy@downunder.com wrote :

ote:

rystal oscillator from one of them and using the clock from the other as a master clock for the two cameras? The goal is to build a stereo camera syst em and compute stereo maps from disparity images. If it's not possible, is there any other inexpensive solution for this problem? I currently have tw o Logitech C310 cameras, which (as far as I know) do not have any pin for a n external trigger signal.

Clever.

Cheers, James Arthur

Reply to
dagmargoodboat

For Color. Mono was 30.00

-- Anyone wanting to run for any political office in the US should have to have a DD214, and a honorable discharge.

Reply to
Michael A. Terrell

Eduardo, As others have mentioned, it is a no go for webcams. You need good, high quality analog cameras with trigger inputs (google machine vision cameras) so that you can frame sync your two cameras. Even then, the accuracy is not all that great.

If you want to use webcam level devices, you need to do your syncing in software. Have a laser dot strobe that flashes every so often and you can then sync up these frames to get your relative timing together.

However, if your speed is such that you are really worried about the different rates of the two cameras, then the latency and processing of a web cam are going to make any real stero analysis pretty unusable.

Charlie

Reply to
Charlie E.

Or "beep" the sound tracks with some frequency above hearing limits.

Back around 1980, one of my employees, John Spellman, knew a sound man for the TV news show "60 Minutes". We designed an RF link between cameraman and sound guy that "beeps" so that sound and video could be easily synced back at the studio. Of course we are talking $$$$$ type equipment, so that makes it a wee bit easier. ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142   Skype: Contacts Only  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

This was interesting enough for me to spend some time researching the project. I think it will be hard to do your task with webcams. You can synchronize industrial cameras then frame capture and get close. In theory the capture devices willl sync to the camera. Ebay always has machine vision cameras for sale, usually for a good price since they can be more complicated to use.

This paper covers optical schemes on how to do stereo vision with one camera.

Reply to
miso

OK this may be a silly question, but it seems like you want to compare single frames with each other. So why not use two digital cameras? That would be easy to sync. Or do you need a fast frame rate?

George H.

Reply to
George Herold

compare single frames with each other. So why not use two digital cameras? That would be easy to sync. Or do you need a fast frame rate?

For robotics, it has to be fast.

I was thinking maybe board cameras would be the thing to hack. You can certainly get at the guts easier.

I don't know about the jitter in a digital camera. I can tell you delay from external trigger to photograph is high. In applications where you need a short lag time, they use an external shutter and basically leave the camera in "bulb" mode. The best electromechanical shutters have about 5ms of delay. DSLRs will be over 100ms.

Reply to
miso

. The best electromechanical shutters have

so even if you lock the web cams together, as someone already said, you may get the clock frequencies locked, but they phase may still be undefined..

another approach is to put a small LED (or other light source) in the frame of both cams and flash it to allow time sync. Advantage is no modification to the cams needed.

Mark

Reply to
makolber

Another approach would be to clock them from the same source, and swallow clock cycles from one till the frames overlap, using e.g. a 10X clock and a 10/11 prescaler. Not exactly noninvasive, of course, and the loop could take awhile to lock up.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
ElectroOptical Innovations LLC 
Optics, Electro-optics, Photonics, Analog Electronics 

160 North State Road #203 
Briarcliff Manor NY 10510 

hobbs at electrooptical dot net 
http://electrooptical.net
Reply to
Phil Hobbs

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.