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

Perona1990Filter.hpp

00001 #ifndef __Perona1990Filter__
00002 #define __Perona1990Filter__
00003 
00022 #include <stdio.h>
00023 
00024 #include "AnImage.hpp"
00025 #include "AbsRImageFilter.hpp"
00026 
00027 #include "BeltramiFlow.hpp"
00028 
00029 class Perona1990Filter : public AbsRImageFilter
00030 {
00031 protected:
00032 
00033 RImage*                 I0;                             // origin image
00034 RImage*                 I;                              // current image
00035 
00036 double                  lambda;                 // used for linear constrains around the origin
00037 
00038 int                             niterations;
00039 double                  alpha;
00040 
00041 RImage*                 j1;
00042 RImage*                 j2;
00043 
00044 protected:
00045 
00046 void    precompute();
00047 void    precompute(AnImage& mask);
00048 
00049 double  divergentJ(int x, int y)
00050         {
00051         return  (j1->dfX_0(x,y) + j2->dfY_0(x,y));
00052         }
00053 
00054 virtual void operations(RImage& result);
00055 virtual void operations(AnImage& mask, RImage& result);
00056 
00057 public:
00058         
00059 Perona1990Filter(int n=100, double ralpha=0.1, double rlambda=5.0);
00060 virtual ~Perona1990Filter(){}
00061 
00062 
00063 virtual RImage* filter(RImage* src, RImage* dest=0);
00064 virtual RImage* selectedFilter(AnImage* mask, RImage* src, RImage* dest=0);
00065 
00066 virtual void report(FILE* file){}
00067 };
00068 
00069 
00070 #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