60 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
Ingo Weyrich
ff9eeb4744 Capture Sharpening missing from Parameters to save partial processing profile dialog box, fixes #5487 2019-11-21 18:09:14 +01:00
Morgan Hardwood
60b2196bce Updated gnu.org links to use HTTPS 2019-09-10 12:34:57 +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
Flössie
015cffc73a Peripheral cleanups and a fix
- Whitespace, braces, sorting
- Fixed missing filmnegative in `ProcParams::operator ==(ProcParams)`
2019-06-13 09:52:13 +02:00
rom9
5ddc4a3e0e Added missing checkbox for film negative feature in partial apply / partial paste dialogs. 2019-06-11 22:13:16 +02: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
Alberto Griggio
b50b8dea9f merge with dev 2018-10-27 16:11:17 +02:00
heckflosse
3cd065ea21 partial paste: add dualdemosaic auto threshold 2018-10-21 21:18:05 +02:00
Alberto Griggio
14ac4babec added haze removal tool
Based on the paper:
  "Single Image Haze Removal Using Dark Channel Prior" by He, Sun and Tang
using a guided filter for the "soft matting" of the transmission map
2018-10-10 10:02:06 +02:00
Morgan Hardwood
2756fe9e35 Americanized spelling of language key 2018-09-22 17:52:06 +02:00
heckflosse
10d671a93a CAAvoidColourshift saved unconditionally on pp3's, fixes #4827 2018-09-22 12:00:37 +02:00
heckflosse
9ecc7e6876 iterative raw auto ca correction, #4774 2018-09-05 13:30:15 +02:00
Alberto Griggio
7b0383fd2f merge 'soft-light' into 'dev' 2018-06-29 23:34:31 +02:00
heckflosse
d748e4dacc Merge branch 'dev' into fullraw 2018-06-28 16:04:49 +02:00
heckflosse
5c04e6308f First steps to allow border = 0, issue #4642 2018-06-27 22:34:53 +02:00
Morgan Hardwood
702a88f784 Only write DualDemosaicContrast to PP3 when needed
The Bayer and X-Trans "DualDemosaicContrast" key will only be written to
PP3 if the "Raw > Demosaic method" checkbox is checked.
Fixes #4628
2018-06-26 22:50:19 +02:00
heckflosse
41c1f21c76 Pixelshift: replaced checkbox to use lmmse by a combobox to allow further demosaicers for parts with motion, #4579 2018-06-01 19:13:59 +02:00
heckflosse
3578529082 Pixelshift: further cleanup 2018-04-14 23:24:28 +02:00
Alberto Griggio
112de05700 added SoftLight tool 2018-04-10 09:42:22 +02:00
Alberto Griggio
81a8aa4037 added experimental RAW Bayer preprocessing filter for mititgating the Sony PDAF lines banding problem 2018-03-05 16:25:10 +01:00
Alberto Griggio
0bb7375a90 added possibility to apply "RAW line noise filter" only in a specific direction (horizontal or vertical) 2018-02-28 23:37:34 +01:00
Alberto Griggio
db8024ed34 fixed typo (thanks Beep6581) 2018-02-01 11:44:02 +01:00
Alberto Griggio
9a8d2bd8ff moved local contrast to the detail panel 2018-02-01 11:04:13 +01:00
Alberto Griggio
258c286c86 improve layout of the partial pp3 paste dialog
move metadata group in the middle column
2018-01-24 22:10:07 +01:00
Alberto Griggio
e4555cc51c PP3 save: make sure that when nothing is selected, the PP3 is truly empty
Fixes #4330
2018-01-24 22:09:30 +01:00
Morgan Hardwood
f5bd232cd2 Partial Paste dialog cleanup and fix for Advanced
Closes #4332
2018-01-24 14:58:14 +01:00
Alberto Griggio
2aea7aa97c moved channel mixer back to the color tab 2018-01-20 18:50:01 +01:00
Alberto Griggio
3c2e30dbcc renamed Wavelet tab to Advanced and moved more tools there (see #4298) 2018-01-14 21:36:25 +01:00
Alberto Griggio
0aff2f7c6c added partial paste and add/set preferences for local contrast 2017-12-20 16:56:05 +01:00
Hombre
2a3f864a8c Fix issue #4216: Partial profile always saves color management > output
profile intent
2017-12-16 01:29:36 +01:00
Flössie
c702e5d847 Additional manual cleanups to ProcParams::(save|load)() 2017-11-11 21:11:57 +01:00
Hombre
b64707bea6 Adding ADD/SET mechanism to Fattal HDR tool + PartialPaste dialog gui
+ range of Beta limited to 0.7 <> 1.3.

ADD/SET mechanism was missing for EPD tool too, so it's included in this
commit.

see #4168
2017-11-04 21:27:11 +01:00
heckflosse
22692f5a04 remove unused caautostrength 2017-07-09 19:41:21 +02:00
heckflosse
2c7de89fbc Fixes #3959, Empty partial PP3 not saved empty 2017-07-08 20:32:01 +02:00
heckflosse
46ba94c36f CAAutoStrength key is always saved when saving partial PP3, fixes #3823 2017-04-13 13:52:48 +02:00
heckflosse
45a66e980f Fix some uninitialized variables found by valgrind; also fixes #3786 2017-03-28 14:01:19 +02:00
Hombre
209ea3533b Adding PixelShift to PartialPaste window + small bugfixs (issue #3489) 2017-03-28 00:02:10 +02:00
heckflosse
f9a536fd0b new gtk3 version of pixelshift 2017-03-11 22:30:36 +01:00
Hombre
6bd0dbacfe Solving isse #3524 2016-12-11 00:23:38 +01:00
Hombre
d8593469ee Adding 'Image Number' to the Bayer Raw tool 2016-11-02 02:06:40 +01:00
Morgan Hardwood
0dbea030cb Merge branch 'master' into gtk3-merge-master-b8eb349 2016-10-10 23:07:41 +02:00
heckflosse
e82b60cd03 Cppcheck: Fixed some issues found by Flössie during review of my changes 2016-10-04 23:50:44 +02:00
Hombre
49ec26e98b Adding a new test theme + setting an ID to the Partial Paste's
ScrolledWindow
2016-04-03 03:30:15 +02:00
Hombre
b7a3c45c7e Add new object IDs for theming (see issue #3214) 2016-03-26 15:06:17 +01:00
Hombre
3577d87862 Removed set_border_width from the code, padding and margin values still
to be set in CSS file
2016-02-23 21:36:00 +01:00
Beep6581
8c67765341 Merged master 55fc921 into gtk3 676a444 2016-01-24 17:39:34 +01:00
Desmis
2d77d783e0 Fixed various bug issue 2969 2016-01-17 10:06:22 +01:00
Adam Reichold
375ed172e0 Also fix the missing parent window for the partial-paste and the save-as dialogs. 2016-01-10 18:07:06 +01:00