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!
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.
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.
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:
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..
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.
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.
On Monday, November 25, 2013 3:13:20 AM UTC-5, firstname.lastname@example.org wrote :
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.
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.
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 |
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.
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.
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.