From e7a03fe3425792f47815c54aa5fbc18acf94563d Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Mon, 30 Mar 2020 11:05:39 -0400 Subject: [PATCH] Remove undistorted images when possible Former-commit-id: 8525bc19d1f24a9a67bfa85d93c9b07a6b98c4e6 --- stages/mvstex.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stages/mvstex.py b/stages/mvstex.py index 71454ca0..8a90e8a0 100644 --- a/stages/mvstex.py +++ b/stages/mvstex.py @@ -133,4 +133,8 @@ class ODMMvsTexStage(types.ODM_Stage): for r in nonloc.runs: if io.file_exists(r['model']): os.remove(r['model']) + + undistorted_images_path = os.path.join(tree.opensfm, "undistorted", "images") + if io.dir_exists(undistorted_images_path): + shutil.rmtree(undistorted_images_path)