Skip to main content
Log in

Constant Time Median and Bilateral Filtering

  • Published:
International Journal of Computer Vision Aims and scope Submit manuscript

Abstract

This paper formulates both the median filter and bilateral filter as a cost volume aggregation problem whose computational complexity is independent of the filter kernel size. Unlike most of the previous works, the proposed framework results in a general bilateral filter that can have arbitrary spatial\(^{1}\) and arbitrary range filter kernels. This bilateral filter takes about 3.5 s to exactly filter a one megapixel 8-bit grayscale image on a 3.2 GHz Intel Core i7 CPU. In practice, the intensity/range and spatial domain can be downsampled to improve the efficiency. This compression can maintain very high accuracy (e.g., 40 dB) but over \(100\times \) faster.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15

Similar content being viewed by others

Notes

  1. an IIR O (1) solution needs to be available for the kernel.

  2. Integral image is an image representation. The integral image at a pixel location contains the sum of the pixels above and to the left of the pixel.

  3. \(\sigma _R\) is the standard deviation of the Gaussian range filter kernel defined in Eq. (6). In this paper, the image intensity is normalized so that it ranges from 0 to 1.

References

  • Adams, A., Baek, J., & Davis, A. (2010). Fast high-dimensional filtering using the permutohedral lattice. Comput. Graph. Forum, 29(2), 753–762.

    Article  Google Scholar 

  • Adams, A., Gelfand, N., Dolson, J., & Levoy, M. (2009). Gaussian kd-trees for fast high-dimensional filtering. ACM Trans. Graph., 28, 21:1–21:12.

    Article  Google Scholar 

  • Ahuja, N. (1996). A transform for multiscale image segmentation by integrated edge and region detection. PAMI, 18, 1211–1235.

    Article  Google Scholar 

  • Chen, J., Paris, S., & Durand, F. (2007). Real-time edge-aware image processing with the bilateral grid. In Siggraph, vol. 26.

  • Davis, L. S., & Rosenfeld, A. (1978). Noise cleaning by iterated local averaging. IEEE Trans. Syst. Man, Cybernet. SMC, 8, 703–710.

    Google Scholar 

  • Deriche, R. (1992). Recursively implementing the gaussian and its derivatives. In ICIP (pp. 263–267).

  • Durand, F., & Dorsey, J. (2002). Fast bilateral filtering for the display of high-dynamic-range images. In Siggraph vol. 21.

  • Eisemann, E., & Durand, F. (2004). Flash photography enhancement via intrinsic relighting. Siggraph, 23(3), 673–678.

    Article  Google Scholar 

  • Elad, M. (2002). On the bilateral filter and ways to improve it. IEEE Trans. Image Process., 11(10), 1141–1151.

    Article  MathSciNet  Google Scholar 

  • Fattal, R. (2009). Edge-avoiding wavelets and their applications. ToG, 28(3), 1–10.

    Article  Google Scholar 

  • Gastal, E., & Oliveira, M. (2011). Domain transform for edge-aware image and video processing. ToG, 30(4), 69:1–69:12.

    Article  Google Scholar 

  • He, K., Sun, J., & Tang, X. (2010). Guided image filtering. In ECCV (pp. 1–14).

  • Huber, P. J., & Wiley, J. (1981) Robust statistics. New York: Wiley InterScience

  • Kass, M., & Solomon, J. (2010). Smoothed local histogram filters. ToG, 29(4), 100:1–100:10.

  • Paris, S., & Durand, F. (2009). A fast approximation of the bilateral filter using a signal processing approach. IJCV, 81, 24–52.

  • Paris, S., Kornprobst, P., Tumblin, J., & Durand, F. (2009). Bilateral filtering: Theory and applications. Found. Trends Comput. Graph. Vision, 4(1), 1–73.

    Article  Google Scholar 

  • Perreault, S., & Hebert, P. (2007). Median filtering in constant time. Trans. Image Process., 16, 2389–2394.

    Article  MathSciNet  Google Scholar 

  • Petschnigg, G., Szeliski, R., Agrawala, M., Cohen, M., Hoppe, H., & Toyama, K. (2004). Digital photography with flash and no-flash image pairs. Siggraph, 23(3), 664–672.

    Article  Google Scholar 

  • Pham, T. Q., & van Vliet, L. J. (2005). Separable bilateral filtering for fast video preprocessing. In Proceedings of the International Conference on Multimedia and Expo.

  • Porikli, F. (2008). Constant time o(1) bilateral filtering. In CVPR.

  • Smith, J. O. (2007). Introduction to digital filters with audio applications. W3K Publishing. http://www.w3k.org/books/.

  • Tabb, M., & Ahuja, N. (1997). Unsupervised multiscale image segmentation by integrated edge and region detection. TIP, 6, 642–655.

    Google Scholar 

  • Tomasi, C., & Manduchi, R. (1998). Bilateral filtering for gray and color images. In ICCV (pp. 839–846).

  • Viola, P., & Jones, M. (2001). Robust real-time face detection. In ICCV (pp. 747–750).

  • Weiss, B. (2006). Fast median and bilateral filtering. In Siggraph (vol. 25, pp. 519–526).

  • Yang, Q. (2012). A non-local cost aggregation method for stereo matching. In CVPR (pp. 1402–1409).

  • Yang, Q. (2012). Recursive bilateral filtering. In ECCV (pp. 399–413).

  • Yang, Q., Wang, S., & Ahuja, N. (2010). Real-time specular highlight removal using bilateral filtering. In ECCV (pp. 87–100).

  • Yin, L., Yang, R., Gabbouj, M., & Neuvo, Y. (1996). Weighted median filters: A tutorial. IEEE Trans. Circuits Syst. II, 43(3), 157–192.

    Article  Google Scholar 

  • Zucker, A., Lev, S., & Rosenfeld, A. (1977). Iterative enhancement of noisy images. IEEE Trans. Syst. Man, Cybernet. SMC, 7, 435–441.

    Article  Google Scholar 

Download references

Acknowledgments

This work was supported in part by a GRF Grant from the Research Grants Council of Hong Kong (Project No. CityU 122212) and a grant from HP lab.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Qingxiong Yang.

Additional information

Communicated by C. Schnörr.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Yang, Q., Ahuja, N. & Tan, KH. Constant Time Median and Bilateral Filtering. Int J Comput Vis 112, 307–318 (2015). https://doi.org/10.1007/s11263-014-0764-y

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11263-014-0764-y

Keywords

Navigation