paulduchesne / lad-based-film-transformation

Transformation of film scans based on normalising LAD patch values
MIT License
0 stars 0 forks source link

Interpolation not conforming as expected #1

Open paulduchesne opened 1 year ago

paulduchesne commented 1 year ago

Red channel prominent in shadow, as visible in plot.

torbjornbp commented 1 year ago

I'm starting to think the problem is in the scan (or in the film material). In the first graph patch 5 and 6 have more or less the same densities in the red channel. It's not really a red shift, but a failure to separate and offset very similar/identical values to two different values.

paulduchesne commented 1 year ago

I suspect this is the case as well, not that there would not be enough DPX information between the patches, but it may be causing confusion when averaging pixel values in the patches if they are too similar, which is causing the interpolation to go sideways. Best way to test would either be to switch to stock where the patches are distinctly located (say an OPN) or tweak the density on scan (for the red channel at least).

An interesting variation on all of this would be to scan using the same logic, so calibrate the scan with LAD frame in the gate and ensure that the patches are evenly distributed across the parades.

torbjornbp commented 1 year ago

Reran it with the newer scans I made from a print last week, with much better results regardless of flatness and colour separation done in the scanner. I will make some new test scans from interpos and neg material this week.

paulduchesne commented 1 year ago

commit a884e84f63fb99f2644bfe8eb615762107fda50b uses scipy.interpolate.PchipInterpolator instead of numpy.interp based in some advice from @danmackinlay, and issues related to low red tint no longer present (although source LAD frame has also changed).