Skip to content

Unable to sync less than 3 Ms at best #1

@ajavamind

Description

@ajavamind

I'm have two Samsung S8 phones mounted for stereo photography and capture photos with SoftwareSync running in debug mode. I am not able to sync these cameras to less than 3 Milliseconds. A sample size of 10 capture syncs ranged from 3 to 13 Ms (7, 6, 10, 4, 6, 10, 13, 7, 3, 9). I'm using a 10 LED linear array display counter, updated at 1 Ms intervals and measure the difference of the LED binary display values between the two camera photos. I verified the timing of the LED count up sequence with an oscilloscope - exactly 1 Ms. The SoftwareSync shutter speed was set to 1/2000 second.

The phase configuration json file used:
{
"periodNs": 33323892,
"goalPhaseNs": 15000000,
"alignThresholdNs": 200000,
"overheadNs": 200000,
"minExposureNs": 33170000
}

The periodNs value was selected based on the frameDurationMs value from debug output.
com.googleresearch.capturesync V/CameraController: onCaptureCompleted: timestampMs = 1,595,063,382,777.953, frameDurationMs = 33.323892, phase = 30.534, sequence id = 0
otherwise these are same values as Pixel 2 phase configuration.

I do not yet understand the algorithm well enough to change these values. Could you advise how to determine the constants for a phone and how to derive these numbers. Note that the Samsung S8 shares the same cpu/gpu as the Pixel 2 but have different cameras.

When I first began to use the SoftwareSync app I was not seeing any captures saved at all.
The shouldSaveFrame(long synchronizedTimestampNs) method in CameraController always returned false.
When I powered down and up both phones nearly simultaneously, only then would the photos be saved.
When any phone was turned off for a while, and capture resumed, the photos would not be saved.
I'm guessing the SystemClock.elapsedRealtimeNanos() clocks in the phones become too far out of range to trigger the save.

My goal is to get less than 1 Ms sync at least. Any help would be appreciated, thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions