In this paper, we propose an extension of guided image filtering to support arbitrary window functions. The guided image filtering is a fast edge-preserving filter based on a local linearity assumption. The filter supports not only image smoothing but also edge enhancement and image interpolation. The guided image filter assumes that an input image is a local linear transformation of a guidance image, and the assumption is supported in a local finite region. For realizing the supposition, the guided image filtering consists of a stack of box filtering. The limitation of the guided image filtering is flexibilities of kernel shape setting. Therefore, we generalize the formulation of the guide image filter by using the idea of window functions in image signal processing to represent arbitrary kernel shapes. Also, we reveal the relationship between the guided image filtering and the variants of this filter.
The code is written in C++ with SIMD intrinsic (AVX) and OpenMP parallel optimization, and use OpenCV.