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

DuboisPradeOp.hpp

00001 #ifndef __DuboisPradeOp__
00002 #define __DuboisPradeOp__
00003 
00025 #include <stdio.h>
00026 
00027 
00028 #include "AFuzzyOp.hpp"
00029 
00030 class DuboisPradeOp : public AFuzzyOp 
00031 {
00032 private:
00033 
00034 double  alpha;
00035 
00036 public:
00037 DuboisPradeOp(double coeff=1.0){lambda= coeff;}
00038 virtual ~DuboisPradeOp(){}
00039 
00040 
00041 virtual double not(double value){ return (1.0 - value); }
00042 
00043 virtual double and(double v1, double v2)
00044         {
00045         double val= ( a < b ? b : a);
00046         val= (val < alpha ? alpha : val);
00047 
00048         return (a*b / val );
00049         }
00050 
00051 virtual double or(double v1, double v2)
00052         {
00053         double maxval= ( (1.0-a) < (1.0-b) ? (1.0-b) : (1.0-a) );
00054         double minval= ( a < b ? a : b);
00055         minval= (minval < (1.0-alpha) ? minval : (1.0-alpha) );
00056         maxval= (maxval < alpha ? alpha : maxval );
00057 
00058         return (a*b-a*b-minval) / maxval;
00059         }
00060 
00061 
00062 virtual void report(FILE* file){}
00063 };
00064 
00065 
00066 #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