Linear Time Edge-Aware Filtering on Complementary Tree Structures
Penghui Bu,Yusheng Jin,Yueyang Ma,Hong Zhao
DOI: https://doi.org/10.2139/ssrn.4108985
2022-01-01
SSRN Electronic Journal
Abstract:Typical non-local edge-aware filtering methods build long-range connections by deriving a minimum spanning tree (MST) from input image, and the structure of MST completely depends on the intensity difference between neighboring pixels. Each pixel on the MST only connects to a sub-set of pixels in 8-neighborhood, resulting in unbalanced information propagation along eight directions. Thus they tend to generate piece-wise constant filtering output with fake edges among sub-trees. In this paper, we propose two complementary trees to aggregate information from entire image. The structure of each tree depends on the spatial relationships of neighboring pixels. The distances between any two pixels in both spatial space and intensity space are the shortest distance on each tree. Novel algorithms are presented to recursively compute output and normalization constant on each tree in linear time. For each pixel, we first compute the outputs along eight sub-trees, namely sub-trees in left, top, right, bottom, top-left, top-right, bottom-left and bottom-right of the root node, and then fuse the outputs to obtain filtering output on each tree. The final filtering output of our method is simply averaging the outputs of two complementary trees. Moreover, we present a distance mapping scheme in range space to map the intensity difference between neighboring pixels to a new value, which enable our method to manageably filter out low-amplitude structures while sharpening major edges. Extensive experiments in graphic applications, such as image denoising, JPEG artifacts removal, and colorization, to demonstrate the effectiveness and versatility of our method.