:param dcn:Number of channels in the destination image. If the parameter is 0, the number of the channels is derived automatically from ``src`` and the ``code`` .
:param stream:Stream for the asynchronous version.
3-channel color spaces (like ``HSV``, ``XYZ``, and so on) can be stored in a 4-channel image for better performance.
Converts an image from Bayer pattern to RGB or grayscale.
..ocv:function:: void gpu::demosaicing(InputArray src, OutputArray dst, int code, int dcn = -1, Stream& stream = Stream::Null())
:param src:Source image (8-bit or 16-bit single channel).
:param dst:Destination image.
:param code:Color space conversion code (see the description below).
:param dcn:Number of channels in the destination image. If the parameter is 0, the number of the channels is derived automatically from ``src`` and the ``code`` .
:param stream:Stream for the asynchronous version.
The function can do the following transformations:
:param image:Source image. Supports only ``CV_8UC4`` type.
:param dstOrder:Integer array describing how channel values are permutated. The n-th entry of the array contains the number of the channel that is stored in the n-th channel of the output image. E.g. Given an RGBA image, aDstOrder = [3,2,1,0] converts this to ABGR channel order.
:param stream:Stream for the asynchronous version.
The methods support arbitrary permutations of the original channels, including replication.