Take the stereo calibration from DIVE instead of a global directory - #282
Open
mattdawkins wants to merge 1 commit into
Open
Take the stereo calibration from DIVE instead of a global directory#282mattdawkins wants to merge 1 commit into
mattdawkins wants to merge 1 commit into
Conversation
The measurement and ifremer stereo pipes pointed their calibration at a
global:input_cameras_directory that defaulted to /home/<user>/Desktop/...,
and exposed it as a DIVE folder picker. That picker never did anything:
$CONFIG{} expands at parse time with backward references only, while -s
blocks are appended last, so an override of the global never reached the
consuming process. Runs silently used the hardcoded path.
Name the consuming process keys directly and declare them in a
'# Calibration Keys:' header, which DIVE binds the dataset's calibration
file to. Verified with kwiver pipe-config that -s now reaches the nested
depth_map:computer:ocv_stereo_disparity:calibration_file.
DIVE hands down a single file, but ocv_stereo_disparity and the ifremer
ocv_pair_stereo_* processes only ever read a directory of intrinsics.yml +
extrinsics.yml. Route them through read_stereo_rig, which already handles
both, so they accept .json/.yml/.npz/.mat as well; rename their
cameras_directory config to calibration_file to match every other camera
file parameter. Those formats carry no rectification transforms, so
stereoRectify now derives them on the first frame, where an image size is
finally known.
Image-producing pipes default their output directory to '.' rather than a
hardcoded home path.
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.
Problem
The measurement and ifremer stereo pipes pointed their calibration at a
global:input_cameras_directorydefaulting to/home/<user>/Desktop/..., exposed as a DIVE folder picker.That picker was a no-op.
$CONFIG{}expands at parse time with backward references only, while-sblocks are appended last, so overriding the global never reached the consuming process — runs silently used the hardcoded path.Changes
# Calibration Keys:header (needs Let a pipe declare which config keys receive the calibration file Kitware/dive#1814)ocv_stereo_disparityand the ifremerocv_pair_stereo_*processes throughread_stereo_rig, which already handles both files and OpenCV directories, so they accept.json/.yml/.npz/.mat— DIVE hands down a single file, but these only ever read a directory ofintrinsics.yml+extrinsics.ymlcameras_directoryconfig tocalibration_file, matching every other camera file parameterstereoRectifynow derives them on the first frame, where an image size is finally known.Verification
kwiver pipe-configconfirms-snow reachesdepth_map:computer:ocv_stereo_disparity:calibration_file, and that the output template bakes to./depth_map%06d.pngviame_opencvandviame_processes_opencvbuild and link cleanNote
calibration_params.confstill has/home/<user>/...paths forvideo_filename/tracks_left|right— those are example inputs DIVE overrides per-run, left as documentation.