eLynx SDK
v3.3.0 C++ image processing API reference |
00001 //============================================================================ 00002 // ImageLocalProcessingImpl.h Image.Component package 00003 //============================================================================ 00004 // Usage : implementation of basic local to point image processing interface 00005 //---------------------------------------------------------------------------- 00006 // Copyright (C) 2006 by eLynx project 00007 // 00008 // This library is free software; you can redistribute it and/or 00009 // modify it under the terms of the GNU Library General Public 00010 // License as published by the Free Software Foundation; either 00011 // version 2 of the License, or (at your option) any later version. 00012 // 00013 // This library is distributed in the hope that it will be useful, 00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 // See the GNU Library General Public License for more details. 00017 //---------------------------------------------------------------------------- 00018 #ifndef __ImageLocalProcessingImpl_h__ 00019 #define __ImageLocalProcessingImpl_h__ 00020 00021 #include <elx/image/IImageLocalProcessing.h> 00022 00023 namespace eLynx { 00024 namespace Image { 00025 00029 00030 template <class Pixel> 00031 class ExportedByImage ImageLocalProcessingImpl : public IImageLocalProcessing 00032 { 00033 public: 00036 virtual bool Convolve(AbstractImage& ioImage, 00037 const Math::ConvolutionKerneld& iKernel, 00038 bool ibAbsolute, EBorderFill iBorder, uint32 iIteration, 00039 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00040 00041 virtual bool Convolve(AbstractImage& ioImage, 00042 const Math::ConvolutionKerneld& iKernel, 00043 double iThresholdMin, double iThresholdMax, 00044 bool ibAbsolute, EBorderFill iBorder, uint32 iIteration, 00045 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00046 00047 virtual bool Convolve(AbstractImage& ioImage, 00048 const Math::ConvolutionKerneld& iKernel1, 00049 const Math::ConvolutionKerneld& iKernel2, 00050 EBorderFill iBorder, uint32 iIteration, 00051 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00052 00053 virtual bool ApplyGaussian(AbstractImage& ioImage, 00054 double iRadius, 00055 EBorderFill iBorder, uint32 iIteration, 00056 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00057 00058 virtual bool ApplyGaussian(AbstractImage& ioImage, 00059 double iRadius, double iVariance, 00060 EBorderFill iBorder, uint32 iIteration, 00061 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00062 00063 virtual bool ApplyGaussian(AbstractImage& ioImage, 00064 uint32 iWidth, uint32 iHeight, double iVariance, 00065 EBorderFill iBorder, uint32 iIteration, 00066 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00067 00068 virtual bool ApplyBoxBlur(AbstractImage& ioImage, 00069 uint32 iWidth, uint32 iHeight, 00070 EBorderFill iBorder, uint32 iIteration, 00071 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00072 00073 virtual bool ApplySelectiveBlur(AbstractImage& ioImage, 00074 EBorderFill iBorder, uint32 iIteration, 00075 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00076 00077 virtual bool ApplyBilateral(AbstractImage& ioImage, 00078 double iRadius, double iSigmaSpatial, double iSigmaRange, 00079 EBorderFill iBorder, uint32 iIteration, 00080 uint32 iChannelMask, ProgressNotifier& iNotifier) const; 00082 00085 // ---- specialized 3x3 00086 static bool Convolve3x3(ImageImpl<Pixel>& ioImage, 00087 const Math::ConvolutionKerneld& iKernel, 00088 double iThresholdMin=0.0, double iThresholdMax=1.0, 00089 bool ibAbsolute=false, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, 00090 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00091 00092 // ---- specialized 5x5 00093 static bool Convolve5x5(ImageImpl<Pixel>& ioImage, 00094 const Math::ConvolutionKerneld& iKernel, 00095 double iThresholdMin=0.0, double iThresholdMax=1.0, 00096 bool ibAbsolute=false, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, 00097 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00098 00099 // ---- specialized WxH 00100 static bool ConvolveWxH(ImageImpl<Pixel>& ioImage, 00101 const Math::ConvolutionKerneld& iKernel, 00102 double iThresholdMin=0.0, double iThresholdMax=1.0, 00103 bool ibAbsolute=false, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, 00104 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00105 00106 // ---- optimized generic 00107 static bool Convolve(ImageImpl<Pixel>& ioImage, 00108 const Math::ConvolutionKerneld& iKernel, 00109 double iThresholdMin=0.0, double iThresholdMax=1.0, 00110 bool ibAbsolute=false, EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, 00111 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00112 00113 // ---- separables kernels 00114 static bool Convolve(ImageImpl<Pixel>& ioImage, 00115 const Math::ConvolutionKerneld& iKernel1, 00116 const Math::ConvolutionKerneld& iKernel2, 00117 EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, 00118 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00119 00120 static bool ApplyBoxBlur(ImageImpl<Pixel>& ioImage, 00121 uint32 iWidth, uint32 iHeight, 00122 EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, 00123 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00124 00125 static bool ApplySelectiveBlur(ImageImpl<Pixel>& ioImage, 00126 EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, 00127 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00128 00129 static bool ApplyGaussian(ImageImpl<Pixel>& ioImage, 00130 double iRadius=1.5, 00131 EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, 00132 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00133 00134 static bool ApplyGaussian(ImageImpl<Pixel>& ioImage, 00135 double iRadius, double iVariance, 00136 EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, 00137 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00138 00139 static bool ApplyGaussian(ImageImpl<Pixel>& ioImage, 00140 uint32 iWidth, uint32 iHeight, double iVariance, 00141 EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, 00142 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00143 00144 static bool ApplyBilateral(ImageImpl<Pixel>& ioImage, 00145 double iRadius=2.5, double iSigmaSpatial=1.0, double iSigmaRange=1.0, 00146 EBorderFill iBorder=BF_Nearest, uint32 iIteration=1, 00147 uint32 iChannelMask=CM_All, ProgressNotifier& iNotifier=ProgressNotifier_NULL); 00148 00150 }; 00151 00152 } // namespace Image 00153 } // namespace eLynx 00154 00155 #endif // __ImageLocalProcessingImpl_h__