00001 #ifndef __IDistanceAosPeronaOp__ 00002 #define __IDistanceAosPeronaOp__ 00003 00029 #include <stdio.h> 00030 00031 #include "IMultiImageOp.hpp" 00032 00033 #include "Real3CImage.hpp" 00034 00035 00036 class IDistanceAosPeronaOp : public IMultiImageOp 00037 { 00038 private: 00039 00040 int type; 00041 00042 int iter; 00043 double sigmaDelta; 00044 double sigmaBlur; 00045 00046 double tmin, tmax; 00047 RImage* distanceMapEdges; 00048 00049 bool iir; 00050 bool nonLinear; 00051 00052 protected: 00053 00054 // mono channel 00055 00056 virtual AnImage* greyFilter(AnImage* src, AnImage* dest=0); 00057 virtual AnImage* greySelectedFilter(AnImage* mask, AnImage* src, AnImage* dest=0); 00058 00059 // separate color channels 00060 00061 virtual Real3CImage* scolorFilter(Real3CImage* src, Real3CImage* dest=0); 00062 virtual Real3CImage* scolorSelectedFilter(AnImage* mask, Real3CImage* src, Real3CImage* dest=0); 00063 00064 00065 // separate color channels 00066 00067 virtual Real3CImage* fcolorFilter(Real3CImage* src, Real3CImage* dest=0); 00068 virtual Real3CImage* fcolorSelectedFilter(AnImage* mask, Real3CImage* src, Real3CImage* dest=0); 00069 00070 public: 00071 00072 IDistanceAosPeronaOp(int atype=0, RImage* edgeDistance=0, int iterations=1, double tMin=0.0, double tMax=20.0, 00073 double K=1.0, double sigma=3.0, 00074 bool iirF=false, bool colorFlag= false, bool nonLinearF=true) 00075 :IMultiImageOp(1,colorFlag) 00076 {type= atype; iter= iterations; tmin= tMin; tmax= tMax; distanceMapEdges=edgeDistance; 00077 sigmaDelta= K; sigmaBlur=sigma; iir= iirF; nonLinear=nonLinearF; } 00078 virtual ~IDistanceAosPeronaOp(){} 00079 00080 void setEdgeDistance(RImage* distanceMap){ distanceMapEdges= distanceMap; } 00081 00082 virtual void report(FILE* file){} 00083 }; 00084 00085 00086 #endif