Maker Pro
Maker Pro

Webcam synchronization

E

Eduardo

Jan 1, 1970
0
Hi,
is it possible to synchronize capture from two webcams by removing the crystal 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 system and compute stereo maps from disparity images. If it's not possible, is there any other inexpensive solution for this problem? I currently have two Logitech C310 cameras, which (as far as I know) do not have any pin for an external trigger signal.
Thanks in advance!
 
D

Don Y

Jan 1, 1970
0
Hi Eduardo,

Hi,
is it possible to synchronize capture from two webcams by removing
the crystal oscillator from one of them and using the clock from
the other as a master clock for the two cameras?

Doubtful -- esp not for cheap kit!
The goal is to build a stereo camera system and compute stereo maps
from disparity images. If it's not possible, is there any other
inexpensive solution for this problem? I currently have two Logitech
C310 cameras, which (as far as I know) do not have any pin for an
external trigger signal.

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.
 
E

Eduardo

Jan 1, 1970
0
Well, I believe that would require more complex lenses, and might also introduce other problems into the system. Why do you say that using the same clock for both cameras will not work? The project goal is to obtain good quality depth information using the stereo system, and the images are not necessarily static. In fact, I'm assuming the cameras can move at fairly high speeds. Regarding the frame rate, I can achieve up to 30 fps with the C310 cams.
 
J

Jasen Betts

Jan 1, 1970
0
Hi,
is it possible to synchronize capture from two webcams by removing the crystal oscillator from one of them and using
the clock from the other as a master clock for the two cameras?

probabaly not.
The goal is to build a stereo camera system and compute stereo maps
from disparity images. If it's not possible, is there any other
inexpensive solution for this problem?

one camera and mirrors?
I currently have two Logitech C310 cameras,

if you want to synchronise you probably need video cameras.
 
D

Don Y

Jan 1, 1970
0
Hi Eduardo,

Well, I believe that would require more complex lenses,

Yes. "No free lunch" :>
and might also introduce other problems into the system.
Possibly.

Why do you say that using the same clock for both cameras
will not work?

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!
The project goal is to obtain good quality depth information using
the stereo system, and the images are not necessarily static.

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.
In fact, I'm assuming the cameras can move at fairly high speeds.
Regarding the frame rate, I can achieve up to 30 fps with the C310 cams.

29.97 is all RS170 equired :>
 
Hi,
is it possible to synchronize capture from two webcams by removing the crystal 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 system and compute stereo maps from disparity images. If it's not possible, is there any other inexpensive solution for this problem? I currently have two Logitech C310 cameras, which (as far as I know) do not have any pin for an external trigger signal.
Thanks in advance!

How about using a stroboscope as the light source ?
 
R

RobertMacy

Jan 1, 1970
0
...snip...
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.

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.
 
C

Charlie E.

Jan 1, 1970
0
Hi,
is it possible to synchronize capture from two webcams by removing the crystal 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 system and compute stereo maps from disparity images. If it's not possible, is there any other inexpensive solution for this problem? I currently have two Logitech C310 cameras, which (as far as I know) do not have any pin for an external trigger signal.
Thanks in advance!

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
 
M

miso

Jan 1, 1970
0
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.
 
G

George Herold

Jan 1, 1970
0
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.

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.
 
M

miso

Jan 1, 1970
0
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.

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.
 
.. The best electromechanical shutters have
about 5ms of delay. DSLRs will be over 100ms.

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
 
P

Phil Hobbs

Jan 1, 1970
0
. 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

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
 
Top