ChannelReorder

cvcuda.channelreorder(src: nvcv.ImageBatchVarShape, order: nvcv.Tensor, *, format: nvcv.Format | None = None, stream: nvcv.cuda.Stream | None = None) nvcv.ImageBatchVarShape

Executes the Channel Reorder operation on the given cuda stream.

See also

Refer to the CV-CUDA C API reference for the Channel Reorder operator for more details and usage examples.

Parameters:
  • src (nvcv.ImageBatchVarShape) – Input tensor containing one or more images.

  • order (nvcv.Tensor) – 2D tensor with layout “NC” which specifies, for each output image sample in the batch, the index of the input channel to copy to the output channel.

  • format (nvcv.Format) – Format of the destination image.

  • stream (nvcv.cuda.Stream, optional) – CUDA Stream on which to perform the operation.

Returns:

The output image batch.

Return type:

nvcv.ImageBatchVarShape

Caution

Restrictions to several arguments may apply. Check the C API references of the CV-CUDA operator.

cvcuda.channelreorder_into(dst: nvcv.ImageBatchVarShape, src: nvcv.ImageBatchVarShape, orders: nvcv.Tensor, *, stream: nvcv.cuda.Stream | None = None) nvcv.ImageBatchVarShape

Executes the Channel Reorder operation on the given cuda stream.

See also

Refer to the CV-CUDA C API reference for the Channel Reorder operator for more details and usage examples.

Parameters:
  • dst (nvcv.ImageBatchVarShape) – Output tensor to store the result of the operation.

  • src (nvcv.ImageBatchVarShape) – Input tensor containing one or more images.

  • order (nvcv.Tensor) – 2D tensor with layout “NC” which specifies, for each output image sample in the batch, the index of the input channel to copy to the output channel.

  • format (nvcv.Format) – Format of the destination image.

  • stream (nvcv.cuda.Stream, optional) – CUDA Stream on which to perform the operation.

Returns:

None

Caution

Restrictions to several arguments may apply. Check the C API references of the CV-CUDA operator.