Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

WeickertFilter.hpp

00001 #ifndef __WeickertFilter__
00002 #define __WeickertFilter__
00003 
00004 
00005 
00024 #include <stdio.h>
00025 
00026 #include "AnImage.hpp"
00027 #include "AbsRImageFilter.hpp"
00028 
00029 #include "BeltramiFlow.hpp"
00030 
00031 class WeickertFilter : public AbsRImageFilter
00032 {
00033 protected:
00034 
00035 RImage*                 I0;                             // origin image
00036 RImage*                 I;                              // current image
00037 
00038 double                  lambda;                 // used for linear constrains around the origin
00039 
00040 int                             niterations;
00041 double                  alpha;
00042 
00043 RImage*                 ux;
00044 RImage*                 uy;
00045 
00046 RImage*                 j1;
00047 RImage*                 j2;
00048 
00049 double                  m;
00050 double                  Cm;
00051 
00052 protected:
00053 
00054 void    precompute();
00055 void    precompute(AnImage& mask);
00056 
00057 double  divergentJ(int x, int y)
00058         {
00059         return  (j1->dfX_0(x,y) + j2->dfY_0(x,y));
00060         }
00061 
00062 virtual void operations(RImage& result);
00063 virtual void operations(AnImage& mask, RImage& result);
00064 
00065 public:
00066         
00067 WeickertFilter(int n=100, double ralpha=0.1, double rlambda=5.0, double rCm=3.31488);
00068 virtual ~WeickertFilter(){}
00069 
00070 
00071 virtual RImage* filter(RImage* src, RImage* dest=0);
00072 virtual RImage* selectedFilter(AnImage* mask, RImage* src, RImage* dest=0);
00073 
00074 virtual void report(FILE* file){}
00075 };
00076 
00077 
00078 #endif
SourceForge.net Logo
Restoreinpaint sourceforge project `C++/Java Image Processing, Restoration, Inpainting Project'.

Bernard De Cuyper: Open Project Leader: Concept, design and development.
Bernard De Cuyper & Eddy Fraiha 2002, 2003. Bernard De Cuyper 2004. Open and free, for friendly usage only.
Modifications on Belgium ground of this piece of artistic work, by governement institutions or companies, must be notified to Bernard De Cuyper.
bern_bdc@hotmail.com