CConvolutionProcessorComp.h
Go to the documentation of this file.
1 #ifndef iipr_CConvolutionProcessorComp_included
2 #define iipr_CConvolutionProcessorComp_included
3 
4 
5 // ACF includes
6 #include <iimg/CScanlineMask.h>
7 
8 // ACF-Solutions includes
11 
12 
13 namespace iipr
14 {
15 
16 
21 {
22 public:
24 
25  I_BEGIN_COMPONENT(CConvolutionProcessorComp);
26  I_ASSIGN(m_trySeparateKernelAttrPtr, "TrySeparateKernel", "If active, detection of kernel separation will be enabled", true, true);
27  I_ASSIGN(m_kernelParamsIdAttrPtr, "KernelParamsId", "ID of convolution kernel parameters in the parameter set (iipr::IConvolutionKernel2d)", false, "KernelParams");
28  I_ASSIGN(m_defaultKernelParamsCompPtr, "DefaultKernelParams", "Default convolution kernel parameters", false, "DefaultKernelParams");
29  I_END_COMPONENT;
30 
31  // static methods
42  static bool DoConvolutionFilter(
43  const IConvolutionKernel2d& kernel,
44  BackgroundFillMode backgroundMode,
45  iimg::IBitmap::PixelFormat outputPixelFormat,
46  const iimg::IBitmap& inputImage,
47  const iimg::CScanlineMask& resultMask,
48  iimg::IBitmap& outputImage,
49  istd::ILogger* loggerPtr = NULL);
50 
51 protected:
52  // reimplemented (iipr::CImageProcessorCompBase)
53  virtual bool ProcessImage(
54  const iprm::IParamsSet* paramsPtr,
55  const iimg::IBitmap& inputImage,
56  iimg::IBitmap& outputImage) const;
57 
58 private:
59  I_ATTR(bool, m_trySeparateKernelAttrPtr);
60  I_ATTR(QByteArray, m_kernelParamsIdAttrPtr);
61  I_REF(IConvolutionKernel2d, m_defaultKernelParamsCompPtr);
62 };
63 
64 
65 } // namespace iipr
66 
67 
68 #endif // !iipr_CConvolutionProcessorComp_included
69 
virtual bool ProcessImage(const iprm::IParamsSet *paramsPtr, const iimg::IBitmap &inputImage, iimg::IBitmap &outputImage) const
Interface for 2D-convolution filter kernel.
Basic implementation for a simple bitmap processor.
iipr::CImageProcessorCompBase BaseClass
Implementation of image processor using convolution kernel.
static bool DoConvolutionFilter(const IConvolutionKernel2d &kernel, BackgroundFillMode backgroundMode, iimg::IBitmap::PixelFormat outputPixelFormat, const iimg::IBitmap &inputImage, const iimg::CScanlineMask &resultMask, iimg::IBitmap &outputImage, istd::ILogger *loggerPtr=NULL)
Calculate complete convolution with all parameters as static function.
BackgroundFillMode
Describes modes for out-of-AOI background fill.

© 2007-2017 Witold Gantzke and Kirill Lepskiy