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

CSimpleAosOp.hpp

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