Still no satisfied with the workaround, I am digging into the code... My problem comes from this normalization that I have now commented, and this fixes all my problems!
--- pfstools-2.2.0/src/camera/robertson02.cpp.orig 2023-11-28 22:13:31.142020563 +0100
+++ pfstools-2.2.0/src/camera/robertson02.cpp 2023-11-28 22:14:04.783371761 +0100
@@ -348,7 +348,7 @@
{
if( (*rgb_out[cc])(j) == -1)
(*rgb_out[cc])(j) = mmax[cc];
- (*rgb_out[cc])(j) /= max3(mmax);
+ // (*rgb_out[cc])(j) /= max3(mmax);
}
VERBOSE_STR << "Exposure pixels skipped due to deghosting: " <<
On pfsv, I can see that the histogram is now at higher EV (5 stops). But all exr frames now show a consistent histogram, consistent across multiple frames. If I set one unique exposure level, then all the different exr frames exhibit the same mean luminosity, independently of the presence of any solar flashes (aka, extreme points in the luminosity distribution).
If I understand well the code, this max norm is to prevent things to go haywire and exceed bpp sampling? Especially useful is the dynamical range is small. But, for an animation, or movie, it is a catastrophe. It completely kills the time-coherence of exr calibration from frame to frame, even if the LDR input frames are time-coherent :-/
May be you could add an option allowing to skip this normalisation?
An intermediate solution could possibly be a median normalisation, it would be more robust to distribution tails and would keep some calibration coherence across multiple exr frames. That could not be worse than this max anyway!
Best,
Chris.