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
22namespace KDcrawIface
23{
24
25/** Settings for raw decoding
26 */
27class LIBKDCRAW_EXPORT RawDecodingSettings
28{
29
30public:
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
150 /** Equivalent to the copy constructor
151 */
153
154 /** Compare for equality
155 */
156 bool operator==(const RawDecodingSettings& o) const;
157
158 /** Standard destructor
159 */
160 virtual ~RawDecodingSettings();
161
162 /** Method to use a settings to optimize time loading, for example to compute image histogram
163 */
164 void optimizeTimeLoading();
165
166public:
167
168 /** If true, images with overblown channels are processed much more accurate,
169 * without 'pink clouds' (and blue highlights under tungsten lamps).
170 */
172
173 /** If false, use a fixed white level, ignoring the image histogram.
174 */
176
177 /** Turn on RAW file decoding in 16 bits per color per pixel instead 8 bits.
178 */
180
181 /** Half-size color image decoding (twice as fast as "enableRAWQuality").
182 * Turn on this option to reduce time loading to render histogram for example,
183 * no to render an image to screen.
184 */
186
187 /** White balance type to use. See WhiteBalance values for detail
188 */
190
191 /** The temperature and the green multiplier of the custom white balance
192 */
194 double customWhiteBalanceGreen;
195
196 /** Turn on RAW file decoding using RGB interpolation as four colors.
197 */
199
200 /** For cameras with non-square pixels, do not stretch the image to its
201 * correct aspect ratio. In any case, this option guarantees that each
202 * output pixel corresponds to one RAW pixel.
203 */
205
206 /** Unclip Highlight color level:
207 * 0 = Clip all highlights to solid white.
208 * 1 = Leave highlights unclipped in various shades of pink.
209 * 2 = Blend clipped and unclipped values together for a gradual
210 * fade to white.
211 * 3-9 = Reconstruct highlights. Low numbers favor whites; high numbers
212 * favor colors.
213 */
215
216 /** RAW quality decoding factor value. See DecodingQuality values
217 * for details.
218 */
220
221 /** After interpolation, clean up color artifacts by repeatedly applying
222 * a 3x3 median filter to the R-G and B-G channels.
223 */
225
226 /** Noise reduction method to apply before demosaicing.
227 */
229
230 /** Noise reduction threshold value. Null value disable NR. Range is between 100 and 1000.
231 * For IMPULSENR : set the amount of Luminance impulse denoise.
232 */
234
235 /** Turn on chromatic aberrations correction
236 * @deprecated does not work with libraw>=0.19
237 */
239
240 /** Magnification factor for Red and Blue layers
241 * - caMultiplier[0] = amount of correction on red-green axis.
242 * - caMultiplier[1] = amount of correction on blue-yellow axis.
243 * - Both values set to 0.0 = automatic CA correction.
244 * @deprecated does not work with libraw>=0.19
245 */
246 double caMultiplier[2];
247
248 /** Brightness of output image.
249 */
251
252 /** Turn on the black point setting to decode RAW image.
253 */
255
256 /** Black Point value of output image.
257 */
259
260 /** Turn on the white point setting to decode RAW image.
261 */
263
264 /** White Point value of output image.
265 */
267
268 /** The input color profile used to decoded RAW data. See OutputColorProfile
269 * values for details.
270 */
272
273 /** Path to custom input ICC profile to define the camera's raw colorspace.
274 */
276
277 /** The output color profile used to decoded RAW data. See OutputColorProfile
278 * values for details.
279 */
281
282 /** Path to custom output ICC profile to define the color workspace.
283 */
285
286 /** Path to text file including dead pixel list.
287 */
289
290 /** Rectangle used to calculate the white balance by averaging the region of image.
291 */
293
294 //-- Extended demosaicing settings ----------------------------------------------------------
295
296 /// For DCB interpolation.
297
298 /** Number of DCB median filtering correction passes.
299 * -1 : disable (default)
300 * 1-10 : DCB correction passes
301 */
303
304 /** Turn on the DCB interpolation with enhance interpolated colors.
305 */
307
308 /// For VCD_AHD interpolation.
309
310 /** Turn on the EECI refine for VCD Demosaicing.
311 * @deprecated does not work with libraw>=0.19
312 */
314
315 /** Use edge-sensitive median filtering for artifact suppression after VCD demosaicing.
316 * 0 : disable (default)
317 * 1-10 : median filter passes.
318 * @deprecated does not work with libraw>=0.19
319 */
321
322 /** For IMPULSENR Noise reduction. Set the amount of Chrominance impulse denoise.
323 * Null value disable NR. Range is between 100 and 1000.
324 * @deprecated does not work with libraw>=0.19
325 */
327
328 /** Turn on the Exposure Correction before interpolation.
329 */
331
332 /** Shift of Exposure Correction before interpolation in linear scale.
333 * Usable range is from 0.25 (darken image 1 stop : -2EV) to 8.0 (lighten ~1.5 photographic stops : +3EV).
334 */
336
337 /** Amount of highlight preservation for exposure correction before interpolation in E.V.
338 * Usable range is from 0.0 (linear exposure shift, highlights may blow) to 1.0 (maximum highlights preservation)
339 * This settings can only take effect if expoCorrectionShift > 1.0.
340 */
342};
343
344//! qDebug() stream operator. Writes settings @a s to the debug output in a nicely formatted way.
345LIBKDCRAW_EXPORT QDebug operator<<(QDebug dbg, const RawDecodingSettings& s);
346
347} // namespace KDcrawIface
348
349#endif /* RAW_DECODING_SETTINGS_H */
bool eeciRefine
For VCD_AHD interpolation.
WhiteBalance
White balances alternatives NONE: no white balance used : reverts to standard daylight D65 WB.
double expoCorrectionShift
Shift of Exposure Correction before interpolation in linear scale.
double brightness
Brightness of output image.
bool autoBrightness
If false, use a fixed white level, ignoring the image histogram.
InputColorSpace inputColorSpace
The input color profile used to decoded RAW data.
int esMedPasses
Use edge-sensitive median filtering for artifact suppression after VCD demosaicing.
OutputColorSpace outputColorSpace
The output color profile used to decoded RAW data.
NoiseReduction NRType
Noise reduction method to apply before demosaicing.
int NRThreshold
Noise reduction threshold value.
bool enableBlackPoint
Turn on the black point setting to decode RAW image.
int medianFilterPasses
After interpolation, clean up color artifacts by repeatedly applying a 3x3 median filter to the R-G a...
bool halfSizeColorImage
Half-size color image decoding (twice as fast as "enableRAWQuality").
InputColorSpace
Input color profile used to decoded image NOINPUTCS: No input color profile.
int NRChroThreshold
For IMPULSENR Noise reduction.
bool enableWhitePoint
Turn on the white point setting to decode RAW image.
bool expoCorrection
Turn on the Exposure Correction before interpolation.
RawDecodingSettings & operator=(const RawDecodingSettings &prm)
Equivalent to the copy constructor.
bool DontStretchPixels
For cameras with non-square pixels, do not stretch the image to its correct aspect ratio.
int blackPoint
Black Point value of output image.
QString outputProfile
Path to custom output ICC profile to define the color workspace.
QString deadPixelMap
Path to text file including dead pixel list.
bool sixteenBitsImage
Turn on RAW file decoding in 16 bits per color per pixel instead 8 bits.
QString inputProfile
Path to custom input ICC profile to define the camera's raw colorspace.
QRect whiteBalanceArea
Rectangle used to calculate the white balance by averaging the region of image.
NoiseReduction
Noise Reduction method to apply before demosaicing NONR: No noise reduction.
bool enableCACorrection
Turn on chromatic aberrations correction.
bool RGBInterpolate4Colors
Turn on RAW file decoding using RGB interpolation as four colors.
double expoCorrectionHighlight
Amount of highlight preservation for exposure correction before interpolation in E....
DecodingQuality RAWQuality
RAW quality decoding factor value.
bool dcbEnhanceFl
Turn on the DCB interpolation with enhance interpolated colors.
bool fixColorsHighlights
If true, images with overblown channels are processed much more accurate, without 'pink clouds' (and ...
WhiteBalance whiteBalance
White balance type to use.
int customWhiteBalance
The temperature and the green multiplier of the custom white balance.
int dcbIterations
For DCB interpolation.
int unclipColors
Unclip Highlight color level: 0 = Clip all highlights to solid white.
DecodingQuality
RAW decoding Interpolation methods.
OutputColorSpace
Output RGB color space used to decoded image RAWCOLOR: No output color profile (Linear RAW).
int whitePoint
White Point value of output image.
Main namespace of libKDcraw.
QDebug operator<<(QDebug dbg, const DcrawInfoContainer &c)
qDebug() stream operator. Writes container c to the debug output in a nicely formatted way.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 24 2024 11:56:21 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.