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

RSimpleAosOp.hpp

00001 #ifndef __RSimpleAosOp__
00002 #define __RSimpleAosOp__
00003 
00004 
00042 #include <stdio.h>
00043 
00044 #include "AbsRImageFilter.hpp"
00045 
00046 #include "AbsTriDiagonalLS.hpp"
00047 
00048 class RSimpleAosOp : public  AbsRImageFilter
00049 {
00050 protected:
00051 
00052 // basic filter parameters
00053 
00054 int                                     m;                              // m is the number of dimension (here m=2)
00055 
00056 int                                     w, h;
00057 
00058 int                                     iterMax;
00059 double                          tau;
00060 double                          K,K2;
00061 
00062 double                          sigma;                  // to build a regularised image
00063 bool                            iirUsed;                // use IIR bluring or LOD Heat flow for regularisation
00064 
00065 bool                            nonLinear;              // flag to recompute gradient each iteration
00066 
00067 AbsRImageFilter*        blurrer;                // IIR bluring or LOD Heat flow
00068 AbsRImageFilter*        gradient;               // gradient
00069         
00070 RImage*                         Isigma;
00071 RImage*                         IgradNorme;             // regularized gradient image
00072 
00073 AbsTriDiagonalLS*       hThomasLS;              // usually a Thomas Solver, but other are possible !!!
00074 
00075 AbsTriDiagonalLS*       vThomasLS;              // usually a Thomas Solver, but other are possible !!!
00076 
00077 protected:
00078 
00079 virtual void            init(RImage* im);
00080 virtual void            gradientRegularisation(RImage* im);
00081 
00082 virtual double  g(int i, int j)=0;      // conductivity to define later
00083 
00084 public:
00085         
00086 RSimpleAosOp(int iterations=8, double t=0.5, 
00087                          double k=16.0, double asigma=5.0,  
00088                          bool iirFlag=false, bool nonLinearFlag=true);
00089 virtual ~RSimpleAosOp(){delete gradient;}
00090 
00091 // single shot filtering
00092 virtual RImage* filter(RImage* src, RImage* dest=0);
00093 virtual RImage* selectedFilter(AnImage* mask, RImage* src, RImage* dest=0);
00094 
00095 virtual void report(FILE* file){ fprintf(file,"Real Simple Aos Operator\n"); }
00096 };
00097 
00098 
00099 #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