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.















Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Notes
an IIR O (1) solution needs to be available for the kernel.
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.
\(\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.
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.
Ahuja, N. (1996). A transform for multiscale image segmentation by integrated edge and region detection. PAMI, 18, 1211–1235.
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.
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.
Elad, M. (2002). On the bilateral filter and ways to improve it. IEEE Trans. Image Process., 11(10), 1141–1151.
Fattal, R. (2009). Edge-avoiding wavelets and their applications. ToG, 28(3), 1–10.
Gastal, E., & Oliveira, M. (2011). Domain transform for edge-aware image and video processing. ToG, 30(4), 69:1–69:12.
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.
Perreault, S., & Hebert, P. (2007). Median filtering in constant time. Trans. Image Process., 16, 2389–2394.
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.
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.
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.
Zucker, A., Lev, S., & Rosenfeld, A. (1977). Iterative enhancement of noisy images. IEEE Trans. Syst. Man, Cybernet. SMC, 7, 435–441.
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
Corresponding author
Additional information
Communicated by C. Schnörr.
Rights and permissions
About this article
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
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11263-014-0764-y