90 Commits

Author SHA1 Message Date
Pandagrapher
1e2dc30738
Local adjustments - Fix apply/paste actions with LA
- Fixes LA lost when applying partial profile (fixes #6150)
- Fixes LA behavior when using apply/paste actions: spots are now totally replaced and not anymore merged (fixes #6136 and #6411)
- Fixes a crash in specific situations when saving/copying a partial number of spots
- Partial paste dialog: Fixes Locallab button remaining inconsistent if all the spots are deselected
2022-07-18 19:03:29 +02:00
Ingo Weyrich
e4ee63850d
Add an average filter for pixel shift to process the moving parts, closes #6376 (#6380) 2021-11-10 17:54:57 +01:00
Lawrence Lee
7e436a44d6 Merge branch 'dev' of https://github.com/Beep6581/RawTherapee into spot-removal-tool 2021-03-06 16:41:40 -08:00
Thanatomanic
fc031ccb5a
Remove deprecated GTK3 code, fixes #6103 (#6113)
Replaces the following deprecated Gtk classes throughout the codebase by their non-deprecated counterparts. Style, HBox, VBox, HPaned, VPaned, HScrollbar, VScrollbar, VSeparator, HSeparator, Stock, Table, VScale and HScale.
2021-02-17 11:44:25 +01:00
Ingo Weyrich
19e3833e66 Merge branch 'dev' into spot-removal-tool 2020-11-24 17:16:41 +01:00
rom9
e635030650
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.
2020-11-21 13:29:47 +01:00
Hombre
f42548b018 Merge branch 'dev' into spot-removal-tool 2020-05-18 14:54:30 +02:00
Desmis
56e145f5c4 Change expcomp visibility and fixed bug issue 5752 2020-05-14 14:11:47 +02:00
rom9
6590e6d98b Merge branch 'dev' into preprocess_wb 2020-05-13 19:47:09 +02:00
Pandagrapher
cca6b09768 Merge remote-tracking branch 'dev/newlocallab' into newlocallab 2020-04-20 12:54:09 +02:00
Desmis
f0e78b2a0d merge with dev 2020-04-18 07:43:44 +02:00
Pandagrapher
4ea4663e34 Merge with 'dev/newlocallab'... 2020-04-16 16:01:53 +02:00
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
rom9
fb023e7ba8 Removed channel compensation adjusters 2020-03-15 17:01:40 +01:00
rom9
d4fc4dc083 Added new "Preprocess WB" parameter in the Raw toolpanel, just below "Raw White Points" tool. Allows to choose between "Camera" and "Auto" (average-based) raw channel multipliers, and to apply custom compesation factors.
Fixes #5616
2020-02-24 21:00:51 +01:00
Pandagrapher
209eccba8a Add improved copy/paste or save/load for Locallab spots
Preliminary work: "nbspot" and "id" spot parameters have been removed to
simplify Locallab spots management.
2020-02-20 20:35:29 +01:00
Hombre57
8b60ea4794 Bugfix in SpotRemoval tool GUI (Batch Editor) + Partial Paste handling 2019-12-17 21:46:18 +01:00
Desmis
aa84bb3b0c merge with dev 2019-11-21 19:47:38 +01: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
Desmis
0711373021 Merge with dev 2019-09-11 08:35:25 +02:00
Morgan Hardwood
60b2196bce Updated gnu.org links to use HTTPS 2019-09-10 12:34:57 +02:00
Pandagrapher
e4701101c9 Creation of generic class to manage Locallab tools
Notes:
- All Locallab tools have been converted to this new design
- Locallab GUI hasn't been updated to this new design

Bugfix: Solve crash problem when using ctrl+copy/ctrl+paste
2019-08-15 10:26:44 +02:00
Desmis
70dfd07916 Fixed crash partialpast thanks to Pandagrapher 2019-08-13 16:14:38 +02:00
Desmis
cbeb828609 merge with dev 2019-07-18 13:41:26 +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
Desmis
00856bf397 Fixed partialpasteddlg thanks Floessie 2019-03-15 11:36:18 +01:00
Desmis
d2bed1f6f2 Add chroma gamma slope to exposure mask 2019-03-13 17:20:47 +01:00
heckflosse
2376a05e07 Fix segfault when pasting partial, #5214 2019-03-13 14:06:17 +01:00
heckflosse
020204e0cb Merge branch 'dev' into newlocallab 2019-03-12 14:57:17 +01:00
Desmis
65a418ae27 merge with dev 2019-03-03 18:20:16 +01:00
heckflosse
520a3709bf Allow user defined border for xtrans, #5198 2019-03-01 14:47:55 +01:00
Desmis
8e0eb97eb6 merge with dev 2019-02-26 17:44:13 +01:00
heckflosse
46aabd2003 Unfix fixed white level, #5187 2019-02-23 14:00:45 +01:00
Pandagrapher
7ccd901ad1 Merge with branch newlocallab... 2019-01-05 18:07:51 +01:00
Pandagrapher
39c53119eb Improve batch mode with Locallab
Batch mode is now correctly managed by Locallab. It works only if the
pictures have the same control spot number with coherent id

Other improvements:
- If there is no control spot, all Locallab tools are now disabled
2018-12-26 10:31:57 +01:00
Pandagrapher
ce63383676 Add ability to manage partial copy/paste or profile with Locallab 2018-10-21 19:24:38 +02: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