Function async_cuda_npp::resize::resize

source ·
pub async fn resize(
    input: &DeviceBuffer2D<u8>,
    input_region: Region,
    output: &mut DeviceBuffer2D<u8>,
    output_region: Region,
    stream: &Stream
) -> Result<(), Error>
Expand description

Resize an image using bilinear interpolation. This function expects a reference to a device image for input, and a mutable reference to a device image to place the output in.

This function assumes the following about the input and output images:

  • Images are in RGB format.
  • Images are in standard memory order, i.e. HWC.

Stream ordered semantics

This function uses stream ordered semantics. It can only be guaranteed to complete sequentially relative to operations scheduled on the same stream or the default stream.

Arguments

  • input - The on-device input image.
  • input_region - Specify region of interest in input image. This can be used to combine crop and resize in a single operation.
  • output_region - Specify region of interest in input image.
  • output - The on-device output image.
  • stream - Stream to use.