00001 #ifndef __ColorShapiroFilter__ 00002 #define __ColorShapiroFilter__ 00003 00025 #include <stdio.h> 00026 00027 #include "AnImage.hpp" 00028 #include "RImage.hpp" 00029 00030 #include "ARColorImageFilter.hpp" 00031 00032 00033 class ColorShapiroFilter : public ARColorImageFilter 00034 { 00035 protected: 00036 00037 double tau; 00038 00039 int niterations; 00040 double alpha; 00041 00042 RImage* Nxy; // sqrt de (lambda+ - lambda-) 00043 00044 protected: 00045 00046 virtual double g(double indicator); 00047 00048 virtual void computeIndicator(Real3CImage& image); 00049 virtual void computeIndicator(AnImage& mask, Real3CImage& image); 00050 00051 virtual double operation(RImage& channel, int x, int y); 00052 00053 virtual void operations(Real3CImage& result, Real3CImage& image); 00054 virtual void operations(AnImage& mask, Real3CImage& result, Real3CImage& image); 00055 00056 public: 00057 00058 ColorShapiroFilter(int n=50, double ralpha=0.05, double atau=0.1); 00059 virtual ~ColorShapiroFilter(){} 00060 00061 00062 // single shot filtering 00063 virtual Real3CImage* filter(Real3CImage* src, Real3CImage* dest=0); 00064 virtual Real3CImage* selectedFilter(AnImage* mask, Real3CImage* src, Real3CImage* dest=0); 00065 00066 00067 00068 virtual void report(FILE* file){} 00069 }; 00070 00071 00072 #endif