Stereo camera-file import/export, display, and length clearing#1710
Open
mattdawkins wants to merge 1 commit into
Open
Stereo camera-file import/export, display, and length clearing#1710mattdawkins wants to merge 1 commit into
mattdawkins wants to merge 1 commit into
Conversation
Add desktop import/export of stereo camera/calibration files via the annotation Import/Export buttons, display the loaded camera file in stereo mode, and clear 'length' attributes from tracks/detections when a new camera file loads (toggle in user settings). On import/upload, any VIAME-supported calibration is converted to the JSON camera format via convert_cam_format.py and stored with the dataset, keeping the original.
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.
Summary
Adds desktop import/export of stereo camera/calibration files through the existing annotation Import/Export buttons, displays the loaded camera file in stereo mode, and optionally clears stale
lengthmeasurements when a new camera file is loaded. On import, any VIAME-supported calibration is normalized to the KWIVER JSON camera-rig format, and the original file is preserved alongside the media.Motivation
Stereo length measurements depend on the active calibration. There was previously no in-app way to attach or replace a dataset's camera file, and switching calibrations left behind
lengthvalues computed against the old one. This wires camera-file management into the normal import/export flow and keeps measurements consistent.What's included
Import (
ImportAnnotations.vue)subType === 'stereo'datasets, the Import menu gains a camera/calibration-file option (desktop-only; guarded byapi.importCalibrationFile) and shows the current calibration file name.openFromDisk('calibration')and hands it to the backend. After a successful import, stale length attributes are cleared when the new setting is enabled.Normalize + store (
calibrationConvert.ts,common.ts)prepareDatasetCalibrationcopies the original file into the dataset's project directory (always preserved) and, for non-JSON inputs, runs VIAME'sconfigs/convert_cam_format.py(sourcingsetup_viame.sh/.bat) to produce KWIVER's JSON camera-rig format. Supports npz, OpenCV.yml, MATLAB.mat, ZED, CamCAL, etc.multiCam.calibration;getDatasetCalibrationPath/setDatasetCalibrationmanage it.Export (
Export.vue)exportCalibrationFile).Display (
ViewerLoader.vue)Length clearing (
clearLengthAttributes.ts+ settings)clearLengthAttributesremoves every per-track and per-detectionlengthattribute across all cameras via the Track API (so reactivity/change-tracking fire; the caller persists).stereoSettings.clearLengthOnCameraFileLoad(default on), exposed inUserSettingsDialog.vue.Wiring
apispec.ts,platform/desktop/backend/ipcService.ts,platform/desktop/frontend/api.ts, andstore/dataset.ts— IPC handlers, API types, and the dataset-store calibration path.Scope / notes