FilmNegative: non-raw file support and better accuracy (#5798)

* Added support for non-raw files to the film negative tool. The tool is now under the "Color" tab. Moved the entire filmneg code downstream, right after input profile conversion.
Usage changes a bit: White Balance must be set to the _backlight_ color temperature. Added two more sliders to color-balance the picture after negative inversion. Legacy inversion method kept for compatibility with processing profiles saved by RT v5.7 or 5.8 (only if Film Negative was enabled). Should be removed in a future version.
There is still an issue with DCP profiles that need the look table to be active to work properly. Using a simple matrix input profile (or just camera standard) is recommended for now.

* The user can now choose to perform inversion before or after input colorspace conversion.
Seamless backwards compatibility with previous processing profiles; upgrading from a previous version now gives an (almost) identical output as before.
Generalised the concept of film base values: the processing profile now contains a pair of RGB triplets, "reference input" and "reference output", which makes it much more straightforward to compute the output multipliers.

* Added support for `RGB` data type to putToKeyFile, removed the now unused `RGB::toVector()` method. Some cleanup.

* Spot balance picker now stays active indefinitely. Can be disabled by right-clicking, too.

* Removed film negative from `filterRawRefresh` condition, since the new version does not require raw rendering anymore.

* The Output Level slider is now exponential, so it should feel more familiar to use (similar to the exposure compensation slider).

* Removed old `RedBase`, `GreenBase`, `BlueBase` keys from the PP3 file after params upgrade. Keys are only kept if the file only undergoes batch edit (hence no params upgrade was done).

* Made the balance sliders exponential and centered at zero. Now they should be a bit smoother and possibly more user-friendly.

* Changed adjusters' step to more useful values, they were too fine-grained and hard to adjust using the +/- spinbutton.
Increased max ratio value from 3 to 5, as i found an old negative needing a very high blue channel exponent.

* Added an initial processing profile for film negative inversion, to be provided as a bundled profile.

* Removed Output Level and balance sliders when in batch mode: since the effect of these sliders is dependent on the reference input values, those values needed to be copied as well. And, touching any of the sliders needed to flag all three as dirty. All this felt more confusing than useful.
It should be sufficient (and clearer) to copy/paste the params, and then fine-tune the balance on individual pictures when needed.

* Set bayer demosaic method to RCD in the bundled "Film Negative" processing profile. RCD seems to play a bit better with Capture Sharpening in the presence of film grain, compared to Amaze.
This will favor new users starting with all-defaults settings, hence having Capture Sharpening enabled by default.

* Removed incorrect "contrast" term from the "Reference exponent" label. This parameter adjusts the image _gamma_, not its contrast.
This commit is contained in:
rom9
2020-11-21 13:29:47 +01:00
committed by GitHub
parent 7861f5bcd4
commit e635030650
26 changed files with 1327 additions and 936 deletions

View File

@@ -1257,8 +1257,10 @@ HISTORY_MSG_DEHAZE_STRENGTH;Dehaze - Strength
HISTORY_MSG_DUALDEMOSAIC_AUTO_CONTRAST;Dual demosaic - Auto threshold
HISTORY_MSG_DUALDEMOSAIC_CONTRAST;Dual demosaic - Contrast threshold
HISTORY_MSG_EDGEFFECT;Edge Attenuation response
HISTORY_MSG_FILMNEGATIVE_BALANCE;FN - Reference output
HISTORY_MSG_FILMNEGATIVE_COLORSPACE;Film negative color space
HISTORY_MSG_FILMNEGATIVE_ENABLED;Film Negative
HISTORY_MSG_FILMNEGATIVE_FILMBASE;Film base color
HISTORY_MSG_FILMNEGATIVE_REF_SPOT;FN - Reference input
HISTORY_MSG_FILMNEGATIVE_VALUES;Film negative values
HISTORY_MSG_HISTMATCHING;Auto-matched tone curve
HISTORY_MSG_ICM_OUTPUT_PRIMARIES;Output - Primaries
@@ -1559,7 +1561,7 @@ PARTIALPASTE_EQUALIZER;Wavelet levels
PARTIALPASTE_EVERYTHING;Everything
PARTIALPASTE_EXIFCHANGES;Exif
PARTIALPASTE_EXPOSURE;Exposure
PARTIALPASTE_FILMNEGATIVE;Film Negative
PARTIALPASTE_FILMNEGATIVE;Film negative
PARTIALPASTE_FILMSIMULATION;Film simulation
PARTIALPASTE_FLATFIELDAUTOSELECT;Flat-field auto-selection
PARTIALPASTE_FLATFIELDBLURRADIUS;Flat-field blur radius
@@ -2252,12 +2254,19 @@ TP_EXPOSURE_TCMODE_WEIGHTEDSTD;Weighted Standard
TP_EXPOS_BLACKPOINT_LABEL;Raw Black Points
TP_EXPOS_WHITEPOINT_LABEL;Raw White Points
TP_FILMNEGATIVE_BLUE;Blue ratio
TP_FILMNEGATIVE_FILMBASE_PICK;Pick film base color
TP_FILMNEGATIVE_FILMBASE_TOOLTIP;Pick a spot of unexposed film (eg. the border between frames), to get the actual film base color values, and save them in the processing profile.\nThis makes it easy to get a more consistent color balance when batch-processing multiple pictures from the same roll.\nAlso use this when the converted image is extremely dark, bright, or color-unbalanced.
TP_FILMNEGATIVE_FILMBASE_VALUES;Film base RGB:
TP_FILMNEGATIVE_GREEN;Reference exponent (contrast)
TP_FILMNEGATIVE_GUESS_TOOLTIP;Automatically set the red and blue ratios by picking two patches which had a neutral hue (no color) in the original scene. The patches should differ in brightness. Set the white balance afterwards.
TP_FILMNEGATIVE_BLUEBALANCE;Cool/Warm
TP_FILMNEGATIVE_COLORSPACE;Inversion color space:
TP_FILMNEGATIVE_COLORSPACE_INPUT;Input color space
TP_FILMNEGATIVE_COLORSPACE_TOOLTIP;Select the color space used to perform the negative inversion:\n<b>Input color space</b> : perform inversion before the input profile is applied, as in the previous versions of RT.\n<b>Working color space</b> : perform inversion after input profile, using the currently selected working profile.
TP_FILMNEGATIVE_COLORSPACE_WORKING;Working color space
TP_FILMNEGATIVE_REF_LABEL;Input RGB: %1
TP_FILMNEGATIVE_REF_PICK;Pick white balance spot
TP_FILMNEGATIVE_REF_TOOLTIP;Pick a gray patch for white-balancing the output, positive image.
TP_FILMNEGATIVE_GREEN;Reference exponent
TP_FILMNEGATIVE_GREENBALANCE;Magenta/Green
TP_FILMNEGATIVE_GUESS_TOOLTIP;Automatically set the red and blue ratios by picking two patches which had a neutral hue (no color) in the original scene. The patches should differ in brightness.
TP_FILMNEGATIVE_LABEL;Film Negative
TP_FILMNEGATIVE_OUT_LEVEL;Output level
TP_FILMNEGATIVE_PICK;Pick neutral spots
TP_FILMNEGATIVE_RED;Red ratio
TP_FILMSIMULATION_LABEL;Film Simulation