Guided Filter:擬合局部線性模型,取代逐對相似度計算
選讀・IP 03・強度轉換與空間濾波 的論文導讀(第 3/3 篇)。引用編號對應本頁底部的參考文獻。
導覽:本頁與本系列: 導覽:本頁與本系列
挑戰
He、Sun 與 Tang 的 Guided Image Filtering [8] 提出保邊濾波器,並給出對像素數呈線性時間的精確實作。本導讀以 TPAMI 2013 擴充版為準,方法最早發表於 ECCV 2010。目標不只去雜訊,而是以引導影像控制被濾波訊號的結構。閱讀推導前,先熟悉局部平均、變異數與最小平方法。
方法

來源:He、Sun 與 Tang [8],TPAMI 2013 作者版 PDF,第 3 頁、圖 1。原始 PDF。
在視窗 中,假設輸出 對純量引導 呈局部仿射關係:。對濾波輸入 擬合係數:
是像素索引, 是視窗索引, 是斜率與偏移, 懲罰過大的斜率。上橫線代表視窗平均,共變異數與變異數也在同一視窗內計算。對所有重疊預測取平均,得到 ;最後兩個平均涵蓋所有包含像素 的視窗係數。只取其中一個視窗的預測,會得到不同濾波器。
沿圖追蹤兩個輸入。 引導 提供結構座標,輸入 提供要近似的訊號。當 時,斜率等於局部變異數除以變異數加 :平坦區較容易平滑,強烈局部變化則較容易保留。使用另一張引導影像時,可以轉移有用邊緣,也可能轉移不相關紋理。固定引導時,輸出對 呈線性;自引導濾波的係數依賴輸入,因此整體不是線性操作。
演算法 1 以方框濾波計算局部統計量與係數平均。若每個像素的方框總和能以固定成本更新, 個像素的總成本便是 ,不會像明確逐對計算那樣隨視窗半徑增加。這是指定演算法的實作性質,不代表每個函式庫或彩色版本都有相同執行時間。
結果
論文展示平滑、細節增強、結構轉移、去背/羽化、去霧與聯合上取樣。它們是濾波器的不同應用,不是同一個修復基準。圖 2 有個重要閱讀陷阱:其中 PSNR 比較的是引導濾波與雙邊濾波的輸出。雙邊結果並非乾淨真值,因此表格衡量的是兩種濾波器的接近程度,不是去雜訊準確度。
消融與分析證據
局部變異數分析解釋 與視窗大小如何影響平滑。圖 5–6 探討扣除基底層、放大細節殘差時的梯度反轉。論文有區分理想局部模型與最後的重疊視窗平均;應一起讀推導與觀察範例,不能宣稱無條件沒有偽影的定理。高斯視窗版本的比較,則進一步檢查有效濾波核的形狀。
結論
當對齊的引導影像具有有用結構,且目標是有效率的局部濾波時,可考慮此方法。它明確分開「要濾什麼」與「由什麼決定邊緣」。本章補充資料提供更多代數推導;這篇導讀則聚焦論文的演算法與實驗論證。
限制與問題
引導未對齊可能造成邊界位移或重影,引導紋理也可能印到較平滑的目標上;帶雜訊的自引導仍可能保留不需要的變化。正規化參數使用強度平方單位,因此縮放引導數值時,也需要調整 。把濾波器放進去霧或深度上取樣系統,並不會獨立驗證整個應用的物理模型或感測器校正。
參考文獻
- 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