Skip to content

Add multicam calibration#1748

Closed
romleiaj wants to merge 7 commits into
dev/sealtkfrom
sealtk/calibration
Closed

Add multicam calibration#1748
romleiaj wants to merge 7 commits into
dev/sealtkfrom
sealtk/calibration

Conversation

@romleiaj

@romleiaj romleiaj commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

romleiaj and others added 5 commits July 9, 2026 16:16
homography.ts: 3x3 matrix primitives (multiply, invert, apply, linear
and DLT solvers) plus warp-grid subdivision helpers. transform.ts:
keypointgui-style transform models (translation / rigid / similarity /
affine / homography) that all estimate to a plain Matrix3, with
Similarity as the single shared default. CameraCalibrationStore: the
persistence core for camera-rig calibration -- per-pair homographies,
correspondences, transform types, and producer provenance, with
hydrate() from dataset meta, dirty tracking, and the portable
calibration.json round trip (toCalibrationJson / loadCalibrationText).

Interactive creation (point picking, fitting, overlay preview) is not
part of this branch; it layers on top in the Manual Alignment GUI.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Persist cameraHomographies / cameraCorrespondences /
cameraTransformTypes / cameraCalibrationSource in dataset meta on both
platforms (server allowlist + desktop meta merge), and load
calibrations produced externally (e.g. by kamera) at import time: the
multicam import dialog gains a per-camera transform-file picker, the
desktop backend parses DIVE calibration .json pairs
(fromCalibrationPairs / toCalibrationPairs) and auto-discovers a
calibration.json in the import parent folder, and saveMetadata writes
the portable calibration.json alongside the project so the calibration
travels with the dataset.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
When every camera resolves a transform into the reference camera's
space (first camera in display order, composed through the calibration
pair graph), an Align button warps each pane's imagery and annotations
into that shared space at draw time -- stored geometry always stays
native per camera. Includes: AlignedViewStore + resolution wiring in
the Viewer; AlignedImageLayer (sub-quad warped imagery with seam
overlap); display-transform routing through every annotation layer;
transform-aware linked pan/zoom (useAlignedNavigation/useLinkedViewers,
with the raw screen-delta camera sync retired once transforms exist);
drawing/editing on any camera with edits mapped back through the
inverse; and a continuous cross-camera mirror that re-projects every
geometry edit onto all other calibrated cameras.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Importing single-camera annotations into a calibrated multicam dataset
now offers an "Import to all cameras" checkbox: after the import lands
on the active camera, every track is copied onto each other camera
through the camera-to-camera homographies (bounds, rotated bounds, and
GeoJSON geometry), then saved. Unlike the Align View continuous mirror
this is a data import, so confidence pairs and track/feature attributes
are copied too. Gated on the whole rig resolving to the reference
(alignedView.available), independent of the display toggle.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The dataset's saved calibration moves from a single all-pairs
calibration.json to one calibration_<camera>.json per non-reference
camera (a pair not touching the reference files under its right
camera), matching the per-camera files users already handle from
kamera. File names are discovery/provenance only: the pair's left/right
names inside each file body stay authoritative, so a misnamed or copied
file can never rebind a transform to the wrong camera. The legacy
single file is still read and is migrated (rewritten per-camera, then
removed) on the next save; stale per-camera files are cleaned up so the
on-disk set always mirrors the saved calibration.

Per-file producer stamps are compared when the set is merged (project
load and import seeding): agreement keeps the stamp, disagreement
becomes a { mixed: true, files: {...} } composite that the Align View
tooltip surfaces as a mixed-generation warning instead of composing
silently. A save never writes the composite into per-camera files --
that would read back as a unanimous rig.

Parent-folder transform discovery now returns every self-identified
calibration file (calibration.json first, then per-camera files), and
the multicam import dialog auto-attaches calibration_<camera>.json to
its matching camera slot. Files written by DIVE now also self-identify
with type: dive-camera-calibration so discovery recognizes them.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@romleiaj romleiaj marked this pull request as draft July 9, 2026 21:16
@romleiaj romleiaj mentioned this pull request Jul 9, 2026
romleiaj and others added 2 commits July 9, 2026 21:24
The per-camera calibration_<camera>.json files are now the only on-disk
form: the single all-pairs calibration.json is no longer read, migrated,
or given priority during import discovery. The Export menu gains explicit
calibration export -- one file per calibrated camera, or all of them
zipped -- built from the same per-camera grouping the save path uses, and
the multicam Everything zip now carries the files too. Exports resolve
the calibration the same way loading does (standalone files first, the
import-time meta seed otherwise) and never stamp a file with a mixed
composite source.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Calibration export is now strictly per-camera -- one
calibration_<camera>.json at a time, no all-cameras zip -- and works on
both platforms: desktop writes through the backend as before, web builds
the file client-side from the dataset meta and downloads it. The Import
menu gains a matching per-dataset calibration import (same workflow as
annotation import): pairs the file names replace the current ones, other
cameras' pairs are kept, so per-camera files can be imported one at a
time to assemble a rig; the viewer store rehydrates immediately so the
Align View picks up the new transforms without a reload. Grouping and
merge semantics live in a new shared vue-media-annotator module used by
the desktop backend, both Export menus, and both import paths, so listed
cameras, written files, and merge behavior cannot drift between
platforms. Web needs no server changes: the calibration meta fields were
already allowlisted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@romleiaj

Copy link
Copy Markdown
Collaborator Author

See #1750

@romleiaj romleiaj closed this Jul 10, 2026
@romleiaj romleiaj deleted the sealtk/calibration branch July 10, 2026 16:54
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