Bilateral Filter:平均鄰近像素,但不跨越強邊緣
選讀・IP 03・強度轉換與空間濾波 的論文導讀(第 2/3 篇)。引用編號對應本頁底部的參考文獻。
導覽:本頁與本系列: 導覽:本頁與本系列
挑戰
空間平均能降低雜訊,卻會混合邊緣兩側。Tomasi 與 Manduchi 的 ICCV 1998 論文 [6] 探討:簡單、非迭代的濾波器,能否在平滑影像時尊重強烈的亮度或色彩變化?核心論點是「接近」應同時在位置與外觀兩種空間衡量。先讀本章的高斯平滑;新增的是依輸入改變的權重,不是學習式網路。
方法

來源:Tomasi 與 Manduchi [6],ICCV 1998,PDF 第 3 頁、圖 1。原始 PDF。
對純量影像,離散高斯雙邊濾波可寫成
是位置 的輸入強度, 是視窗 中的候選鄰點, 是輸出, 是未正規化的權重。空間頻寬 以像素為單位,值域頻寬 則使用影像強度單位。分母讓權重總和為一,因此常數影像保持不變。
由左至右讀原圖:中心位於階梯亮側時,即使暗側像素同樣接近,仍會得到較低的值域權重。近乎均勻的區域中,值域權重相近,操作便接近一般平滑。彩色影像則使用 CIE-Lab 的感知色彩距離,對整個色彩向量共用一組權重;各通道獨立濾波可能產生鄰近色彩不支持的組合。
兩個控制量、兩種效果。 增加 會納入更遠的樣本;增加 會接受差異更大的強度。值域頻寬很大時,濾波接近空間高斯平滑;很小時,雜訊造成的強度差異也可能阻止有效平均。縮放影像數值時,必須一起縮放 :針對位元組強度選出的數值,不能直接套到正規化至單位區間的影像。
結果
論文主要提供分析與視覺範例,而非現代資料集的大規模排名。圖 1 展示階梯邊緣的機制;圖 3 改變空間與值域參數;圖 5–6 呈現紋理簡化與彩色濾波。這些證據支持可調整的保邊平滑,不能推成方法一定能重建未知乾淨影像。移除紋理對簡化影像可能有利,對修復卻可能有害。
消融與參數證據
只考慮位置、只考慮值域的分析,說明兩個因子為何都需要。完全不考慮空間的值域濾波,會化為依影像直方圖進行的強度重映射,無法辨識同色像素是否屬於同一物件。圖 3 的參數網格是敏感度分析,不是學習式模組消融。閱讀時一次沿著一個參數方向比較,不要把所有視覺變化都歸因於保邊。
結論
雙邊濾波讓鄰域權重由影像本身決定。當目標邊界有明顯外觀對比,且簡單局部濾波已足夠時,它是實用基準。接著可讀 Guided Filter,理解局部線性模型如何使用另一張引導影像;再讀 IP 05 的 Non-Local Means,把單一像素相似度換成區塊相似度。
限制與問題
中心像素的雜訊也會污染自身的相似度權重。弱邊界可能被抹除,強雜訊或紋理卻可能被當成邊界保留。大視窗的直接計算成本高,反覆濾波也會改變有效操作。保邊平滑不保證細節增強沒有偽影:先取平滑殘差再放大,是另一個有獨立失敗模式的程序。
參考文獻
- R. C. Gonzalez and R. E. Woods, Digital Image Processing, 4th ed., Pearson, 2018, Ch. 3. publisher page
- S. M. Pizer, E. P. Amburn, J. D. Austin, R. Cromartie, A. Geselowitz, T. Greer, B. ter Haar Romeny, J. B. Zimmerman and K. Zuiderveld, “Adaptive histogram equalization and its variations,” Computer Vision, Graphics, and Image Processing, 1987. doi
- K. Zuiderveld, “Contrast limited adaptive histogram equalization,” in P. S. Heckbert (ed.), Graphics Gems IV, Morgan Kaufmann, 1994, pp. 474–485. entry
- A. M. Reza, “Realization of the contrast limited adaptive histogram equalization (CLAHE) for real-time image enhancement,” Journal of VLSI Signal Processing, 2004. doi
- D. Coltuc, P. Bolon and J.-M. Chassery, “Exact histogram specification,” IEEE Transactions on Image Processing, 2006. doi
- C. Tomasi and R. Manduchi, “Bilateral filtering for gray and color images,” in Proc. IEEE International Conference on Computer Vision (ICCV), 1998. pdf
- S. Paris, P. Kornprobst, J. Tumblin and F. Durand, “Bilateral filtering: Theory and applications,” Foundations and Trends in Computer Graphics and Vision, vol. 4, no. 1, pp. 1–73, 2009. doi
- K. He, J. Sun and X. Tang, “Guided image filtering,” IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(6):1397–1409, 2013 (first presented at ECCV 2010). doi
- P. Milanfar, “A tour of modern image filtering,” IEEE Signal Processing Magazine, vol. 30, no. 1, pp. 106–128, 2013. IEEE Xplore
- S. Gingichashvili and D. Lischinski, “Evaluation and comparison of edge-preserving filters,” arXiv:2012.13778, 2020. arXiv
- Y. Qi, Z. Yang, W. Sun et al., “A comprehensive overview of image enhancement techniques,” Archives of Computational Methods in Engineering, 2021. doi
- C. Li, C. Guo, L. Han, J. Jiang, M.-M. Cheng, J. Gu and C. C. Loy, “Low-light image and video enhancement using deep learning: A survey,” IEEE Transactions on Pattern Analysis and Machine Intelligence, 2021 (arXiv:2104.10729). arXiv
- C. Guo, C. Li, J. Guo, C. C. Loy, J. Hou, S. Kwong and R. Cong, “Zero-reference deep curve estimation for low-light image enhancement,” in Proc. IEEE/CVF CVPR, 2020. arXiv
- H. Zeng, J. Cai, L. Li, Z. Cao and L. Zhang, “Learning image-adaptive 3D lookup tables for high performance photo enhancement in real-time,” IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020. arXiv
- M. Gharbi, J. Chen, J. T. Barron, S. W. Hasinoff and F. Durand, “Deep bilateral learning for real-time image enhancement,” ACM Transactions on Graphics (SIGGRAPH), 2017. arXiv
- H. Wu, S. Zheng, J. Zhang and K. Huang, “Fast end-to-end trainable guided filter,” in Proc. IEEE/CVF CVPR, 2018. arXiv
- Y. Cai, H. Bian, J. Lin, H. Wang, R. Timofte and Y. Zhang, “Retinexformer: One-stage Retinex-based transformer for low-light image enhancement,” in Proc. IEEE/CVF ICCV, 2023. arXiv
- S. Paris and F. Durand, “A fast approximation of the bilateral filter using a signal processing approach,” International Journal of Computer Vision, vol. 81, no. 1, pp. 24–52, 2009 (first presented at ECCV 2006). doi