HQResize

cvcuda.hq_resize(*args, **kwargs)

Overloaded function.

  1. hq_resize(src: nvcv.Tensor, out_size: tuple, *, antialias: Optional[bool] = False, roi: Optional[tuple] = None, interpolation: Optional[cvcuda.Interp] = None, min_interpolation: Optional[cvcuda.Interp] = None, mag_interpolation: Optional[cvcuda.Interp] = None, stream: Optional[nvcv.cuda.Stream] = None) -> nvcv.Tensor

    Executes the HQ Resize operation on the given cuda stream. The operator supports resampling for 2D (images) and 3D volumetric samples.

    See also:

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

    Args:
    src (nvcv.Tensor): Input tensor containing one or more images.

    The tensor layout must match: (N)(D)HW(C).

    out_size (tuple): Tuple of 2 or 3 ints describing the output shape in (D)HW layout. antialias (bool): If set to true, an antialiasing is enabled for scaling down. roi (Tuple): Optional bounding box describing the input’s region of interest.

    For 2D resampling it should be (lowH, lowW, highH, highW), for 3D: (lowD, lowH, lowW, highD, highH, highW). If, for some axis, the low bound is bigger than the high bound, the image is flipped across the axis.

    interpolation (cvcuda.Interp): Interpolation type used. Used both for scaling down and up,

    cannot be specified together with (min_interpolation or mag_interpolation).

    min_interpolation (cvcuda.Interp): Interpolation type used for scaling down. mag_interpolation (cvcuda.Interp): Interpolation type used for scaling up. stream (nvcv.cuda.Stream, optional): CUDA Stream on which to perform the operation.

    Returns:

    nvcv.Tensor: The output tensor.

    Caution:

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

  2. hq_resize(src: nvcv.ImageBatchVarShape, out_size: list[tuple[int, int]], *, antialias: Optional[bool] = False, roi: Optional[list[tuple]] = None, interpolation: Optional[cvcuda.Interp] = None, min_interpolation: Optional[cvcuda.Interp] = None, mag_interpolation: Optional[cvcuda.Interp] = None, stream: Optional[nvcv.cuda.Stream] = None) -> nvcv.ImageBatchVarShape

    Executes the HQ Resize operation on the given cuda stream.

    See also:

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

    Args:

    src (nvcv.ImageBatchVarShape): Input batch of images. out_size (tuple): Tuple of 2 ints describing the output shape in HW layout. antialias (bool): If set to true, an antialiasing is enabled for scaling down. roi (List[Tuple[int]]): Optional bounding boxes describing the input’s region of interest.

    It should be a list of tuples. The list length must match the number of input tensors or be 1 (so that the same ROI is used for all samples). Each tuple must be of the form (lowH, lowW, highH, highW). If, for some axis, the low bound is bigger than the high bound, the image is flipped across the axis.

    interpolation (cvcuda.Interp): Interpolation type used. Used both for scaling down and up,

    cannot be specified together with (min_interpolation or mag_interpolation).

    min_interpolation (cvcuda.Interp): Interpolation type used for scaling down. mag_interpolation (cvcuda.Interp): Interpolation type used for scaling up. stream (nvcv.cuda.Stream, optional): CUDA Stream on which to perform the operation.

    Returns:

    nvcv.ImageBatchVarShape: The batch of resized images.

    Caution:

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

  3. hq_resize(src: nvcv.TensorBatch, out_size: list[tuple], *, antialias: Optional[bool] = False, roi: Optional[list[tuple]] = None, interpolation: Optional[cvcuda.Interp] = None, min_interpolation: Optional[cvcuda.Interp] = None, mag_interpolation: Optional[cvcuda.Interp] = None, stream: Optional[nvcv.cuda.Stream] = None) -> nvcv.TensorBatch

    Executes the HQ Resize operation on the given cuda stream. The operator supports resampling for 2D (images) and 3D volumetric samples.

    See also:

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

    Args:

    src (nvcv.TensorBatch): Input batch containing one or more tensors of (D)HW(C) layout. out_size (tuple): Tuple of 2 or 3 ints describing the output shape in (D)HW layout. antialias (bool): If set to true, an antialiasing is enabled for scaling down. roi (List[Tuple[int]]): Optional bounding boxes describing the input’s region of interest.

    It should be a list of tuples. The list length must match the number of input tensors or be 1 (so that the same ROI is used for all samples). Each tuple must be of the form:

    • for 2D resampling: (lowH, lowW, highH, highW),

    • for 3D: (lowD, lowH, lowW, highD, highH, highW).

    If, for some axis, the low bound is bigger than the high bound, the tensor is flipped across the axis.

    interpolation (cvcuda.Interp): Interpolation type used. Used both for scaling down and up,

    cannot be specified together with (min_interpolation or mag_interpolation).

    min_interpolation (cvcuda.Interp): Interpolation type used for scaling down. mag_interpolation (cvcuda.Interp): Interpolation type used for scaling up. stream (nvcv.cuda.Stream, optional): CUDA Stream on which to perform the operation.

    Returns:

    nvcv.TensorBatch: The batch of resized tensors.

    Caution:

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

cvcuda.hq_resize_into(*args, **kwargs)

Overloaded function.

  1. hq_resize_into(dst: nvcv.Tensor, src: nvcv.Tensor, *, antialias: Optional[bool] = False, roi: Optional[tuple] = None, interpolation: Optional[cvcuda.Interp] = None, min_interpolation: Optional[cvcuda.Interp] = None, mag_interpolation: Optional[cvcuda.Interp] = None, stream: Optional[nvcv.cuda.Stream] = None) -> nvcv.Tensor

    Executes the HQ Resize operation on the given cuda stream. The operator supports resampling for 2D (images) and 3D volumetric samples.

    See also:

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

    Args:
    dst (nvcv.Tensor): Output tensor. It’s layout must match the src tensor.

    The size of D, H, and W extents may be different. The dst type must match the src’s type or be float32.

    src (nvcv.Tensor): Input tensor containing one or more images.

    The tensor layout must match: (N)(D)HW(C).

    antialias (bool): If set to true, an antialiasing is enabled for scaling down. roi (Tuple[int]): Optional bounding box describing the input’s region of interest.

    For 2D resampling it should be (lowH, lowW, highH, highW), for 3D: (lowD, lowH, lowW, highD, highH, highW). If, for some axis, the low bound is bigger than the high bound, the image is flipped across the axis.

    interpolation (cvcuda.Interp): Interpolation type used. Used both for scaling down and up,

    cannot be specified together with (min_interpolation or mag_interpolation).

    min_interpolation (cvcuda.Interp): Interpolation type used for scaling down. mag_interpolation (cvcuda.Interp): Interpolation type used for scaling up. stream (nvcv.cuda.Stream, optional): CUDA Stream on which to perform the operation.

    Returns:

    nvcv.Tensor: The output tensor.

    Caution:

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

  2. hq_resize_into(dst: nvcv.ImageBatchVarShape, src: nvcv.ImageBatchVarShape, *, antialias: Optional[bool] = False, roi: Optional[list[tuple]] = None, interpolation: Optional[cvcuda.Interp] = None, min_interpolation: Optional[cvcuda.Interp] = None, mag_interpolation: Optional[cvcuda.Interp] = None, stream: Optional[nvcv.cuda.Stream] = None) -> nvcv.ImageBatchVarShape

    Executes the HQ Resize operation on the given cuda stream.

    See also:

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

    Args:
    dst (nvcv.ImageBatchVarShape): Output batch. The layout must match the input batch.

    The size of D, H, and W extents may be different. The dst type must match the src’s type or be float32.

    src (nvcv.ImageBatchVarShape): Input batch of images. antialias (bool): If set to true, an antialiasing is enabled for scaling down. roi (List[Tuple[int]]): Optional bounding boxes describing the input’s region of interest.

    It should be a list of tuples. The list length must match the number of input tensors or be 1 (so that the same ROI is used for all samples). Each tuple must be of the form (lowH, lowW, highH, highW). If, for some axis, the low bound is bigger than the high bound, the image is flipped across the axis.

    interpolation (cvcuda.Interp): Interpolation type used. Used both for scaling down and up,

    cannot be specified together with (min_interpolation or mag_interpolation).

    min_interpolation (cvcuda.Interp): Interpolation type used for scaling down. mag_interpolation (cvcuda.Interp): Interpolation type used for scaling up. stream (nvcv.cuda.Stream, optional): CUDA Stream on which to perform the operation.

    Returns:

    nvcv.ImageBatchVarShape: The batch of resized images.

    Caution:

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

  3. hq_resize_into(dst: nvcv.TensorBatch, src: nvcv.TensorBatch, *, antialias: Optional[bool] = False, roi: Optional[list[tuple]] = None, interpolation: Optional[cvcuda.Interp] = None, min_interpolation: Optional[cvcuda.Interp] = None, mag_interpolation: Optional[cvcuda.Interp] = None, stream: Optional[nvcv.cuda.Stream] = None) -> nvcv.TensorBatch

    Executes the HQ Resize operation on the given cuda stream. The operator supports resampling for 2D (images) and 3D volumetric samples.

    See also:

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

    Args:
    dst (nvcv.TensorBatch): Output batch. The layout must match the input batch.

    The size of D, H, and W extents may be different. The dst type must match the src’s type or be float32.

    src (nvcv.TensorBatch): Input batch containing one or more tensors of (D)HW(C) layout. antialias (bool): If set to true, an antialiasing is enabled for scaling down. roi (List[Tuple[int]]): Optional bounding boxes describing the input’s region of interest.

    It should be a list of tuples. The list length must match the number of input tensors or be 1 (so that the same ROI is used for all samples). Each tuple must be of the form:

    • for 2D resampling: (lowH, lowW, highH, highW),

    • for 3D: (lowD, lowH, lowW, highD, highH, highW).

    If, for some axis, the low bound is bigger than the high bound, the tensor is flipped across the axis.

    interpolation (cvcuda.Interp): Interpolation type used. Used both for scaling down and up,

    cannot be specified together with (min_interpolation or mag_interpolation).

    min_interpolation (cvcuda.Interp): Interpolation type used for scaling down. mag_interpolation (cvcuda.Interp): Interpolation type used for scaling up. stream (nvcv.cuda.Stream, optional): CUDA Stream on which to perform the operation.

    Returns:

    nvcv.TensorBatch: The batch of resized tensors.

    Caution:

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