31 Commits

Author SHA1 Message Date
Thanatomanic
d9799ec5de Fix dcp.cc with some help from the implementation in ART 2020-10-16 12:39:17 +02:00
Thanatomanic
8b4389ade9 Resolve exiv2 merge conflicts and merge with 2020-10-16 11:45:26 +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
Ingo Weyrich
67ca8e2c19 further aehistograms cleanup 2020-02-13 16:34:45 +01:00
Ingo Weyrich
d82ea3af02 reduce some include dependencies 2020-01-17 23:18:48 +01:00
Ingo Weyrich
6335b68a80 Further reduction of include dependencies 2019-11-03 14:52:42 +01:00
Flössie
add5c790d6 #pragma once for our headers plus drive-by formatting 2019-10-31 10:20:50 +01:00
Ingo Weyrich
068847eb5a Further cleanup of include dependencies 2019-10-29 21:06:27 +01:00
Flössie
28f0bc14da Merge branch 'dev' into metadata-exiv2
- Rating (#5325) not yet implemented
2019-09-24 14:30:54 +02:00
Morgan Hardwood
60b2196bce Updated gnu.org links to use HTTPS 2019-09-10 12:34:57 +02:00
rom9
41e5899f97 Moved film negative thumbnail processing to own compilation unit 2019-06-28 22:54:32 +02:00
Alberto Griggio
c360fd7e2c Use exiv2 for metadata handling 2019-05-06 09:27:44 +02:00
Flössie
0cbc4923bc Relax dependency from procparams.h 2019-02-28 20:44:50 +01:00
Thanatomanic
e58519f2dc Some pedantic fixes 2018-11-22 21:26:58 +01:00
heckflosse
f6c864d477 Get rid of aehistogram files in RT cache, fixes #4904 2018-10-31 15:02:53 +01:00
Alberto Griggio
95a5f3d662 fixed compilation that was broken by merging 'enhanced-inspector-mode' 2018-03-27 13:46:20 +02:00
heckflosse
00d6da7d89 further speedup for histogram matching 2018-02-01 18:44:25 +01:00
heckflosse
7848915e58 Small ~10% speedup for histogram matching on fast decoding raw files 2018-02-01 15:32:57 +01:00
Alberto Griggio
52957e9eab further experiments with histogram matching 2018-01-17 01:41:28 +01:00
heckflosse
e489fc7bea Make compilation unit rtengine/rtthumbnail.cc -Wextra clean, #4155 2017-10-22 14:01:07 +02:00
Hombre57
bb874bcce7 Bigfix (see #4008) :
- CIECam now gets the shot's setting of the selected frame
- 'UserComment' metadata now correctly handled
- RT prepared to handle XTrans multiframe
- SensorType now set in the cache/data files
2017-10-04 23:27:08 +02:00
Hombre57
0905294bda Merge branch 'dev' into multiframe-handling, with some merge bugfix 2017-09-17 01:15:51 +02:00
Alberto Griggio
c2960caab5 some (minor) code cleanup 2017-09-13 15:06:47 +02:00
Alberto Griggio
b4d3caf9c6 changed signature of ImProcFunctions::transform to take as input an ImageMetaData pointer 2017-09-06 00:15:41 +02:00
heckflosse
f9a536fd0b new gtk3 version of pixelshift 2017-03-11 22:30:36 +01:00
Alberto Griggio
dca0e41f35 added "Auto White Balance temperature bias" feature
This new slider in the White Balance tools allows to alter the computation of
the "auto white balance" by "biasing" it towards warmer or cooler
temperatures. The bias is expressed as a percentage of the computed
temperature, so that the resuling temperature is given by
"computedTemp + computedTemp * bias".
2017-02-12 17:39:52 +01:00
Hombre
d8593469ee Adding 'Image Number' to the Bayer Raw tool 2016-11-02 02:06:40 +01:00
heckflosse
172ab63b85 Cppcheck: Fixed another bunch of warnings 2016-10-13 01:34:02 +02:00
heckflosse
bf66671a6d Moved gamma lookup table from rtthumbnail.* to color.* 2016-02-25 15:45:42 +01:00
DrSlony
0e0cfb9b25 Formatted all .cc and .h code in rtengine, rtexif and rtgui using astyle 2015-08-11 11:55:03 +02:00
torger
d5ca351c20 Issue 2134: removed obsolete raw highlight preservation setting from GUI (still left in procparams for backwards compatilibility) 2015-07-10 12:00:36 +02:00