Semi-Global Weighted Least Squares in Image Filtering

Wei Liu,Xiaogang Chen,Chuanhua Shen,Zhi Liu,Jie Yang
DOI: https://doi.org/10.48550/arXiv.1705.01674
2020-09-22
Abstract:Solving the global method of Weighted Least Squares (WLS) model in image filtering is both time- and memory-consuming. In this paper, we present an alternative approximation in a time- and memory- efficient manner which is denoted as Semi-Global Weighed Least Squares (SG-WLS). Instead of solving a large linear system, we propose to iteratively solve a sequence of subsystems which are one-dimensional WLS models. Although each subsystem is one-dimensional, it can take two-dimensional neighborhood information into account due to the proposed special neighborhood construction. We show such a desirable property makes our SG-WLS achieve close performance to the original two-dimensional WLS model but with much less time and memory cost. While previous related methods mainly focus on the 4-connected/8-connected neighborhood system, our SG-WLS can handle a more general and larger neighborhood system thanks to the proposed fast solution. We show such a generalization can achieve better performance than the 4-connected/8-connected neighborhood system in some applications. Our SG-WLS is $\sim20$ times faster than the WLS model. For an image of $M\times N$, the memory cost of SG-WLS is at most at the magnitude of $max\{\frac{1}{M}, \frac{1}{N}\}$ of that of the WLS model. We show the effectiveness and efficiency of our SG-WLS in a range of applications. The code is publicly available at: <a class="link-external link-https" href="https://github.com/wliusjtu/Semi-Global-Weighted-Least-Squares-in-Image-Filtering" rel="external noopener nofollow">this https URL</a>.
Graphics
What problem does this paper attempt to address?
### What problem does this paper attempt to solve? This paper aims to solve the problem of excessive time and memory consumption in the Weighted Least Squares (WLS) model in image filtering. Specifically: 1. **Limitations of the WLS model**: - The WLS model is widely used in image processing and computer graphics, but its solutions usually require solving a large - scale linear system, which is both time - consuming and memory - intensive. - Although the WLS model can overcome problems such as gradient reversal and halo artifacts brought by local filters (such as bilateral filters), its computational complexity limits its practical applications. 2. **Proposed solution**: - The paper proposes a new approximation method, called Semi - Global Weighted Least Squares (SG - WLS), to approximate the WLS model in a more efficient way. - SG - WLS significantly reduces the computation time and memory consumption by iteratively solving a series of one - dimensional subsystems instead of directly solving a large - scale linear system. 3. **Improved neighborhood construction**: - SG - WLS introduces a new neighborhood construction method, so that each one - dimensional subsystem can still consider two - dimensional neighborhood information. This overcomes the limitation that previous methods can only operate within one - dimensional neighborhoods. - The new neighborhood construction method not only improves performance but also can achieve better results in certain application scenarios (such as guided depth upsampling). 4. **Fast solution method**: - The paper proposes a method for quickly solving each one - dimensional subsystem, called r - band LU decomposition, which can handle a wider range of neighborhood systems (not just 4 - connected or 8 - connected neighborhood systems). 5. **Performance improvement**: - The experimental results show that SG - WLS is about 20 times faster than the original WLS model and exhibits performance close to or even better than the WLS model in multiple applications. - For an image of size M×N, the memory consumption of SG - WLS is at most \(\max\left\{\frac{1}{M}, \frac{1}{N}\right\}\) times that of the WLS model. In conclusion, this paper solves the efficiency and resource consumption problems of the WLS model in image filtering by proposing the SG - WLS method while maintaining its good performance.