From 8c0e1b3173f6d09aef8beb1c735a7513b3be48ff Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Fri, 28 Apr 2023 12:57:27 -0400 Subject: [PATCH] RGB edge inpainting --- SuperBuild/CMakeLists.txt | 2 +- VERSION | 2 +- stages/odm_orthophoto.py | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/SuperBuild/CMakeLists.txt b/SuperBuild/CMakeLists.txt index d32b47fb..b218c19b 100644 --- a/SuperBuild/CMakeLists.txt +++ b/SuperBuild/CMakeLists.txt @@ -242,7 +242,7 @@ externalproject_add(dem2points externalproject_add(odm_orthophoto DEPENDS opencv GIT_REPOSITORY https://github.com/OpenDroneMap/odm_orthophoto.git - GIT_TAG 290 + GIT_TAG 314 PREFIX ${SB_BINARY_DIR}/odm_orthophoto SOURCE_DIR ${SB_SOURCE_DIR}/odm_orthophoto CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${SB_INSTALL_DIR} diff --git a/VERSION b/VERSION index ff365e06..0aec50e6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.1.3 +3.1.4 diff --git a/stages/odm_orthophoto.py b/stages/odm_orthophoto.py index 16efdd7c..591105f2 100644 --- a/stages/odm_orthophoto.py +++ b/stages/odm_orthophoto.py @@ -41,7 +41,8 @@ class ODMOrthoPhotoStage(types.ODM_Stage): 'corners': tree.odm_orthophoto_corners, 'res': resolution, 'bands': '', - 'depth_idx': '' + 'depth_idx': '', + 'inpaint': '' } models = [] @@ -79,12 +80,15 @@ class ODMOrthoPhotoStage(types.ODM_Stage): else: models.append(os.path.join(base_dir, model_file)) + # Perform edge inpainting on RGB datasets + kwargs['inpaint'] = "-inpaintThreshold 1.0" + kwargs['models'] = ','.join(map(double_quote, models)) # run odm_orthophoto system.run('"{odm_ortho_bin}" -inputFiles {models} ' '-logFile "{log}" -outputFile "{ortho}" -resolution {res} -verbose ' - '-outputCornerFile "{corners}" {bands} {depth_idx}'.format(**kwargs)) + '-outputCornerFile "{corners}" {bands} {depth_idx} {inpaint}'.format(**kwargs), env_vars={'OMP_NUM_THREADS': args.max_concurrency}) # Create georeferenced GeoTiff geotiffcreated = False