vpi.Image.mixchannels

Image.mixchannels(self: vpi.Image, mappingIn: numpy.ndarray[numpy.int32], mappingOut: numpy.ndarray[numpy.int32], *, backend: vpi.Backend = vpi.Backend.DEFAULT, out: vpi.Image = None, stream: vpi.Stream = None) vpi.Image

Runs mix channels on single input/output images.

See also

Refer to the algorithm explanation for more details and usage examples.

Parameters
  • mappingIn (1D array of int) – The mapping defines indices indicating channels from the input image.

  • mappingOut (1D array of int) – The mapping defines indices indicating channels from the output image, e.g. mappingIn = [2, 1, 0] on an RGB input image and mappingOut = [0, 1, 2] produces a BGR output image by swapping R and B channels and keeping G at the same place.

  • out (vpi.Image, optional) – The output image of the algorithm.

  • backend (vpi.Backend, optional) – The backend to be used by the algorithm.

  • stream (vpi.Stream, optional) – The stream to be used by the algorithm.

Returns

The output of the algorithm.

Return type

vpi.Image

Caution

Restrictions to several arguments may apply. Check the C API references of the submit function and the group concepts for more details.