Add keypoint GUI for manual calibration#1749
Open
romleiaj wants to merge 6 commits into
Open
Conversation
Closed
30ebbee to
a6d545d
Compare
f25924b to
0de24f9
Compare
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>
b60430b to
1d9a2eb
Compare
eca04d4 to
55f0eaa
Compare
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.