拜尔阵列
蓝绿蓝绿蓝绿蓝绿蓝绿蓝绿……
绿红绿红绿红绿红绿红绿红……
蓝绿蓝绿蓝绿蓝绿蓝绿蓝绿……
绿红绿红绿红绿红绿红绿红……
……
3 × 3 3 \times 3 3×3 矩阵窗口
矩阵窗口的移动
对矩阵窗口移动的说明
-
根据 3 × 3 3\times3 3×3窗口中心位置像素的行、列的奇偶选择对应的bayer 转 rgb 的算法。
-
奇行、奇列(如窗口A):
R e d = X 11 Red = X_{11} Red=X11
G r e e n = X 01 + X 10 + X 21 + X 12 4 Green = \frac{X_{01}+X_{10}+X_{21}+X_{12}}{4} Green=4X01+X10+X21+X12
B l u e = X 00 + X 02 + X 20 + X 22 4 Blue = \frac{X_{00}+X_{02}+X_{20}+X_{22}}{4} Blue=4X00+X02+X20+X22奇行、偶列(如窗口B):
R e d = X 11 + X 13 2 Red = \frac{X_{11}+X_{13}}{2} Red=2X11+X13
G r e e n = X 12 Green = X_{12} Green=X12
B l u e = X 02 + X 22 2 Blue = \frac{X_{02}+X_{22}}{2} Blue=2X02+X22偶行、奇列:
R e d = X 11 + X 31 2 Red = \frac{X_{11}+X_{31}}{2} Red=2X11+X31
G r e e n = X 21 Green = X_{21} Green=X21
B l u e = X 20 + X 22 2 Blue = \frac{X_{20}+X_{22}}{2} Blue=2X20+X22偶行、偶列:
R e d = X 11 + X 13 + X 31 + X 33 4 Red = \frac{X_{11}+X_{13}+X_{31}+X_{33}}{4} Red=4X11+X13+X31+X33
G r e e n = X 12 + X 21 + X 32 + X 23 4 Green = \frac{X_{12}+X_{21}+X_{32}+X_{23}}{4} Green=4X12+X21+X32+X23
B l u e = X 22 Blue = X_{22} Blue=X22 -
最后得到的像素为 1920 × 1080 1920\times1080 1920×1080。