Skip to content

Add keypoint GUI for manual calibration#1749

Open
romleiaj wants to merge 6 commits into
sealtk/image-registrationfrom
sealtk/keypoint-gui
Open

Add keypoint GUI for manual calibration#1749
romleiaj wants to merge 6 commits into
sealtk/image-registrationfrom
sealtk/keypoint-gui

Conversation

@romleiaj

@romleiaj romleiaj commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@romleiaj romleiaj marked this pull request as draft July 9, 2026 21:17
@romleiaj romleiaj mentioned this pull request Jul 9, 2026
@romleiaj romleiaj changed the base branch from sealtk/calibration to sealtk/image-registration July 10, 2026 16:53
@romleiaj romleiaj force-pushed the sealtk/image-registration branch from 30ebbee to a6d545d Compare July 10, 2026 18:38
@romleiaj romleiaj force-pushed the sealtk/keypoint-gui branch 2 times, most recently from f25924b to 0de24f9 Compare July 12, 2026 15:12
romleiaj and others added 5 commits July 12, 2026 11:53
Extend CameraCalibrationStore with the Manual Alignment creation state
and operations: active pair, point picking (add/pick/move/drag-refine,
select/delete, clear last/pair), transform fitting (fitTransform /
maybeFitPair via the transform estimators), the ghost-overlay alignment
mode/opacity, linked-nav toggle, and cursor/recenter plumbing.
CalibrationKeypointLayer renders the picked correspondences (locked
blue / unlocked yellow, exact-pixel markers, click-select and drag) and
the cross-pane ghost warp preview; CameraImage moves here with it.
useCalibrationNavigation links the active pair's panes through the
fitted homography while picking (standing down under the Align View).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CalibrationTools.vue (modeled on VIAME's keypointgui): pick point pairs
across a camera pair, fit the chosen transform model with a
fit-readiness countdown, preview the fit as a ghost overlay with warp
opacity, review rig alignment status (N/M cameras calibrated), and
save/load the calibration -- to dataset meta and the portable
calibration.json. Wired into the Viewer as a context panel: workspace
chrome minimizes while calibrating, only the active pair's panes show
on 3+ camera rigs, the general Align warp suspends while picking so
picks are always native-space, and LayerManager mounts the keypoint
marker/ghost layer per pane.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rename the feature's own files and identifiers to the registration
vocabulary the rest of the branch adopted: CalibrationTools ->
RegistrationTools (CameraRegistration/), CalibrationKeypointLayer ->
RegistrationKeypointLayer, useCalibrationNavigation ->
useRegistrationNavigation, and the calibration-named locals, props, and
UI strings that referenced them. Stereo calibration (a genuinely
different artifact) keeps its name.

Reuse shared helpers where the feature had its own copies: the panel's
unknown-camera notice now comes from unknownCameraWarning, and the
geojs warp-quad mapping duplicated between AlignedImageLayer and the
keypoint ghost is extracted to geojsWarpQuads in alignedView/homography.
The linkedViewers README's "planned" registration-pair-link section now
describes the shipped composable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Same replacement as the Aligned View warp: the ghost polled with a
bounded requestAnimationFrame loop to catch the source pane swapping
its <img> element after a seek. The source annotator now bumps
imageRevision on that swap, so LayerManager watches the ghost source
camera's revision (alongside its frame number) and re-renders the
ghost from the element actually on screen -- with no ~1s give-up
window on slow-loading frames.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rename the Manual Alignment panel to Camera Registration and scope it to
its actual job -- picking points, fitting, and saving:

- Drop the panel's "Load registration" button: the Import menu's
  per-camera registration targets are the one import path.
- Drop the panel's export button too: the Export menu's per-camera
  registration downloads (web and desktop) are the one export path. The
  refined-from-source notice now points there (save first -- the menu
  reads saved meta).
- Remove CameraRegistrationStore.toRegistrationJson, the last whole-rig
  (all pairs in one file) serializer; per-camera
  <camera>_to_<reference>_registration.json files are the only
  registration file format. loadRegistrationText stays as the shared
  parser, and its round-trip specs now serialize through the production
  buildPerCameraRegistrationFiles.
- Protect unsaved panel edits on exit: the browser beforeunload warning,
  the navigate-away prompt, and the desktop close dialog now fire on
  registration dirt too (hasUnsavedChanges = pending annotation saves OR
  a dirty registration), and the desktop dialog's Save choice persists
  the registration via the new Viewer.saveRegistration.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@romleiaj romleiaj force-pushed the sealtk/image-registration branch from b60430b to 1d9a2eb Compare July 12, 2026 15:54
@romleiaj romleiaj force-pushed the sealtk/keypoint-gui branch from eca04d4 to 55f0eaa Compare July 12, 2026 15:55
@romleiaj romleiaj marked this pull request as ready for review July 12, 2026 15:56
@romleiaj romleiaj requested a review from BryonLewis July 12, 2026 15:56
A registration imported from a producer (e.g. KAMERA) carries matrices but
no picked points, and the panel treated it as incomplete: "Fit pan/zoom"
stayed greyed out (it gated on point count, though the link only needs a
homography), the status line claimed points were still needed, and picking
was force-enabled so stray clicks placed points on a registration that
needed none.

- Add a three-state transform status (loaded from file / fit from N point
  pairs / none) and gate the pan/zoom link on having a transform at all,
  renaming it "Link pan/zoom"; enabling it fits the pair on demand.
- Make picking an explicit "Pick points" toggle scoping the authoring UI
  (cursor readout, correspondences, transform type), defaulting per pair:
  off in review of a file-loaded transform, on when points are needed.
- Decouple linked navigation from picking mode -- it now runs whenever the
  panel has a pair and the link is on; the panel clears the pair (and with
  it the warp ghost) on close to keep that scoped.
- After a registration import, summarize what the loaded transform drives
  and, when the panel is open, re-select the imported pair in review
  posture (hydrate cleared it and left the panel inert).
- Confirm before "Save registration" overwrites existing per-camera
  registration files, naming exactly the files whose content changes --
  untouched pairs rewrite byte-identical and don't warn -- along with the
  provenance stamp being replaced.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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