相应的DLL函数声明如下: c风格:
void HazeRemovalUseDarkChannelPrior(unsigned char * Src,unsigned char * Dest,intWidth,intHeight,int Stride, int Radius ,intGuideRadius, intMaxAtom, float Omega,floatEpsilon,float T0 )
c#调用:
[DllImport(\true)] private static extern void HazeRemovalUseDarkChannelPrior(byte* Src, byte* Dest, int Width, int Height, int Stride, intRadius,intGuideRadius, intMaxAtom, float Omega, float Epsilon, float T0); VB6调用:
Private Declare Sub HazeRemovalUseDarkChannelPrior Lib \Width As Long, ByVal Height As Long, ByVal Stride As Long, ByVal Radius As Long, ByValGuideRadius As Long, ByValMaxAtom As Long, ByVal Omega As Single, ByVal Epsilon As Single, ByVal T0 As Single)
调用实例源代码下载:http://files.cnblogs.com/Imageshop/HazeRemovalTest.rar 2013.11,22修正:
通过联合双边滤波求透射率图的效果上面的不正确的,进最新的研究结果表明,双边滤波确实也能获得精细的
投射图,比如依旧那上面的测试图像,不同的SigmaS和SigmaR下获得透射率效果如下:
SigmaS=50,SigmaR=30
SigmaS=100,SigmaR=30