kopia lustrzana https://github.com/OpenDroneMap/ODM
Disable bg/sky removal with DNGs
rodzic
2190a5dfa0
commit
f5869777ed
opendm
stages
|
@ -14,7 +14,6 @@ def get_image_size(file_path, fallback_on_error=True):
|
|||
if file_path[-4:].lower() in [".dng", ".raw", ".nef"]:
|
||||
with rawpy.imread(file_path) as img:
|
||||
s = img.sizes
|
||||
|
||||
width, height = s.raw_width, s.raw_height
|
||||
else:
|
||||
with Image.open(file_path) as img:
|
||||
|
|
|
@ -216,7 +216,7 @@ class ODMLoadDatasetStage(types.ODM_Stage):
|
|||
# Generate list of sky images
|
||||
sky_images = []
|
||||
for p in photos:
|
||||
if p.mask is None and (args.camera_lens in ['fisheye', 'spherical'] or p.pitch is None or (abs(p.pitch) > 20)) and (not " " in p.filename):
|
||||
if p.mask is None and (args.camera_lens in ['fisheye', 'spherical'] or p.pitch is None or (abs(p.pitch) > 20)) and (not " " in p.filename) and not p.is_raw_format():
|
||||
sky_images.append({'file': os.path.join(images_dir, p.filename), 'p': p})
|
||||
|
||||
if len(sky_images) > 0:
|
||||
|
@ -257,7 +257,7 @@ class ODMLoadDatasetStage(types.ODM_Stage):
|
|||
# Generate list of sky images
|
||||
bg_images = []
|
||||
for p in photos:
|
||||
if p.mask is None and (not " " in p.filename):
|
||||
if p.mask is None and (not " " in p.filename) and not p.is_raw_format():
|
||||
bg_images.append({'file': os.path.join(images_dir, p.filename), 'p': p})
|
||||
|
||||
if len(bg_images) > 0:
|
||||
|
|
Ładowanie…
Reference in New Issue