Webcam Synchronization II

Introduction

Few years ago I described my unsuccessful attempts to get two Logitech Orbit webcams synchronized. The basic idea of video camera synchronization is to force two or more cameras to capture frames at exactly the same point of time. Commercial digital video cameras with synchronization support are quite expensive, the cheapest one I could find is Unibrain Fire-i board Pro™ priced 390$, but even this one is too expensive considering the fact that one would have to buy at least two such cameras.

I wanted to be able to synchronize cheap consumer-level computer video cameras and I did some experiments on two Logitech Orbit webcams, however it appeared that my approach to the problem was wrong. Recently I started investigating the topic again and discovered a new possibility - an external frame synchronization feature in some Omnivision CMOS image sensors. From GSPCA driver supported webcams list it looks like Omnivision sensors are quite popular in webcams, thus making this brand a good research subject for my new experiments.

Basic idea

While investigating the master and slave modes of CMOS camera sensors I noticed "Internal/External frame synchronization" listed in a feature list of some Omnivision sensor. Sensor datasheets were not very verbose when it comes to this feature, after consulting several ones I found the following information in OV7610 datasheet:

Pin FSIN serves as external frame sync input and is positive edge sensitive. In this operation, OV7600 still outputs VSYNC, HSYNC and PCLK, except VSYNC is in sync with FSIN.

and later:

FSIN is an external frame sync input used to sync multiple camera device together. In this application, OV7610 is still operated in master mode, but vertical timing is synchronized to an external VSYNC input. A simple example is to use one OV7610 as a VSYNC provider, and the 2nd camera will be sync to it. This VSYNC is feed to the 2nd OV7610 FSIN pin, set the 2nd OV7610 COMC4=1, two cameras are automatically in sync. If using other sync source,to ensure proper operation, the sync trigger pulse must be at least 6 Tsys (system clock period, which is decided by CLK<5:0> register) and period will be 1050*858*Tsys.

Accordingly to this information it should be possible to synchronize multiple cameras by connecting VSYNC pin of the first webcam sensor to FSIN pin of the other webcams sensors (assuming that their ground is already connected of course). I guess it should be also possible to daisy chain them.

This simple way of synchronizing the webcams is very appealing, but there are several problems to be addressed:

  1. Omnivision sensors having frame synchronization input must be identified.
  2. We have to identify webcams containing these sensors somehow.

The next section will address the problem of identifying the candidate sensors.

Omnivision sensors with frame synchronization input

OV7610 sensor is from the previous century and I guess it's not used in today's webcam models. Fortunately it's not the only one having frame synchronization input. After analyzing available datasheets and product briefs of Omnivision sensors I managed to create the following list of Omnivision sensors having FSIN/FSI/FSYNC pin. The list contains the sensor model, approximate time of their introduction to the market and some additional information:

Sensor modelApproximate year of introductionResolutionPackage
OV50171997384 x 28848 pin LCC
OV7610/OV71101998644 x 48448 pin LCC
OV7620/OV71202001664 x 49248 pin LCC
OV8610/OV81102001800 x 60048 pin LCC
OV9610/OV911020011280 x 102448 pin LCC
OV9620/OV912020021280 x 102448 pin LCC
OV261020031600 x 120048 pin CLCC
OV9625/OV912120031280 x 102448 pin CLCC
OV963020031280 x 102448 pin CLCC
OV361020042048 x 153648 pin CLCC
OV362020042048 x 153648 pin CLCC
OV7710/OV72112006656 x 49248 pin CLCC
OV10620/OV101212008768 x 50648 pin CLCC
OV77202008640 x 480CSP2
OV77252008640 x 480CSP2

While searching for Omnivision sensors I came across Silicon Optronics company. The Chairman of Silicon Optronics is also the Chief Operating Officer of OmniVision Technologies and Omnivision is one of the major shareholders of Silicon Optronics. Considering this it's not very strange that CMOS sensors produced by Silicon Optronics bear striking resemblance to Omnivision sensors. The important thing is that some sensors made by Silicon Optronics have FSIN input, so it's quite safe to add them to the list of the candidate sensors.

Sensor modelApproximate year of introductionResolutionPackage
SOI26820041600 x 120048 pin CLCC
SOI96820061280 x 102448 pin CLCC

My guess is that SOI268 is based on OV26XX line and SOI968 on OV96XX line.

Note that even considering the fact that FSIN (or FSI or FSYNC) pin is mentioned in documentation of all of the mentioned sensors, there's no guarantee that it will work like in described in OV7610 sensor datasheet, but I found it worth checking nevertheless.

The next section will address the problem of identifying the webcams.

Omnivision-based webcams

Documentation of webcams usually doesn't mention the exact sensor type, but there's a lot of sensor-related information on web pages of Linux webcam driver authors, especially on Michel Xhaard's website, Mark McClelland's ov511 driver page and microdia Google group. Googling for "sn9c20x: Detected" phrase written by microdia kernel module was also very fruitful, as the sensor type is mentioned in the following module output. Last but not least, googling for sensor model names also brought some neat results, like the following list included in the webcam driver .inf file.

Most of the webcams I checked were no longer produced and generally not available even on auction sites. Cameras still available are listed in the table below:

Webcam manufacturerWebcam modelVID:PIDSensor model
TrustWB-54000c45:624eSOI968
MedionMD 855720c45:624eSOI968
SonyPlayStation Eye1415:2000OV7720

Note that Trust WB-5400 and Medion MD 85572 are different webcams despite having the same vendor and product identifiers.

Besides the mentioned models I found also several Aiptek PenCam 1.3 (Medion MD 5319) cameras on auction sites, however after examining the sensors I can definitely say they are not having OV9620 inside like it's written or Mark Cleveland's page. From the physical appearance and ground pin location I would classify them as Kodak KAC1310 sensor or similar. By chance I already owned Aiptek PenCam 2.0 (MD 40323) camera and ground pins of the sensor inside match Omnivision sensors pin layout, however I was unable to determine the exact sensor type.

Experimental setup

In order to check the possibility of synchronizing cameras I created a simple timer application displaying the seconds part of the current time with 1/100s resolution. My assumption was that by simultaneously recording frames of video stream from two webcams pointed to the computer monitor with the timer application running on the screen and comparing recorded time in both sequences it should be possible to estimate if they are running synchronously or not.

On each camera model I conducted two experiments - first was to record frames from cameras disconnected from each other and second to record frames from cameras with VSYNC output of the first camera connected to FSIN input of the second camera.

Results

The pages listed below describe results of my webcam synchronization experiments with Trust WB-5400, Medion MD-85572 and PlayStation Eye cameras.

I also managed to confirm that sensor present in Aiptek PenCam 2.0 (MD 40323) digital camera can receive external synchronization input by feeding it with VSYNC signal from a webcam and comparing vertical synchronization pulses from both cameras on a two-channel oscilloscope. Sensor in Aiptek PenCam 2.0 (MD 40323) has 2 mpix, so most likely it's OV2610, as it's the only 2 mpix Omnivision sensor with frame synchronization input I managed to find.

Conclusions

Frame synchronization input of Omnivision sensors allows them to receive an external synchronization signal. Wide usage of these sensors in cheap consumer-level cameras provides an opportunity to use them in amateur computer-vision experiments requiring perfect synchronization of multiple cameras, considerably lowering the cost of hardware setup.