00001 #ifndef __RTVInpainter_S2__ 00002 #define __RTVInpainter_S2__ 00003 00027 #include <stdio.h> 00028 00029 #include "RImage.hpp" 00030 #include "AbsRImageFilter.hpp" 00031 00032 #include "LimiterFactory.hpp" 00033 00034 class RTVInpainter_S2 : public AbsRImageFilter 00035 { 00036 private: 00037 00038 int niterations; 00039 double dt; 00040 00041 RImage* I0; 00042 RImage* I; 00043 00044 double lambda; 00045 00046 bool optimized; 00047 00048 00049 protected: 00050 00051 double operation(int x, int y); // simple Rudin/Osher/Fatemi model 00052 double fastOperation(int x, int y); // using marquina gradient multiplier optimisation 00053 00054 public: 00055 00056 RTVInpainter_S2(int iter=1500, double deltaT=0.2, double lambda=1.0, bool optimal=false); 00057 virtual ~RTVInpainter_S2(){} 00058 00059 00060 // single shot filtering 00061 virtual RImage* filter(RImage* src, RImage* dest=0){ return 0; } 00062 virtual RImage* selectedFilter(AnImage* mask, RImage* src, RImage* dest=0); 00063 00064 virtual void report(FILE* file){ fprintf(file,"TV Inpainter\n"); } 00065 }; 00066 00067 00068 #endif