kopia lustrzana https://github.com/OpenDroneMap/ODM
Dynamic max-texture-size
rodzic
1dd0b4b457
commit
2f41ed420b
|
@ -9,7 +9,7 @@ ExternalProject_Add(${_proj_name}
|
||||||
#--Download step--------------
|
#--Download step--------------
|
||||||
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}/${_proj_name}
|
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}/${_proj_name}
|
||||||
GIT_REPOSITORY https://github.com/OpenDroneMap/mvs-texturing
|
GIT_REPOSITORY https://github.com/OpenDroneMap/mvs-texturing
|
||||||
GIT_TAG 264
|
GIT_TAG 267
|
||||||
#--Update/Patch step----------
|
#--Update/Patch step----------
|
||||||
UPDATE_COMMAND ""
|
UPDATE_COMMAND ""
|
||||||
#--Configure step-------------
|
#--Configure step-------------
|
||||||
|
|
|
@ -6,12 +6,20 @@ from opendm import system
|
||||||
from opendm import context
|
from opendm import context
|
||||||
from opendm import types
|
from opendm import types
|
||||||
from opendm.multispectral import get_primary_band_name
|
from opendm.multispectral import get_primary_band_name
|
||||||
|
from opendm.photo import find_largest_photo_dim
|
||||||
|
|
||||||
class ODMMvsTexStage(types.ODM_Stage):
|
class ODMMvsTexStage(types.ODM_Stage):
|
||||||
def process(self, args, outputs):
|
def process(self, args, outputs):
|
||||||
tree = outputs['tree']
|
tree = outputs['tree']
|
||||||
reconstruction = outputs['reconstruction']
|
reconstruction = outputs['reconstruction']
|
||||||
|
|
||||||
|
max_dim = find_largest_photo_dim(reconstruction.photos)
|
||||||
|
max_texture_size = 8 * 1024 # default
|
||||||
|
|
||||||
|
if max_dim > 8000:
|
||||||
|
log.ODM_INFO("Large input images (%s pixels), increasing maximum texture size." % max_dim)
|
||||||
|
max_texture_size *= 3
|
||||||
|
|
||||||
class nonloc:
|
class nonloc:
|
||||||
runs = []
|
runs = []
|
||||||
|
|
||||||
|
@ -92,6 +100,7 @@ class ODMMvsTexStage(types.ODM_Stage):
|
||||||
'keepUnseenFaces': keepUnseenFaces,
|
'keepUnseenFaces': keepUnseenFaces,
|
||||||
'toneMapping': self.params.get('tone_mapping'),
|
'toneMapping': self.params.get('tone_mapping'),
|
||||||
'nadirMode': nadir,
|
'nadirMode': nadir,
|
||||||
|
'maxTextureSize': '--max_texture_size=%s' % max_texture_size,
|
||||||
'nvm_file': r['nvm_file'],
|
'nvm_file': r['nvm_file'],
|
||||||
'intermediate': '--no_intermediate_results' if (r['labeling_file'] or not reconstruction.multi_camera) else '',
|
'intermediate': '--no_intermediate_results' if (r['labeling_file'] or not reconstruction.multi_camera) else '',
|
||||||
'labelingFile': '-L "%s"' % r['labeling_file'] if r['labeling_file'] else ''
|
'labelingFile': '-L "%s"' % r['labeling_file'] if r['labeling_file'] else ''
|
||||||
|
@ -113,7 +122,8 @@ class ODMMvsTexStage(types.ODM_Stage):
|
||||||
'{skipLocalSeamLeveling} '
|
'{skipLocalSeamLeveling} '
|
||||||
'{keepUnseenFaces} '
|
'{keepUnseenFaces} '
|
||||||
'{nadirMode} '
|
'{nadirMode} '
|
||||||
'{labelingFile} '.format(**kwargs))
|
'{labelingFile} '
|
||||||
|
'{maxTextureSize} '.format(**kwargs))
|
||||||
|
|
||||||
# Backward compatibility: copy odm_textured_model_geo.mtl to odm_textured_model.mtl
|
# Backward compatibility: copy odm_textured_model_geo.mtl to odm_textured_model.mtl
|
||||||
# for certain older WebODM clients which expect a odm_textured_model.mtl
|
# for certain older WebODM clients which expect a odm_textured_model.mtl
|
||||||
|
|
Ładowanie…
Reference in New Issue