Demosaicing algorithm
dst = cv.demosaicing(src, code)
dst = cv.demosaicing(..., 'OptionName', optionValue, ...)
Input
- src source image, 1-channel,
uint8
or uint16
depth.
- code color conversion code. The following strings are supported:
- For Bayer->Gray demosaicing:
- BayerBG2GRAY
- BayerGB2GRAY
- BayerRG2GRAY
- BayerGR2GRAY
- For Bayer->RGB demosaicing:
- BayerBG2BGR, BayerBG2RGB
- BayerGB2BGR, BayerGB2RGB
- BayerRG2BGR, BayerRG2RGB
- BayerGR2BGR, BayerGR2RGB
- For Bayer->RGB demosaicing using Variable Number of Gradients:
- BayerBG2BGR_VNG, BayerBG2RGB_VNG
- BayerGB2BGR_VNG, BayerGB2RGB_VNG
- BayerRG2BGR_VNG, BayerRG2RGB_VNG
- BayerGR2BGR_VNG, BayerGR2RGB_VNG
- For Bayer->RGB Edge-Aware demosaicing:
- BayerBG2BGR_EA, BayerBG2RGB_EA
- BayerGB2BGR_EA, BayerGB2RGB_EA
- BayerRG2BGR_EA, BayerRG2RGB_EA
- BayerGR2BGR_EA, BayerGR2RGB_EA
Output
- dst output image of same row-/col- size and depth as
src
, and of
specified number of channels (see Channels
option).
Options
- Channels Number of channels. If <= 0, automatically determined based
on
code
. default 0