Module bayer::demosaic::cubic

source ·
Expand description

Demosaicing using cubic interpolation.

  green_kernel = (1 / 256) *
      [   0   0   0   1   0   0   0
      ;   0   0  -9   0  -9   0   0
      ;   0  -9   0  81   0  -9   0
      ;   1   0  81 256  81   0   1
      ;   0  -9   0  81   0  -9   0
      ;   0   0  -9   0  -9   0   0
      ;   0   0   0   1   0   0   0 ];

  red/blue_kernel = (1 / 256) *
      [   1   0  -9 -16  -9   0   1
      ;   0   0   0   0   0   0   0
      ;  -9   0  81 144  81   0  -9
      ; -16   0 144 256 144   0 -16
      ;  -9   0  81 144  81   0  -9
      ;   0   0   0   0   0   0   0
      ;   1   0  -9 -16  -9   0   1 ];

Functions§