00001 #ifndef __RThomasPeronaOp__ 00002 #define __RThomasPeronaOp__ 00003 00004 00029 #include <stdio.h> 00030 00031 #include "AbsRImageFilter.hpp" 00032 00033 #include "ThomasLS.hpp" 00034 00035 class RThomasPeronaOp : public AbsRImageFilter 00036 { 00037 protected: 00038 00039 // basic filter parameters 00040 00041 int w, h; 00042 00043 int iterMax; 00044 double tau; 00045 double K; 00046 00047 ThomasLS* hThomasLS; 00048 00049 ThomasLS* vThomasLS; 00050 00051 protected: 00052 00053 double gDirGrad(double gvalue); 00054 00055 double gX(RImage* src, int i, int j); 00056 double gY(RImage* src, int i, int j); 00057 00058 public: 00059 00060 RThomasPeronaOp(int iterations=8, double t=0.5, double sigma=16.0); 00061 virtual ~RThomasPeronaOp(){} 00062 00063 // single shot filtering 00064 virtual RImage* filter(RImage* src, RImage* dest=0); 00065 virtual RImage* selectedFilter(AnImage* mask, RImage* src, RImage* dest=0); 00066 00067 virtual void report(FILE* file){ fprintf(file,"Real Recursive 2d Blur Operator\n"); } 00068 }; 00069 00070 00071 #endif