Skip to content

Take the stereo calibration from DIVE instead of a global directory - #282

Open
mattdawkins wants to merge 1 commit into
mainfrom
dev/measurement-calibration-passdown
Open

Take the stereo calibration from DIVE instead of a global directory#282
mattdawkins wants to merge 1 commit into
mainfrom
dev/measurement-calibration-passdown

Conversation

@mattdawkins

Copy link
Copy Markdown
Collaborator

Problem

The measurement and ifremer stereo pipes pointed their calibration at a global:input_cameras_directory defaulting 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 -s blocks are appended last, so overriding the global never reached the consuming process — runs silently used the hardcoded path.

Changes

  • Name the consuming process keys directly and declare them in a # Calibration Keys: header (needs Let a pipe declare which config keys receive the calibration file Kitware/dive#1814)
  • Route ocv_stereo_disparity and the ifremer ocv_pair_stereo_* processes through read_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 of intrinsics.yml + extrinsics.yml
  • Rename their cameras_directory config to calibration_file, matching 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 .

Verification

  • kwiver pipe-config confirms -s now reaches depth_map:computer:ocv_stereo_disparity:calibration_file, and that the output template bakes to ./depth_map%06d.png
  • viame_opencv and viame_processes_opencv build and link clean
  • DIVE's discovery resolves the expected keys for all six calibration-requiring pipes

Note

calibration_params.conf still has /home/<user>/... paths for video_filename / tracks_left|right — those are example inputs DIVE overrides per-run, left as documentation.

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.
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