179 Commits

Author SHA1 Message Date
rom9
22eee9787e
Film negative stable multipliers (#5485)
* Added new feature to calculate channel multipliers from crop area. This also saves the crop area channel medians to the processing profiles, in order to get a more consistent color balance when batch-applying the same profile to multiple pictures from the same film roll.

* Fixed wrong initialization of array, and missing check for the result of `getFilmNegativeMedians()`.
Moved `ImProcCoordinator::translateCoord()` from private member to anonymous namespace.
Fixed some whitespace and formatting issues.

* Fixed some formatting issues

* Passed `ipf` parameter as const in `translateCoord`.
Narrowed `using namespace` to single class `Coord2D`.

* Added `scaleGain` entry to thumbnail metadata file, to make `scale_mul` multipliers available in thumbnail processing phase. This simplifies multiplier calculations, so that "faking" thumbnail multipliers in the main image processing is not necessary anymore. This way, output values are immune to slight variations of multipliers between successive shots taken with in-camera AWB turned on.
Shifted multipliers so that the output channel medians are balanced when "Camera WB" is selected. This way, just computing multipliers from crop and setting "Camera WB" (which is the default) gives a pretty well balanced image as a starting point.

* New channel scaling method, based on a film base color sample instead of crop area channel medians. Channels are scaled so that the converted film base values are equal to 1/512th of the output range (65k). This giver better black levels in the output, and more consistency when batch-processing multiple negatives.
The output is now compensated for a known fixed WB value, so that the film base will appear grey when WB is set to 3500K, Green=1.
Added PPVERSION 347 to preserve backwards compatibility: when a processing profile saved by RT 5.7 is loaded (PPVERSION=346), the new fields are initialized to the special value -1, which will instruct the main processing to follow the old channel scaling behaviour. The old channel scaling multipliers will then be converted to the new film base values so that the resulting image is the same, and the fields will be overwritten as soon as the PP is saved again. This will transparently upgrade the processing profile.
When the new behaviour is used, but the film base values are still unset, they are estimated based on channel medians, excluding a 20% border around the image. This should give a better result out-of-the-box for pictures containing a large film holder.

* Code cleanup from review

* Run astyle on film neg source files

* Fixed automated build failure caused by incompatible libraries on my dev PC.

* Simplified `Thumbnail::processFilmNegative` method signature. There is no need to pass in `rmi`,`gmi`,`bmi` multipliers from the caller, i can do the same with my own internal multipliers.

* Added `FilmNegListener` class to pass estimeted film base values to the GUI after first processing. Removed old `filmBaseValues` instance variable from RawImageSource.

* Code cleanup

* Forgot to set baseValues flag in `PartialPasteDlg::applyPaste`
Fixed `filmBaseValuesLabel` not updating when reading zero baseValues. Normally not needed (the label is updated later by the listener), but when the user is browsing through pictures the listener won't fire, so the label must be updated to show values are unset.

* Overwritten channel scaling multipliers by calling `get_colorsCoeff` with `forceAutoWB=false`.
Initially, in `RawImageSource::load`, channels are auto-balanced by averaging the whole picture when computing multipliers.
This can give different multipliers for multiple shots of the same camera, which will lead to inconsistent conversions when batch-processing multiple negatives.
This commit re-sets `scale_mul`, `ref_pre_mul`, etc., in order to "undo" the auto-WB and use the normal camera multipliers.

* Found an easier way to get stable overall multipliers, removed the (horrible) on-the-fly mutation of scaling instance variables.
2020-04-13 17:20:56 +02:00
Desmis
31355ca70e Added equalizer denoise luminance 2020-04-06 09:37:37 +02:00
Desmis
61c6b19533 GUI for wavelt denoise chroma 2020-04-02 12:32:29 +02:00
Desmis
b8749f708c Added effect to edge sharpness 2020-03-31 14:24:17 +02:00
Desmis
0fa2ca79c2 Improvment contrast to prevent texture and noise 2020-03-30 08:54:26 +02:00
Desmis
a61463447a Improvment to Blur levels 2020-03-28 08:35:00 +01:00
Desmis
c836376766 Blur residual luma and chroma 2020-03-26 09:34:38 +01:00
Desmis
51f1198b65 Init blur by levels 2020-03-25 18:06:32 +01:00
Desmis
cdf8d8ec7f Wavelet - added offset to contrast levels 2020-03-25 07:15:27 +01:00
Desmis
6d154bcdae Wavelet - Give possibility to use old algo SH residual image 2020-03-24 11:29:50 +01:00
Desmis
1f4613cd3b GUI for TM wavelet 2020-03-22 10:37:21 +01:00
Desmis
05f365c0d6 Added method Illuminant to make choices easier in free mode 2020-03-04 16:31:49 +01:00
Desmis
f4da001589 Ciecam02 autotempout button 2020-03-02 20:00:02 +01:00
Desmis
603b55e690 Preset cat02 automatic 2020-02-25 17:28:19 +01:00
Desmis
ba7a61c391 merge with dev 2020-01-13 08:33:45 +01:00
Ingo Weyrich
49d594f67a Log transform: add method combobox 2020-01-02 19:28:57 +01:00
Desmis
025f444d7e Improve contrast levels with sigma 2019-12-15 08:21:41 +01:00
Desmis
c58d2a1d75 merge with dev 2019-11-14 14:07:04 +01:00
Ingo Weyrich
3be7016517 Capture sharpening: Remove range adjuster and introduce 2019-11-13 21:05:24 +01:00
Ingo Weyrich
e525f5bec1 Capture sharpening: added range-adjuster to exclude bright areas from sharpening 2019-11-12 14:37:15 +01:00
Ingo Weyrich
d32c570383 Capture sharpening: removed gamma 2019-11-10 16:05:24 +01:00
Desmis
d621721ffe merge wit dev 2019-11-07 07:17:19 +01:00
Ingo Weyrich
b58d38fc62 Fix clang warnings 2019-11-01 17:17:29 +01:00
Ingo Weyrich
785273e7bf Further reduction of include dependencies 2019-11-01 01:03:30 +01:00
Morgan Hardwood
fa7ba481d7 Merge branch 'dev' into wavelenh 2019-09-25 12:43:57 +02:00
Desmis
f57d74ffbd merge with dev 2019-09-23 11:40:25 +02:00
Ingo Weyrich
0fc0eced5a Merge branch 'dev' into dehaze_speedup 2019-09-22 15:39:19 +02:00
Ingo Weyrich
7ff3192cc9 dehaze: added lumimance mode from ART, #5456, thanks to @agriggio 2019-09-20 14:03:09 +02:00
Desmis
332782ec9b merge with dev 2019-09-17 10:57:05 +02:00
Ingo Weyrich
f2cdbd0e4d Capture sharpening: experimental radius offset depending on distance to center 2019-09-16 15:09:47 +02:00
Ingo Weyrich
4079bb9920 Capture Sharpening: automatic radius calculation 2019-09-11 18:56:07 +02:00
Desmis
00df4707a8 merge with dev 2019-09-11 11:41:24 +02:00
Ingo Weyrich
ba43437220
Merge pull request #5445 from Beep6581/capture_sharpening
Merge Capture sharpening into dev to get more tests
2019-09-10 19:27:01 +02:00
Morgan Hardwood
60b2196bce Updated gnu.org links to use HTTPS 2019-09-10 12:34:57 +02:00
Ingo Weyrich
f882309f59 capture sharpening: own compilation unit, smooth progressbar, #5412 2019-08-30 14:45:45 +02:00
Ingo Weyrich
7b3c50bc31 Capture sharpening: auto contrast threshold 2019-08-17 15:18:24 +02:00
Ingo Weyrich
506254ce46 capture sharpening: first mockup 2019-08-14 17:19:26 +02:00
Desmis
28590fa827 merge with dev 2019-07-19 09:42:56 +02:00
rom9
b4c109f275 ProcParams now contain red and blue ratios, to be aligned with values in the GUI. 2019-06-29 16:06:40 +02:00
rom9
9df8008949 Film negative processing: first usable version. Only supports bayer raw files, thumbnails don't work
Added performance improvements suggested by heckflosse. Lowered median sampling step from 7 to 5 since calculation is now much faster.

Added support for Fuji X-Trans raw files.

Applied SSE2 patch provided by @heckflosse, improves performance in main processing loop.

Moved film negative processing stuff in its own compilation unit.

Code cleanup: removed redundant omp directives.

Added check for dead pixels, going above threshold after inversion. ST_BAYER only for now.

Reverted leftover hack in cropwindow.cc
2019-06-08 01:40:29 +02:00
Desmis
83f487753c Improve shadows-Highlight Residual 2019-05-27 09:23:56 +02:00
Desmis
fc9867eb2d Improvment to residual image 2019-05-21 07:48:18 +02:00
Desmis
7ec1b27a91 Add show mask to Clarity 2019-03-23 12:45:44 +01:00
Desmis
48d30e50c7 Wavelet Clarity and Unsharp mask 2019-03-22 18:20:00 +01:00
Flössie
9fe6bcaab1 Merge branch 'dev' into relax-procparam-dependency 2019-03-10 12:54:04 +01:00
Flössie
57d030881d More procparams.h relaxation 2019-03-01 17:40:02 +01:00
heckflosse
520a3709bf Allow user defined border for xtrans, #5198 2019-03-01 14:47:55 +01:00
heckflosse
46aabd2003 Unfix fixed white level, #5187 2019-02-23 14:00:45 +01:00
heckflosse
5162484517 First quick&dirty version of flat region blur, #5075 2018-12-08 21:57:56 +01:00
Alberto Griggio
5e30b5ac58 merged 'colortoning-labregions' into 'dev' 2018-11-01 15:18:11 +01:00