[nodes] HDR Fusion: Fix bracket detection

Prior to this commit, only the shutter speed was compared between two
images to determine whether they belonged to the same group. The fnumber
and ISO were assumed to be fixed within a group, which is not always true,
and differs from what is done on the AliceVision's side.

This commit aligns Meshroom's bracket detection with AliceVision's.
This commit is contained in:
Candice Bentéjac 2023-08-04 12:08:38 +02:00
parent c27847db5a
commit 162e5c99eb
3 changed files with 3 additions and 5 deletions

View file

@ -264,7 +264,7 @@ Sample pixels from Low range images for HDR creation.
fnumber, shutterSpeed, iso = exp
if exposures:
prevFnumber, prevShutterSpeed, prevIso = exposures[-1]
if exposures and len(exposures) > 1 and (fnumber != prevFnumber or shutterSpeed > prevShutterSpeed or iso != prevIso) or newGroup:
if exposures and len(exposures) > 1 and (fnumber > prevFnumber or shutterSpeed > prevShutterSpeed or iso < prevIso) or newGroup:
exposureGroups.append(exposures)
exposures = [exp]
else: