Scanned image scratch removal with “ICE”

So, after a couple of test days:

  1. decorrelation works best when both Red and IR channels are in Logarithmic domain. Converting liniar Reds and IRs to log domain provided best results for me.
    • Olma, it seems, that IR channel in your files is already logarithmic
    • Barriers: some sources even in Log domain has non-liniar correlation.
  2. In case of liniar correlation, Red values can be “aligned” to IR channel, based on simple liniar regression
  3. prepared Red channel is substructed from IR
  4. then values are returned to liniar (by exp(x)) in case of liniar color space workflow (my case)
  5. liniar [R], [G], [B] channels are divided by decorrelated liniar IR
    • it restores luminance in some dirty but still transparent areas
    • Barrier: although luminance is restored, regions are still slightly visible due to less noise (film grain ?) versus neigbouring areas
  6. IR channel (and RGB channels if used) then copied for credibility map generation and made less detailed to average out the noise
    • I used blur 2-4
  7. Credibility map is built
    • I’m still not sure about optimal combinations of contrast / bilateral / deviation functions and IR/Visible sources)
    • information regarding Credibility maps can be found in HP article in previous posts
  8. Credibility weighted algorythm is applied to IR low-detail channel to generate the mask
  9. Thresshold is applied to generate the final mask
  10. inpaint_pde is applied to hires image with generated mask

Quality still loses to original Nikon ICE, however now the result is much closer.

Main challenges for me now:

  • non-liniar IR-visible channels crosstalk (top priority)
    • Mean transfer curve doesn’t work. Probaly some transformational 4x4 RGBI matrix/function should be calculated / applied.
  • grain / noise in restored areas (step 5 above), which were not covered by inpaint mask