CImageNormalizeProcessorComp.h
Go to the documentation of this file.
1 #ifndef iipr_CImageNormalizeProcessorComp_included
2 #define iipr_CImageNormalizeProcessorComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QString>
7 
8 // ACF includes
9 #include <i2d/CRectangle.h>
10 #include <iimg/CScanlineMask.h>
11 
12 // ACF-Solutions includes
14 #include <imeas/INumericValue.h>
16 
17 
18 namespace iipr
19 {
20 
21 
26 {
27 public:
29 
30  I_BEGIN_COMPONENT(CImageNormalizeProcessorComp);
31  I_ASSIGN(m_adjustParamsIdAttrPtr, "AdjustParamsId", "ID of parameters for contrast and brightness in parameter set", false, "AdjustParamsId");
32  I_ASSIGN(m_defaultAdjustParamsCompPtr, "DefaultAdjustParams", "Default adjust parameters, if no parameters are specified", false, "DefaultAdjustParams");
33  I_ASSIGN(m_clippingThresholdIdAttrPtr, "HistogramClipThresholdId", "ID of the histogram clipping threshold in parameter set, only histogram parts over this area will be processed", false, "HistogramClipThreshold");
34  I_ASSIGN(m_defaultClippingThresholdCompPtr, "DefaultHistogramClipThreshold", "Default parameter for clipping threshold, if no parameters are specified", false, "DefaultHistogramClipThreshold");
35  I_ASSIGN(m_useHistogramAdjustmentCompPtr, "UseHistogramAdjustment", "If enabled the histogram adjustment will be done before appling the other parameters", true, false);
36  I_END_COMPONENT;
37 
38  static bool DoAdjustFilter(
39  double contrast,
40  double brightness,
41  int backgroundMode,
42  iimg::IBitmap::PixelFormat outputPixelFormat,
43  const iimg::IBitmap& inputImage,
44  const iimg::CScanlineMask& resultMask,
45  iimg::IBitmap& outputImage,
46  istd::ILogger* loggerPtr = NULL);
47 
48 protected:
49  // reimplemented (iipr::CImageProcessorCompBase)
50  virtual bool ProcessImage(
51  const iprm::IParamsSet* paramsPtr,
52  const iimg::IBitmap& inputImage,
53  iimg::IBitmap& outputImage) const;
54 
55 private:
56  I_ATTR(QByteArray, m_adjustParamsIdAttrPtr);
57  I_REF(imeas::ILinearAdjustParams, m_defaultAdjustParamsCompPtr);
58  I_ATTR(QByteArray, m_clippingThresholdIdAttrPtr);
59  I_REF(imeas::INumericValue, m_defaultClippingThresholdCompPtr);
60  I_ATTR(bool, m_useHistogramAdjustmentCompPtr);
61 };
62 
63 
64 } // namespace iipr
65 
66 
67 #endif // !iipr_CImageNormalizeProcessorComp_included
68 
69 
Get parameter of linear adjust.
Implementation of contrast and brightness adjustment processor supporting dynamic correction based on...
Basic implementation for a simple bitmap processor.
static bool DoAdjustFilter(double contrast, double brightness, int backgroundMode, iimg::IBitmap::PixelFormat outputPixelFormat, const iimg::IBitmap &inputImage, const iimg::CScanlineMask &resultMask, iimg::IBitmap &outputImage, istd::ILogger *loggerPtr=NULL)
General parameter set containing list of numeric values.
Definition: INumericValue.h:20
virtual bool ProcessImage(const iprm::IParamsSet *paramsPtr, const iimg::IBitmap &inputImage, iimg::IBitmap &outputImage) const

© 2007-2017 Witold Gantzke and Kirill Lepskiy