KDcraw

rawdecodingsettings.h
1 /*
2  SPDX-FileCopyrightText: 2006-2015 Gilles Caulier <caulier dot gilles at gmail dot com>
3  SPDX-FileCopyrightText: 2006-2013 Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
4  SPDX-FileCopyrightText: 2007-2008 Guillaume Castagnino <casta at xwing dot info>
5 
6  SPDX-License-Identifier: GPL-2.0-or-later
7 */
8 
9 #ifndef RAW_DECODING_SETTINGS_H
10 #define RAW_DECODING_SETTINGS_H
11 
12 // Qt includes
13 
14 #include <QRect>
15 #include <QString>
16 #include <QDebug>
17 
18 // Local includes
19 
20 #include "libkdcraw_export.h"
21 
22 namespace KDcrawIface
23 {
24 
25 /** Settings for raw decoding
26  */
27 class LIBKDCRAW_EXPORT RawDecodingSettings
28 {
29 
30 public:
31 
32  /** RAW decoding Interpolation methods
33  *
34  * Bilinear: use high-speed but low-quality bilinear
35  * interpolation (default - for slow computer). In this method,
36  * the red value of a non-red pixel is computed as the average of
37  * the adjacent red pixels, and similar for blue and green.
38  * VNG: use Variable Number of Gradients interpolation.
39  * This method computes gradients near the pixel of interest and uses
40  * the lower gradients (representing smoother and more similar parts
41  * of the image) to make an estimate.
42  * PPG: use Patterned Pixel Grouping interpolation.
43  * Pixel Grouping uses assumptions about natural scenery in making estimates.
44  * It has fewer color artifacts on natural images than the Variable Number of
45  * Gradients method.
46  * AHD: use Adaptive Homogeneity-Directed interpolation.
47  * This method selects the direction of interpolation so as to
48  * maximize a homogeneity metric, thus typically minimizing color artifacts.
49  * DCB: DCB interpolation (see http://www.linuxphoto.org/html/dcb.html for details)
50  *
51  * NOTE: from GPL2/GPL3 demosaic packs - will not work with libraw>=0.19
52  *
53  * PL_AHD: modified AHD interpolation (see https://sites.google.com/site/demosaicalgorithms/modified-dcraw
54  * for details).
55  * AFD: demosaicing through 5 pass median filter from PerfectRaw project.
56  * VCD: VCD interpolation.
57  * VCD_AHD: mixed demosaicing between VCD and AHD.
58  * LMMSE: LMMSE interpolation from PerfectRaw.
59  * AMAZE: AMaZE interpolation and color aberration removal from RawTherapee project.
60  *
61  * NOTE: for libraw>=0.19 only
62  *
63  * DHT: DHT interpolation.
64  * AAHD: Enhanced Adaptive AHD interpolation.
65  */
67  {
68  BILINEAR = 0,
69  VNG = 1,
70  PPG = 2,
71  AHD = 3,
72  DCB = 4,
73  PL_AHD = 5,
74  AFD = 6,
75  VCD = 7,
76  VCD_AHD = 8,
77  LMMSE = 9,
78  AMAZE = 10,
79  DHT = 11,
80  AAHD = 12
81  };
82 
83  /** White balances alternatives
84  * NONE: no white balance used : reverts to standard daylight D65 WB.
85  * CAMERA: Use the camera embedded WB if available. Reverts to NONE if not.
86  * AUTO: Averages an auto WB on the entire image.
87  * CUSTOM: Let use set its own temperature and green factor (later converted to RGBG factors).
88  * AERA: Let use an area from image to average white balance (see whiteBalanceArea for details).
89  */
91  {
92  NONE = 0,
93  CAMERA = 1,
94  AUTO = 2,
95  CUSTOM = 3,
96  AERA = 4
97  };
98 
99  /** Noise Reduction method to apply before demosaicing
100  * NONR: No noise reduction.
101  * WAVELETSNR: wavelets correction to erase noise while preserving real detail. It's applied after interpolation.
102  * FBDDNR: Fake Before Demosaicing Denoising noise reduction. It's applied before interpolation.
103  * LINENR: CFA Line Denoise. It's applied after interpolation.
104  * IMPULSENR: Impulse Denoise. It's applied after interpolation.
105  */
107  {
108  NONR = 0,
109  WAVELETSNR,
110  FBDDNR,
111  LINENR,
112  IMPULSENR
113  };
114 
115  /** Input color profile used to decoded image
116  * NOINPUTCS: No input color profile.
117  * EMBEDDED: Use the camera profile embedded in RAW file if exist.
118  * CUSTOMINPUTCS: Use a custom input color space profile.
119  */
121  {
122  NOINPUTCS = 0,
123  EMBEDDED,
124  CUSTOMINPUTCS
125  };
126 
127  /** Output RGB color space used to decoded image
128  * RAWCOLOR: No output color profile (Linear RAW).
129  * SRGB: Use standard sRGB color space.
130  * ADOBERGB: Use standard Adobe RGB color space.
131  * WIDEGAMMUT: Use standard RGB Wide Gamut color space.
132  * PROPHOTO: Use standard RGB Pro Photo color space.
133  * CUSTOMOUTPUTCS: Use a custom workspace color profile.
134  */
136  {
137  RAWCOLOR = 0,
138  SRGB,
139  ADOBERGB,
140  WIDEGAMMUT,
141  PROPHOTO,
142  CUSTOMOUTPUTCS
143  };
144 
145  /** Standard constructor with default settings
146  */
148 
149  /** Equivalent to the copy constructor
150  */
151  RawDecodingSettings& operator=(const RawDecodingSettings& prm);
152 
153  /** Compare for equality
154  */
155  bool operator==(const RawDecodingSettings& o) const;
156 
157  /** Standard destructor
158  */
159  virtual ~RawDecodingSettings();
160 
161  /** Method to use a settings to optimize time loading, for example to compute image histogram
162  */
163  void optimizeTimeLoading();
164 
165 public:
166 
167  /** If true, images with overblown channels are processed much more accurate,
168  * without 'pink clouds' (and blue highlights under tungsten lamps).
169  */
171 
172  /** If false, use a fixed white level, ignoring the image histogram.
173  */
175 
176  /** Turn on RAW file decoding in 16 bits per color per pixel instead 8 bits.
177  */
179 
180  /** Half-size color image decoding (twice as fast as "enableRAWQuality").
181  * Turn on this option to reduce time loading to render histogram for example,
182  * no to render an image to screen.
183  */
185 
186  /** White balance type to use. See WhiteBalance values for detail
187  */
189 
190  /** The temperature and the green multiplier of the custom white balance
191  */
193  double customWhiteBalanceGreen;
194 
195  /** Turn on RAW file decoding using RGB interpolation as four colors.
196  */
198 
199  /** For cameras with non-square pixels, do not stretch the image to its
200  * correct aspect ratio. In any case, this option guarantees that each
201  * output pixel corresponds to one RAW pixel.
202  */
204 
205  /** Unclip Highlight color level:
206  * 0 = Clip all highlights to solid white.
207  * 1 = Leave highlights unclipped in various shades of pink.
208  * 2 = Blend clipped and unclipped values together for a gradual
209  * fade to white.
210  * 3-9 = Reconstruct highlights. Low numbers favor whites; high numbers
211  * favor colors.
212  */
214 
215  /** RAW quality decoding factor value. See DecodingQuality values
216  * for details.
217  */
219 
220  /** After interpolation, clean up color artifacts by repeatedly applying
221  * a 3x3 median filter to the R-G and B-G channels.
222  */
224 
225  /** Noise reduction method to apply before demosaicing.
226  */
228 
229  /** Noise reduction threshold value. Null value disable NR. Range is between 100 and 1000.
230  * For IMPULSENR : set the amount of Luminance impulse denoise.
231  */
233 
234  /** Turn on chromatic aberrations correction
235  * @deprecated does not work with libraw>=0.19
236  */
238 
239  /** Magnification factor for Red and Blue layers
240  * - caMultiplier[0] = amount of correction on red-green axis.
241  * - caMultiplier[1] = amount of correction on blue-yellow axis.
242  * - Both values set to 0.0 = automatic CA correction.
243  * @deprecated does not work with libraw>=0.19
244  */
245  double caMultiplier[2];
246 
247  /** Brightness of output image.
248  */
249  double brightness;
250 
251  /** Turn on the black point setting to decode RAW image.
252  */
254 
255  /** Black Point value of output image.
256  */
258 
259  /** Turn on the white point setting to decode RAW image.
260  */
262 
263  /** White Point value of output image.
264  */
266 
267  /** The input color profile used to decoded RAW data. See OutputColorProfile
268  * values for details.
269  */
271 
272  /** Path to custom input ICC profile to define the camera's raw colorspace.
273  */
275 
276  /** The output color profile used to decoded RAW data. See OutputColorProfile
277  * values for details.
278  */
280 
281  /** Path to custom output ICC profile to define the color workspace.
282  */
284 
285  /** Path to text file including dead pixel list.
286  */
288 
289  /** Rectangle used to calculate the white balance by averaging the region of image.
290  */
292 
293  //-- Extended demosaicing settings ----------------------------------------------------------
294 
295  /// For DCB interpolation.
296 
297  /** Number of DCB median filtering correction passes.
298  * -1 : disable (default)
299  * 1-10 : DCB correction passes
300  */
302 
303  /** Turn on the DCB interpolation with enhance interpolated colors.
304  */
306 
307  /// For VCD_AHD interpolation.
308 
309  /** Turn on the EECI refine for VCD Demosaicing.
310  * @deprecated does not work with libraw>=0.19
311  */
313 
314  /** Use edge-sensitive median filtering for artifact suppression after VCD demosaicing.
315  * 0 : disable (default)
316  * 1-10 : median filter passes.
317  * @deprecated does not work with libraw>=0.19
318  */
320 
321  /** For IMPULSENR Noise reduction. Set the amount of Chrominance impulse denoise.
322  * Null value disable NR. Range is between 100 and 1000.
323  * @deprecated does not work with libraw>=0.19
324  */
326 
327  /** Turn on the Exposure Correction before interpolation.
328  */
330 
331  /** Shift of Exposure Correction before interpolation in linear scale.
332  * Usable range is from 0.25 (darken image 1 stop : -2EV) to 8.0 (lighten ~1.5 photographic stops : +3EV).
333  */
335 
336  /** Amount of highlight preservation for exposure correction before interpolation in E.V.
337  * Usable range is from 0.0 (linear exposure shift, highlights may blow) to 1.0 (maximum highlights preservation)
338  * This settings can only take effect if expoCorrectionShift > 1.0.
339  */
341 };
342 
343 //! qDebug() stream operator. Writes settings @a s to the debug output in a nicely formatted way.
344 LIBKDCRAW_EXPORT QDebug operator<<(QDebug dbg, const RawDecodingSettings& s);
345 
346 } // namespace KDcrawIface
347 
348 #endif /* RAW_DECODING_SETTINGS_H */
WhiteBalance whiteBalance
White balance type to use.
int unclipColors
Unclip Highlight color level: 0 = Clip all highlights to solid white.
bool halfSizeColorImage
Half-size color image decoding (twice as fast as "enableRAWQuality").
double brightness
Brightness of output image.
int dcbIterations
For DCB interpolation.
bool eeciRefine
For VCD_AHD interpolation.
bool RGBInterpolate4Colors
Turn on RAW file decoding using RGB interpolation as four colors.
QString deadPixelMap
Path to text file including dead pixel list.
QString inputProfile
Path to custom input ICC profile to define the camera&#39;s raw colorspace.
DecodingQuality RAWQuality
RAW quality decoding factor value.
double expoCorrectionHighlight
Amount of highlight preservation for exposure correction before interpolation in E.V.
int esMedPasses
Use edge-sensitive median filtering for artifact suppression after VCD demosaicing.
QString outputProfile
Path to custom output ICC profile to define the color workspace.
bool sixteenBitsImage
Turn on RAW file decoding in 16 bits per color per pixel instead 8 bits.
OutputColorSpace outputColorSpace
The output color profile used to decoded RAW data.
bool dcbEnhanceFl
Turn on the DCB interpolation with enhance interpolated colors.
int NRThreshold
Noise reduction threshold value.
InputColorSpace
Input color profile used to decoded image NOINPUTCS: No input color profile.
bool enableCACorrection
Turn on chromatic aberrations correction.
WhiteBalance
White balances alternatives NONE: no white balance used : reverts to standard daylight D65 WB...
DecodingQuality
RAW decoding Interpolation methods.
QDebug operator<<(QDebug dbg, const DcrawInfoContainer &c)
qDebug() stream operator. Writes container c to the debug output in a nicely formatted way...
int whitePoint
White Point value of output image.
int blackPoint
Black Point value of output image.
OutputColorSpace
Output RGB color space used to decoded image RAWCOLOR: No output color profile (Linear RAW)...
int customWhiteBalance
The temperature and the green multiplier of the custom white balance.
int NRChroThreshold
For IMPULSENR Noise reduction.
bool enableBlackPoint
Turn on the black point setting to decode RAW image.
bool expoCorrection
Turn on the Exposure Correction before interpolation.
QRect whiteBalanceArea
Rectangle used to calculate the white balance by averaging the region of image.
Main namespace of libKDcraw.
InputColorSpace inputColorSpace
The input color profile used to decoded RAW data.
Settings for raw decoding.
NoiseReduction
Noise Reduction method to apply before demosaicing NONR: No noise reduction.
bool enableWhitePoint
Turn on the white point setting to decode RAW image.
bool DontStretchPixels
For cameras with non-square pixels, do not stretch the image to its correct aspect ratio...
NoiseReduction NRType
Noise reduction method to apply before demosaicing.
double expoCorrectionShift
Shift of Exposure Correction before interpolation in linear scale.
int medianFilterPasses
After interpolation, clean up color artifacts by repeatedly applying a 3x3 median filter to the R-G a...
bool fixColorsHighlights
If true, images with overblown channels are processed much more accurate, without &#39;pink clouds&#39; (and ...
bool autoBrightness
If false, use a fixed white level, ignoring the image histogram.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 16 2021 22:36:10 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.