Skip to content

Preserve OpenSfM intrinsics when importing ODM cameras - #3806

Open
Afloat16 wants to merge 4 commits into
nerfstudio-project:mainfrom
Afloat16:process-data/odm-camera-calibration
Open

Afloat16 wants to merge 4 commits into
nerfstudio-project:mainfrom
Afloat16:process-data/odm-camera-calibration

Conversation

@Afloat16

@Afloat16 Afloat16 commented Nov 7, 2026

Copy link
Copy Markdown

Convert normalized principal point offsets to pixels using the image's longer side. Perspective and basic fisheye cameras omit the offset fields, so import those as centered. Spherical images have no focal length and need the equirectangular calibration used by the Metashape importer. Preserve the OpenCV fisheye k4 coefficient. Report empty camera lists and unsupported models directly instead of raising IndexError or KeyError.

Added parameterized regression coverage. Exercised the converter in isolation on eight JSON fixtures with NumPy, including portrait-independent scale, missing offsets, spherical and fisheye models, and invalid model descriptions. The full Nerfstudio checks were not run.

Use a 600 x 800 input to exercise the height as the normalization scale.
The expected horizontal principal point is 379.5 pixels, while main
50e0e3c returns 299.6. All five fixtures fail on main and pass with the
patch using the real importer. Ruff 0.12.2 lint and format checks pass.

The earlier CI run reports the same 19 Pyright diagnostic locations and
messages as PR nerfstudio-project#3797 at the same base. Both Docker runs stop building
tiny-cuda-nn because pkg_resources is unavailable.

https://github.com/nerfstudio-project/nerfstudio/actions/runs/42401285154
https://github.com/nerfstudio-project/nerfstudio/actions/runs/37900213951
https://github.com/nerfstudio-project/nerfstudio/actions/runs/42401284860
https://github.com/nerfstudio-project/nerfstudio/actions/runs/37900214031

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant