[db:标题]

摘要:通常,我们谈的高斯模糊也有着各种优化算法实现,而且其速度基本是和参数大小无关的。但是,在实际的应用中,有至少50%以上的场景中,反而是微小半径的模糊更有用武之地,因此,小半径的高斯是否能进一步加速就值的研究。
通常,我们谈的高斯模糊,都知道其是可以行列分离的算法,现在也有着各种优化算法实现,而且其速度基本是和参数大小无关的。但是,在我们实际的应用中,我们可能会发现,有至少50%以上的场景中,我们并不需要大半径的高斯,反而是微小半径的模糊更有用武之地(比如Canny的预处理、简单去噪等),因此,小半径的高斯是否能进一步加速就值的研究,正因为如此,一些商业软件都提供了类似的功能,比如在halon中,直接的高斯模糊可以用smooth_image实现,但是你在其帮助文档中搜索gauss关键字后,你会发现有以下两个函数:     gauss_filter — Smooth using discrete gauss functions.     gauss_image — Smooth an image using discrete Gaussian functions. 两个函数的功能描述基本是一个意思,但是在gauss_image函数的注释下有这么一条:     gauss_image is obsolete and is only provided for reasons of backward compatibility. New applications should use the operator gauss_filter instead. 即这个函数已经过时,提供他只是为了向前兼容,新的应用建议使用gauss_filter 函数,那我们再来看下halcon中其具体的描述:   Signature     gauss_filter(Image : ImageGauss : Size : )   Description     The operator gauss_filter smoothes images using the discrete Gaussian, a discrete approximation of the Gaussian function,   The smoothing effect increases with increasing filter size. The following filter sizes (Size) are supported (the sigma value of the gauss function is indicated in brackets):         3 (0.600)         5 (1.075)         7 (1.550)         9 (2.025)         11 (2.550)     For border treatment the gray values of the images are reflected at the image borders. Notice that, contrary to the operator gauss_image, the relationship between the filter mask size and its respective value for the sigma parameter is linear.   可见gauss_filter的Size只能取3、5、7、9、11这五个值,括号里给出了对应的sigma值。   这种小半径的模糊的优化其实在我博客里有讲过好几个这方面的。但是前面讲述的基本都是直径不超过5,半径不大于2的,比如这里的3和5就可以直接用那种方法处理。
阅读全文