Leica Adding a "Gamma Curve" to a digital image: Thinking out Loud and Experiments

Thanks, most illuminating.
In the 1960es Kodak published a paper on why an S curve was best. Less computation, but more labour intensive: shading and burning, waving hands in the light cone when enlarging plus suitable choice of exposure and development ,or decades later, similar imprecise and laborious work in photoshop.would achieve better brightness balance .

My generation was taught "Algol-60" and I have given up on anything except ready-to- run subroutines on W-10 or "deb" packages with all dependecies, so I am not optimistic about the possibility of compiling such code to run on my computers.

I ported this code to Windows using the Watcom V2 Fortran-77 compiler recently, so I can insert the SD card and run directly. The current version also interpolates over an under-performing line- not dead. I have it hard-coded to my sensor now, will make it more flexible. An alternative to sending the M Monochrom to Leica for remapping. I'll also add a switch for generating the Gamma curve DNG.
I ended up rewriting my code to take the bad column number as an input, and also wrote a version of code for the M8. The M Monochrom code restores the bad line. The M8 code interpolates over it from neighboring (two away) columns to get the Bayer filter array correct. The M Monochrom computes the drop in DC offset and adds it back, so the original pixels are restored. This works for CCD arrays.
Last edited: