|
Wavelet and Image class library
1.3.2
|
00001 /* 00002 * class ImageDenoiser 00003 * 00004 * $Date$ 00005 * $Revision$ 00006 * 00007 */ 00008 00009 #ifndef IMAGE_DENOISER_HH__ 00010 #define IMAGE_DENOISER_HH__ 00011 00012 #include "Wave/PyramidTransform.hh" 00013 #include "WTools/PyramidTree.hh" 00014 00020 #define DENOISE_HL 0x01 00021 00022 #define DENOISE_LH 0x02 00023 00024 #define DENOISE_HH 0x04 00025 00026 #define SIGNIFICANT_COEFF 0 00027 #define SIGNIFICANT_REGION 1 00028 #define SIGNIFICANT_CHANNEL 2 00029 00030 #define REPLACE_SIMPLE 0 00031 #define REPLACE_CHANNEL 1 00032 00039 class ImageDenoiser 00040 { 00041 public: 00061 ImageDenoiser (Image &img, unsigned areas, int fromSub, int toSub = 1, 00062 double alpha = 1.0, FilterSet &filter = Daub4, 00063 int isSingleSignificant = 0, int replacementFunction = 0); 00064 00066 virtual ~ImageDenoiser (void); 00067 00071 virtual void denoise (void); 00072 00073 protected: 00074 00079 coeff threshold (int subband, area channel); 00080 00086 virtual void processFrom (PyramidTree &tree, coeff *thresholds, 00087 area channel, int level); 00088 00097 virtual bool isCoeffSingleSignificant (CoeffInformation &c, area channel, 00098 coeff threshold, bool &stop); 00107 virtual bool isSingleSignificantInRegion (CoeffInformation &c, area channel, 00108 coeff threshold, bool &stop); 00117 virtual bool isSingleSignificantInChannel (CoeffInformation &c, area channel, 00118 coeff threshold, bool &stop); 00126 virtual void replaceSimple (int y, int x, area channel, coeff threshold); 00136 virtual void replaceChannel (int y, int x, area channel, coeff threshold); 00137 00139 Image *m_image; 00141 PyramidTransform *m_transform; 00143 FilterSet *m_filter; 00145 int m_from; 00147 int m_to; 00150 unsigned m_areas; 00153 double m_alpha; 00155 int m_significanceFunction; 00157 int m_replacementFunction; 00158 00159 }; /* class ImageDenoiser */ 00160 00163 #endif /* IMAGE_DENOISER_HH__ */ 00164
1.7.6.1