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

RAxiomaticMRInpainter.hpp

00001 #ifndef __RAxiomaticMRInpainter__
00002 #define __RAxiomaticMRInpainter__
00003 
00004 
00005 
00029 #include <stdio.h>
00030 
00031 #include "RImage.hpp"
00032 #include "AbsRImageFilter.hpp"
00033 
00034 class RAxiomaticMRInpainter : public  AbsRImageFilter
00035 {
00036 protected:
00037 
00038 bool                            optimisation;           // Marquina optimisation
00039 
00040 double                          a, b;                           // euler elastica version
00041 double                          c;                                      // exponential form
00042 
00043 double                          aL;
00044 
00045 double                          dt;
00046 
00047 RImage*                         I0;
00048 RImage*                         I;
00049 
00050 double                          lambda;
00051 
00052 RImage*                         guNorme;
00053 RImage*                         k;
00054 
00055 // curvature computation
00056 double                          du_x2, du_y2, k_2;
00057 double                          ux2, uy2, gu2Norme;
00058 double                          ux2Norme, uy2Norme;
00059 
00060 protected:
00061 
00062 virtual void    precompute(AnImage* mask);
00063 
00064 virtual void    computeGradient(int x, int y, int idx, int idy);
00065 virtual void    computeCurvature(int x, int y, int idx, int idy);
00066 
00067 virtual double  getV(int x, int y, int idx, int idy);
00068 
00069 virtual double  divergentV(int x, int y)
00070         { return ( getV(x,y,1,0)-getV(x,y,-1,0) + getV(x,y,0,1)-getV(x,y,0,-1) ); }
00071 
00072 virtual double  operation(int x, int y);
00073 
00074 public:
00075 
00076 RAxiomaticMRInpainter(bool optimised= false, double deltaT=1.0, 
00077                                                 double av=0.2, double bv=0.2, double aLv= 0.2, double lambdav=0.0);
00078 virtual ~RAxiomaticMRInpainter(){}
00079 
00080 virtual void prepare(RImage* src);      // used to globally maintain subimages avoiding cons
00081 virtual void clear(){ delete guNorme; delete k; }
00082 
00083 // single shot filtering
00084 virtual RImage* filter(RImage* src, RImage* dest=0){ return 0; }
00085 virtual RImage* selectedFilter(AnImage* mask, RImage* src, RImage* dest=0);
00086 
00087 virtual void report(FILE* file){ fprintf(file,"Real Axiomatic MR Inpainter\n"); }
00088 };
00089 
00090 
00091 #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