Bayer Demosaicing

文獻中存在針對 Bayer 格式影像進行彩色影像插補(Bayer 轉換)的不同演算法。本節將提供此類演算法的幾個範例。下表進行了總結:

演算法 描述 範例
“Nearest Neighbor filter” 根據 [Ada95] 「Nearest Neighbor Demosaicing」
“Bayer3x3filter” 雙線性插補;基於 VisualApplets 運算子 BAYER3x3Linear 「Bayer 3x3 Demosaicing」
帶白平衡的 “Bayer3x3filter” 雙線性插補;基於帶額外白平衡的 VisualApplets 運算子 BAYER3x3Linear 「Bayer 3x3 Demosacing with White Balancing」
“Bayer5x5filter” 雙線性插補;基於 VisualApplets 運算子 BAYER5x5Linear 「Bayer 5x5 Demosaicing」
帶白平衡的 “Bayer5x5filter” 雙線性插補;基於帶額外白平衡的 VisualApplets 運算子 BAYER5x5Linear 「Bayer 5x5 Demosacing with White Balancing」
“Laplace filter” 邊緣敏感 「Edge Sensitive Bayer Demosaicing Algorithm」
“Original Laroche filter” 根據 [Lar94] 「Bayer Demosaicing Algorithm According to Laroche」
“Modified Laroche filter” 根據 [Lar94];已修改 「Modified Laroche Bayer Demosaicing Algorithm 」
"Bilinear Bayer Red/BlueFollowedByGreen GreenFollowedByBlue/Red" 根據 [Bas13] 'Bayer Demosaicing For Bilinear Line Scan Cameras with Color Pattern Red/BlueFollowedByGreen GreenFollowedByBlue/Red '
"Bilinear Bayer Red/BlueFollowedByBlue/Red GreenFollowedByGreen" 'Bayer Demosaicing For Bilinear Line Scan Cameras with Color Pattern RedFollowedByBlue GreenFollowedByGreen '
"Bayer Demosaicing a Line Scan Camera with 8 Bit BiColor Bayer Pattern" 對具有雙色 Bayer 圖案的 racer 2 L CXP 線掃描相機之 8 位元 Bayer RAW 圖案進行去拜爾處理: BiColorRGBG、BiColorGRGB、BiColorBGRG 與 BiColorGBGR 'Bayer Demosaicing a Line Scan Camera with 8 Bit BiColor Bayer Pattern'
"Bayer Demosaicing a Line Scan Camera with 10 Bit BiColor Bayer Pattern)" 對具有雙色 Bayer 圖案的 racer 2 L CXP 線掃描相機之 10 位元 Bayer RAW 圖案進行去拜爾處理: BiColorRGBG、BiColorGRGB、BiColorBGRG 與 BiColorGBGR 'Bayer Demosaicing a Line Scan Camera with 10 Bit BiColor Bayer Pattern'
"Bayer Demosaicing a Line Scan Camera with 12 Bit BiColor Bayer Pattern" 對具有雙色 Bayer 圖案的 racer 2 L CXP 線掃描相機之 12 位元 Bayer RAW 圖案進行去拜爾處理: BiColorRGBG、BiColorGRGB、BiColorBGRG 與 BiColorGBGR 'Bayer Demosaicing a Line Scan Camera with 12 Bit BiColor Bayer Pattern'

表 19. Bayer 去拜爾範例清單


上述演算法將在對應的章節中詳細說明。 在此,我們針對使用不同去拜爾方法對人工測試影像(圖 234,「人工測試影像」)所獲得的品質結果提供簡短概述。

人工測試影像

圖 234. 人工測試影像


下圖顯示了單一結構的更多細節。從左到右分別為:a) 「原始 Laroche 濾鏡」 [Lar94]、 b) 「修改後的 Laroche 濾鏡」、c) 「拉普拉斯濾鏡」、 d) 「Bayer5x5filter」、 e) 最鄰近插值法,以及 f) 「Bayer3x3filter」:

直線邊緣

圖 235. 直線邊緣


對角線邊緣

圖 236. 對角線邊緣


曲線邊緣

圖 237. 曲線邊緣


週期性結構

圖 238:週期性結構


對於人工測試影像,根據拉鍊效應和偽色效應,"original Laroche filter" 顯示出最佳的主觀結果。 "modified Laroche filter" 具有輕微的拉鍊效應,可與 "Laplace filter" 相比。對於 “Laplace filter" 而言,此外在曲線和對角邊緣上還會出現許多偽色像素。“Bayer5x5filter" 顯示出強烈的拉鍊效應,而 “Nearest Neighbor filter" 則顯示出強烈的偽色效應。對於直線邊緣,此處會出現強烈的拉鍊效應。 使用 "Bayer3x3filter" 時,所有邊緣都顯得模糊。

Attention:"original Laroche filter" 並不總是 Bayer 顯像(demosaicing)的最佳解決方案!對於人工測試影像,它沒有或只有極少的拉鍊效應,但對於有雜訊的 Bayer RAW 影像,可能會產生這種效應。在研究過程中,我們發現濾波演算法會受到雜訊的影響。 "modified Laroche" filter" 對於人工測試影像具有拉鍊效應,但對於有雜訊的 Bayer RAW 影像僅具有輕微的拉鍊效應。在此,濾波演算法受雜訊的影響小於 "original Laroche filter" 濾波器。此外,"Laplace filter" 對於人工測試影像具有拉鍊效應,但對於有雜訊的 Bayer 測試影像則沒有拉鍊效應。此處還會額外出現偽色效應。因此,您必須選擇哪種 Bayer 顯像演算法最適合您的特殊用途。