Remember the last calibration file either generated or used on a sequence and use that as the future default #1571
+122
−3
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.
Remember Last Calibration File
Summary
This PR adds functionality to remember and automatically use the last calibration file that was entered or generated in the DIVE Desktop application. This improves the user experience when working with stereo camera datasets by reducing repetitive file selection.
Features
1. Calibration File Persistence
last_calibration.jsonin the data directory2. Auto-Loading in Import Dialog
3. Automatic Saving
The calibration file is automatically saved in two scenarios:
calibrate_cameras) completes successfully, the generated calibration file is automatically saved as the new default4. Auto-Application to Uncalibrated Datasets
Technical Changes
Frontend (
client/)dive-common/components/ImportMultiCamDialog.vue:onMountedhook to load the last calibration file when the dialog opens for stereo importsdive-common/apispec.ts:getLastCalibration()andsaveCalibration()platform/desktop/frontend/api.ts:getLastCalibration()andsaveCalibration()functions using IPC communicationBackend (
client/platform/desktop/backend/)ipcService.ts:get-last-calibrationandsave-calibrationnative/common.ts:getLastCalibrationPath(): Retrieves the path to the saved calibration filesaveLastCalibration(): Saves a calibration file to the data directoryapplyCalibrationToUncalibratedStereoDatasets(): Applies a calibration file to all stereo datasets without existing calibrationnative/viame.ts:constants.ts:LastCalibrationFileNameconstant ('last_calibration.json')Benefits
Testing Considerations