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

RDistanceAosOp.hpp

00001 #ifndef __RDistanceAosOp__
00002 #define __RDistanceAosOp__
00003 
00004 
00042 #include <stdio.h>
00043 
00044 #include "AbsRImageFilter.hpp"
00045 
00046 #include "AbsTriDiagonalLS.hpp"
00047 
00048 class RDistanceAosOp : 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                  tmin, tmax;     
00060 double                  K,K2;
00061 
00062 RImage*                 distanceMapEdges;
00063 
00064 double                  sigma;                  // to build a regularised image
00065 bool                            iirUsed;                // use IIR bluring or LOD Heat flow for regularisation
00066 
00067 bool                            nonLinear;              // flag to recompute gradient each iteration
00068 
00069 AbsRImageFilter*        blurrer;                // IIR bluring or LOD Heat flow
00070 AbsRImageFilter*        gradient;               // gradient
00071         
00072 RImage*                         Isigma;
00073 RImage*                         IgradNorme;             // regularized gradient image
00074 
00075 AbsTriDiagonalLS*       hThomasLS;              // usually a Thomas Solver, but other are possible !!!
00076 
00077 AbsTriDiagonalLS*       vThomasLS;              // usually a Thomas Solver, but other are possible !!!
00078 
00079 protected:
00080 
00081 virtual double  getTau(int x, int y);
00082 
00083 virtual void    init(RImage* im);
00084 virtual void    gradientRegularisation(RImage* im);
00085 
00086 virtual double  g(int i, int j)=0;      // conductivity to define later
00087 
00088 public:
00089         
00090 RDistanceAosOp(RImage* edgeDistance=0, int iterations=8, double t0= 0.0, double tMax=20.0, 
00091                          double k=16.0, double asigma=5.0,  
00092                          bool iirFlag=false, bool nonLinearFlag=true);
00093 virtual ~RDistanceAosOp(){delete gradient;}
00094 
00095 virtual void    setEdgeDistance(RImage* distanceMap){ distanceMapEdges= distanceMap; }
00096 
00097 // single shot filtering
00098 virtual RImage* filter(RImage* src, RImage* dest=0);
00099 virtual RImage* selectedFilter(AnImage* mask, RImage* src, RImage* dest=0);
00100 
00101 virtual void report(FILE* file){ fprintf(file,"Real Simple Aos Operator\n"); }
00102 };
00103 
00104 
00105 #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