Validate stereo fusion output path before running fusion#4530
Open
behnamasadi wants to merge 1 commit into
Open
Validate stereo fusion output path before running fusion#4530behnamasadi wants to merge 1 commit into
behnamasadi wants to merge 1 commit into
Conversation
RunStereoFuserImpl validated workspace_format, input_type and output_type up front, but never checked output_path until the results were written by WriteBinaryPlyPoints / Reconstruction::Write* after fusion completed. On large datasets fusion can run for hours, so a misspecified output_path (e.g. an existing directory when output_type is PLY, or a non-existent parent directory) aborted the whole run at the very end with a deferred THROW_CHECK_FILE_OPEN, discarding all the fusion work (issue colmap#3117). Add an early, output-type-aware validation of output_path in RunStereoFuserImpl before constructing the fuser: - PLY writes a single file, so reject an existing directory and require the parent directory to exist. - BIN/TXT write a directory of files, so require it to already exist (matching the THROW_CHECK_DIR_EXISTS in Reconstruction::Write*). Also add a ply_test case asserting that WriteTextPlyPoints / WriteBinaryPlyPoints on a directory path fail cleanly, documenting the underlying deferred-failure behavior the early check guards against.
41e0f03 to
7b80bcc
Compare
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.
RunStereoFuserImpl validated workspace_format, input_type and output_type up front, but never checked output_path until the results were written by WriteBinaryPlyPoints / Reconstruction::Write* after fusion completed. On large datasets fusion can run for hours, so a misspecified output_path (e.g. an existing directory when output_type is PLY, or a non-existent parent directory) aborted the whole run at the very end with a deferred THROW_CHECK_FILE_OPEN, discarding all the fusion work (issue #3117).
Add an early, output-type-aware validation of output_path in RunStereoFuserImpl before constructing the fuser:
Also add a ply_test case asserting that WriteTextPlyPoints / WriteBinaryPlyPoints on a directory path fail cleanly, documenting the underlying deferred-failure behavior the early check guards against.