Skip to content

If total images to process >4000, then add optional --cameras usage to assist with camera distortion across multiple cameras #13

Description

@spwoodcock

Use task calibrations for large ODM runs

Large ODM runs can keep poor initial camera parameters for the entire reconstruction.
OpenSfM switches to stochastic bundle adjustment at 4,000 reconstructed shots, and
that solver keeps camera intrinsics fixed.

We saw this in an 11,782-image test project. The camera model started and finished with:

  • focal: 0.6667, derived from EXIF
  • radial and tangential distortion: all zero

Smaller fast-orthophoto tasks from the same project stay below the threshold and
self-calibrate normally. Independent task runs produced focal values of 0.7340 and
0.7463, with similar distortion coefficients. These values also closely match the
current upstream OpenSfM calibration for this camera.

Proposed change

Add an optional ScaleODM stage for full-project runs with at least 4,000 input images:

  1. Collect cameras.json, stats.json, and shots.geojson from every completed
    fast-orthophoto task.
  2. Group camera models by their exact ODM camera key.
  3. Compare camera model by their pixel-to-ray mapping and select the medoid:
    the complete task model that best represents the group.
  4. Write the selected models to a cameras.json file and pass it to the full
    run with --cameras.

Do not pass --use-fixed-camera-params. Large stochastic runs already hold the
supplied model fixed. If fewer than 4,000 shots reconstruct, normal bundle adjustment
should remain free to refine it.

If a camera key has too few valid candidates or the candidates disagree too much,
omit that key and let ODM use its normal initialization.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions