维纳滤波实现
参考链接:Matlab Wiener2函数
一、算法原理及公式:
二、算法实现:
步骤一:计算局部均值图localMean与局部方差图localVar,可采用积分图加速;
步骤二:设noiseVal为噪声方差,若未给出,则参考Matlab wiener2实现,以局部方差图localVar的均值代替;
步骤三:根据公式计算结果:
令:I为源灰度图
f = I - localMean;
err = localVar - noiseVal;
err = max(err,0);
localVar = max(localVar,noise);
f = f ./ localVar;
f = f .* g;
f = f + localMean;
[1]Lim, Jae S., Two-Dimensional Signal and Image Processing, Englewood Cliffs, NJ, Prentice Hall, 1990, p. 548, equations 9.26, 9.27, and 9.29.