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

FDistanceAosOp.hpp

00001 #ifndef __FDistanceAosOp__
00002 #define __FDistanceAosOp__
00003 
00004 
00042 #include <stdio.h>
00043 
00044 #include "AbsFImageFilter.hpp"
00045 
00046 #include "AbsFTriDiagonalLS.hpp"
00047 
00048 class FDistanceAosOp : public  AbsFImageFilter
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 float                   tmin, tmax;     
00060 float                   K,K2;
00061 
00062 FImage*                 distanceMapEdges;
00063 
00064 float                   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 AbsFImageFilter*        blurrer;                // IIR bluring or LOD Heat flow
00070 AbsFImageFilter*        gradient;               // gradient
00071         
00072 FImage*                         Isigma;
00073 FImage*                         IgradNorme;             // regularized gradient image
00074 
00075 AbsFTriDiagonalLS*      hThomasLS;              // usually a Thomas Solver, but other are possible !!!
00076 
00077 AbsFTriDiagonalLS*      vThomasLS;              // usually a Thomas Solver, but other are possible !!!
00078 
00079 protected:
00080 
00081 virtual float   getTau(int x, int y);
00082 
00083 virtual void    init(FImage* im);
00084 virtual void    gradientRegularisation(FImage* im);
00085 
00086 virtual float   g(int i, int j)=0;      // conductivity to define later
00087 
00088 public:
00089         
00090 FDistanceAosOp(FImage* edgeDistance=0, int iterations=8, float t0= 0.0, float tMax=20.0, 
00091                          float k=16.0, float asigma=5.0,  
00092                          bool iirFlag=false, bool nonLinearFlag=true);
00093 virtual ~FDistanceAosOp(){delete gradient;}
00094 
00095 virtual void    setEdgeDistance(FImage* distanceMap){ distanceMapEdges= distanceMap; }
00096 
00097 // single shot filtering
00098 virtual FImage* filter(FImage* src, FImage* dest=0);
00099 virtual FImage* selectedFilter(AnImage* mask, FImage* src, FImage* dest=0);
00100 
00101 virtual void report(FILE* file){ fprintf(file,"Float Distance 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