vpi.mixchannels

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

Runs mix channels on multiple inputs/outputs.

See also

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

Parameters
  • inputs (List[vpi.Image]) – The input images of the algorithm.

  • outputs (List[vpi.Image]) – The output images of the algorithm.

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

  • mappingOut (1D array of int) – The mapping defines indices indicating channels from the output images, 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.

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

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

Caution

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