mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-20 20:46:28 +02:00
[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:
parent
c27847db5a
commit
162e5c99eb
3 changed files with 3 additions and 5 deletions
|
@ -238,7 +238,7 @@ Calibrate LDR to HDR response curve from samples.
|
|||
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:
|
||||
|
@ -273,5 +273,4 @@ Calibrate LDR to HDR response curve from samples.
|
|||
bestTuple = tuple if tuple[0] > bestTuple[0] else bestTuple
|
||||
|
||||
bestBracketSize = bestTuple[0]
|
||||
bestCount = bestTuple[1]
|
||||
node.nbBrackets.value = bestBracketSize
|
||||
|
|
|
@ -324,7 +324,7 @@ Merge LDR images into HDR images.
|
|||
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:
|
||||
|
@ -359,7 +359,6 @@ Merge LDR images into HDR images.
|
|||
bestTuple = tuple if tuple[0] > bestTuple[0] else bestTuple
|
||||
|
||||
bestBracketSize = bestTuple[0]
|
||||
bestCount = bestTuple[1]
|
||||
node.nbBrackets.value = bestBracketSize
|
||||
|
||||
def processChunk(self, chunk):
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue