KDcraw

rawdecodingsettings.cpp
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 #include "rawdecodingsettings.h"
10 
11 namespace KDcrawIface
12 {
13 
15 {
16  fixColorsHighlights = false;
17  autoBrightness = true;
18  sixteenBitsImage = false;
19  brightness = 1.0;
20  RAWQuality = BILINEAR;
21  inputColorSpace = NOINPUTCS;
22  outputColorSpace = SRGB;
23  RGBInterpolate4Colors = false;
24  DontStretchPixels = false;
25  unclipColors = 0;
26  whiteBalance = CAMERA;
27  customWhiteBalance = 6500;
28  customWhiteBalanceGreen = 1.0;
30 
31  halfSizeColorImage = false;
32 
33  enableBlackPoint = false;
34  blackPoint = 0;
35 
36  enableWhitePoint = false;
37  whitePoint = 0;
38 
39  NRType = NONR;
40  NRThreshold = 0;
41 
42  enableCACorrection = false;
43  caMultiplier[0] = 0.0;
44  caMultiplier[1] = 0.0;
45 
48 
50 
52 
53  //-- Extended demosaicing settings ----------------------------------------------------------
54 
55  dcbIterations = -1;
56  dcbEnhanceFl = false;
57  eeciRefine = false;
58  esMedPasses = 0;
59  NRChroThreshold = 0;
60  expoCorrection = false;
61  expoCorrectionShift = 1.0;
63 }
64 
66 {
67 }
68 
70 {
83  customWhiteBalanceGreen = o.customWhiteBalanceGreen;
89  NRType = o.NRType;
92  caMultiplier[0] = o.caMultiplier[0];
93  caMultiplier[1] = o.caMultiplier[1];
99 
100  //-- Extended demosaicing settings ----------------------------------------------------------
101 
110 
111  return *this;
112 }
113 
115 {
119  && brightness == o.brightness
120  && RAWQuality == o.RAWQuality
125  && unclipColors == o.unclipColors
126  && whiteBalance == o.whiteBalance
128  && customWhiteBalanceGreen == o.customWhiteBalanceGreen
131  && blackPoint == o.blackPoint
133  && whitePoint == o.whitePoint
134  && NRType == o.NRType
135  && NRThreshold == o.NRThreshold
137  && caMultiplier[0] == o.caMultiplier[0]
138  && caMultiplier[1] == o.caMultiplier[1]
140  && inputProfile == o.inputProfile
142  && deadPixelMap == o.deadPixelMap
144 
145  //-- Extended demosaicing settings ----------------------------------------------------------
146 
148  && dcbEnhanceFl == o.dcbEnhanceFl
149  && eeciRefine == o.eeciRefine
150  && esMedPasses == o.esMedPasses
155  ;
156 }
157 
159 {
160  fixColorsHighlights = false;
161  autoBrightness = true;
162  sixteenBitsImage = true;
163  brightness = 1.0;
164  RAWQuality = BILINEAR;
165  inputColorSpace = NOINPUTCS;
166  outputColorSpace = SRGB;
167  RGBInterpolate4Colors = false;
168  DontStretchPixels = false;
169  unclipColors = 0;
170  whiteBalance = CAMERA;
171  customWhiteBalance = 6500;
172  customWhiteBalanceGreen = 1.0;
173  halfSizeColorImage = true;
174  medianFilterPasses = 0;
175 
176  enableBlackPoint = false;
177  blackPoint = 0;
178 
179  enableWhitePoint = false;
180  whitePoint = 0;
181 
182  NRType = NONR;
183  NRThreshold = 0;
184 
185  enableCACorrection = false;
186  caMultiplier[0] = 0.0;
187  caMultiplier[1] = 0.0;
188 
189  inputProfile = QString();
191 
192  deadPixelMap = QString();
193 
195 
196  //-- Extended demosaicing settings ----------------------------------------------------------
197 
198  dcbIterations = -1;
199  dcbEnhanceFl = false;
200  eeciRefine = false;
201  esMedPasses = 0;
202  NRChroThreshold = 0;
203  expoCorrection = false;
204  expoCorrectionShift = 1.0;
206 }
207 
209 {
210  dbg.nospace() << '\n';
211  dbg.nospace() << "-- RAW DECODING SETTINGS --------------------------------" << '\n';
212  dbg.nospace() << "-- autoBrightness: " << s.autoBrightness << '\n';
213  dbg.nospace() << "-- sixteenBitsImage: " << s.sixteenBitsImage << '\n';
214  dbg.nospace() << "-- brightness: " << s.brightness << '\n';
215  dbg.nospace() << "-- RAWQuality: " << s.RAWQuality << '\n';
216  dbg.nospace() << "-- inputColorSpace: " << s.inputColorSpace << '\n';
217  dbg.nospace() << "-- outputColorSpace: " << s.outputColorSpace << '\n';
218  dbg.nospace() << "-- RGBInterpolate4Colors: " << s.RGBInterpolate4Colors << '\n';
219  dbg.nospace() << "-- DontStretchPixels: " << s.DontStretchPixels << '\n';
220  dbg.nospace() << "-- unclipColors: " << s.unclipColors << '\n';
221  dbg.nospace() << "-- whiteBalance: " << s.whiteBalance << '\n';
222  dbg.nospace() << "-- customWhiteBalance: " << s.customWhiteBalance << '\n';
223  dbg.nospace() << "-- customWhiteBalanceGreen: " << s.customWhiteBalanceGreen << '\n';
224  dbg.nospace() << "-- halfSizeColorImage: " << s.halfSizeColorImage << '\n';
225  dbg.nospace() << "-- enableBlackPoint: " << s.enableBlackPoint << '\n';
226  dbg.nospace() << "-- blackPoint: " << s.blackPoint << '\n';
227  dbg.nospace() << "-- enableWhitePoint: " << s.enableWhitePoint << '\n';
228  dbg.nospace() << "-- whitePoint: " << s.whitePoint << '\n';
229  dbg.nospace() << "-- NoiseReductionType: " << s.NRType << '\n';
230  dbg.nospace() << "-- NoiseReductionThreshold: " << s.NRThreshold << '\n';
231  dbg.nospace() << "-- enableCACorrection: " << s.enableCACorrection << '\n';
232  dbg.nospace() << "-- caMultiplier: " << s.caMultiplier[0]
233  << ", " << s.caMultiplier[1] << '\n';
234  dbg.nospace() << "-- medianFilterPasses: " << s.medianFilterPasses << '\n';
235  dbg.nospace() << "-- inputProfile: " << s.inputProfile << '\n';
236  dbg.nospace() << "-- outputProfile: " << s.outputProfile << '\n';
237  dbg.nospace() << "-- deadPixelMap: " << s.deadPixelMap << '\n';
238  dbg.nospace() << "-- whiteBalanceArea: " << s.whiteBalanceArea << '\n';
239 
240  //-- Extended demosaicing settings ----------------------------------------------------------
241 
242  dbg.nospace() << "-- dcbIterations: " << s.dcbIterations << '\n';
243  dbg.nospace() << "-- dcbEnhanceFl: " << s.dcbEnhanceFl << '\n';
244  dbg.nospace() << "-- eeciRefine: " << s.eeciRefine << '\n';
245  dbg.nospace() << "-- esMedPasses: " << s.esMedPasses << '\n';
246  dbg.nospace() << "-- NRChrominanceThreshold: " << s.NRChroThreshold << '\n';
247  dbg.nospace() << "-- expoCorrection: " << s.expoCorrection << '\n';
248  dbg.nospace() << "-- expoCorrectionShift: " << s.expoCorrectionShift << '\n';
249  dbg.nospace() << "-- expoCorrectionHighlight: " << s.expoCorrectionHighlight << '\n';
250  dbg.nospace() << "---------------------------------------------------------" << '\n';
251 
252  return dbg.space();
253 }
254 
255 } // namespace KDcrawIface
int customWhiteBalance
The temperature and the green multiplier of the custom white balance.
int whitePoint
White Point value of output image.
int NRChroThreshold
For IMPULSENR Noise reduction.
double caMultiplier[2]
Magnification factor for Red and Blue layers.
bool enableBlackPoint
Turn on the black point setting to decode RAW image.
QDebug & nospace()
bool expoCorrection
Turn on the Exposure Correction before interpolation.
QDebug & space()
QRect whiteBalanceArea
Rectangle used to calculate the white balance by averaging the region of image.
bool DontStretchPixels
For cameras with non-square pixels, do not stretch the image to its correct aspect ratio.
bool enableWhitePoint
Turn on the white 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...
InputColorSpace inputColorSpace
The input color profile used to decoded RAW data.
NoiseReduction NRType
Noise reduction method to apply before demosaicing.
int dcbIterations
For DCB interpolation.
RawDecodingSettings & operator=(const RawDecodingSettings &prm)
Equivalent to the copy constructor.
bool fixColorsHighlights
If true, images with overblown channels are processed much more accurate, without 'pink clouds' (and ...
int unclipColors
Unclip Highlight color level: 0 = Clip all highlights to solid white.
QDebug operator<<(QDebug dbg, const DcrawInfoContainer &c)
qDebug() stream operator. Writes container c to the debug output in a nicely formatted way.
bool halfSizeColorImage
Half-size color image decoding (twice as fast as "enableRAWQuality").
Settings for raw decoding.
bool RGBInterpolate4Colors
Turn on RAW file decoding using RGB interpolation as four colors.
bool autoBrightness
If false, use a fixed white level, ignoring the image histogram.
RawDecodingSettings()
Standard constructor with default settings.
double brightness
Brightness of output image.
double expoCorrectionShift
Shift of Exposure Correction before interpolation in linear scale.
QString inputProfile
Path to custom input ICC profile to define the camera's raw colorspace.
DecodingQuality RAWQuality
RAW quality decoding factor value.
WhiteBalance whiteBalance
White balance type to use.
Main namespace of libKDcraw.
bool eeciRefine
For VCD_AHD interpolation.
QString outputProfile
Path to custom output ICC profile to define the color workspace.
bool operator==(const RawDecodingSettings &o) const
Compare for equality.
bool enableCACorrection
Turn on chromatic aberrations correction.
virtual ~RawDecodingSettings()
Standard destructor.
double expoCorrectionHighlight
Amount of highlight preservation for exposure correction before interpolation in E....
OutputColorSpace outputColorSpace
The output color profile used to decoded RAW data.
QString deadPixelMap
Path to text file including dead pixel list.
bool dcbEnhanceFl
Turn on the DCB interpolation with enhance interpolated colors.
int NRThreshold
Noise reduction threshold value.
int esMedPasses
Use edge-sensitive median filtering for artifact suppression after VCD demosaicing.
int blackPoint
Black Point value of output image.
bool sixteenBitsImage
Turn on RAW file decoding in 16 bits per color per pixel instead 8 bits.
void optimizeTimeLoading()
Method to use a settings to optimize time loading, for example to compute image histogram.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Wed Aug 17 2022 04:06:47 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.