Skip to content

Commit

Permalink
store stitcher arguments in verbose mode (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasalexanderweber authored Aug 8, 2024
1 parent 4ab9bf7 commit c4bde1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions stitching/stitcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def __init__(self, **kwargs):
def initialize_stitcher(self, **kwargs):
self.settings = self.DEFAULT_SETTINGS.copy()
self.validate_kwargs(kwargs)
self.kwargs = kwargs
self.settings.update(kwargs)

args = SimpleNamespace(**self.settings)
Expand Down
3 changes: 3 additions & 0 deletions stitching/verbose.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
def verbose_stitching(stitcher, images, feature_masks=[], verbose_dir=None):
_dir = "." if verbose_dir is None else verbose_dir

with open(verbose_output(_dir, "00_stitcher.txt"), "w") as file:
file.write(type(stitcher).__name__ + "(**" + str(stitcher.kwargs) + ")")

images = Images.of(
images, stitcher.medium_megapix, stitcher.low_megapix, stitcher.final_megapix
)
Expand Down

0 comments on commit c4bde1b

Please sign in to comment.