RPP geometric augmentations#

RppStatus rppt_crop(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

Crop augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.

The crop augmentation crops each image to a given ROI, for a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.

  • srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).

  • dstPtr depth ranges - Will be same depth as srcPtr.

    Sample Input

    Sample Input#

    Sample Output

    Sample Output#

Parameters:
  • srcPtr – [in] source tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcDescPtr – [in] source tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 1/3)

  • dstPtr – [out] destination tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • dstDescPtr – [in] destination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)

  • roiTensorPtrSrc – [in] ROI data in HIP memory (for HIP backend) or HOST memory (for HOST backend), for each image in source tensor (2D tensor of size batchSize * 4, in either format - XYWH(xy.x, xy.y, roiWidth, roiHeight) or LTRB(lt.x, lt.y, rb.x, rb.y))

  • roiType – [in] ROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)

  • rppHandle – [in] RPP HIP/HOST handle created with rppCreate()

  • executionBackend – [in] backend for execution (RppBackend::RPP_HOST_BACKEND or RppBackend::RPP_HIP_BACKEND)

Return values:
  • RPP_SUCCESS – Successful completion.

  • RPP_ERROR* – Unsuccessful completion.

Returns:

A RppStatus enumeration.

RppStatus rppt_crop_mirror_normalize(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *offsetTensor, Rpp32f *multiplierTensor, Rpp32u *mirrorTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

Crop mirror normalize augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.

The crop mirror normalize augmentation crops each image to a given ROI, does an optional mirror and/or normalize for a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.

  • srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).

  • dstPtr depth ranges - Will be same depth as srcPtr.

    Sample Input

    Sample Input#

    Sample Output

    Sample Output#

Parameters:
  • srcPtr – [in] source tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcDescPtr – [in] source tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 1/3)

  • dstPtr – [out] destination tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • dstDescPtr – [in] destination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)

  • offsetTensor – [in] offset values for normalization (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize, with offsetTensor[n] <= 0)

  • multiplierTensor – [in] multiplier values for normalization (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize, with multiplierTensor[n] > 0)

  • mirrorTensor – [in] mirror flag values to set mirroring on/off (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize, with mirrorTensor[n] = 0/1)

  • roiTensorPtrSrc – [in] ROI data in HIP memory (for HIP backend) or HOST memory (for HOST backend), for each image in source tensor (2D tensor of size batchSize * 4, in either format - XYWH(xy.x, xy.y, roiWidth, roiHeight) or LTRB(lt.x, lt.y, rb.x, rb.y))

  • roiType – [in] ROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)

  • rppHandle – [in] RPP HIP/HOST handle created with rppCreate()

  • executionBackend – [in] backend for execution (RppBackend::RPP_HOST_BACKEND or RppBackend::RPP_HIP_BACKEND)

Return values:
  • RPP_SUCCESS – Successful completion.

  • RPP_ERROR* – Unsuccessful completion.

Returns:

A RppStatus enumeration.

RppStatus rppt_warp_affine(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *affineTensor, RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

Warp affine augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.

The warp affine augmentation performs affine transformations for a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.

  • srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).

  • dstPtr depth ranges - Will be same depth as srcPtr.

    Sample Input

    Sample Input#

    Sample Output

    Sample Output#

Parameters:
  • srcPtr – [in] source tensor in HIP/HOST memory

  • srcDescPtr – [in] source tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 1/3)

  • dstPtr – [out] destination tensor in HIP/HOST memory

  • dstDescPtr – [in] destination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)

  • affineTensor – [in] affine matrix values for transformation calculation (2D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize * 6 for each image in batch)

  • interpolationType – [in] Interpolation type used (RpptInterpolationType::XYWH or RpptRoiType::LTRB)

  • roiTensorPtrSrc – [in] ROI data in HIP memory (for HIP backend) or HOST memory (for HOST backend), for each image in source tensor (2D tensor of size batchSize * 4, in either format - XYWH(xy.x, xy.y, roiWidth, roiHeight) or LTRB(lt.x, lt.y, rb.x, rb.y))

  • roiType – [in] ROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)

  • rppHandle – [in] RPP HIP/HOST handle created with rppCreate()

  • executionBackend – [in] backend for execution (RppBackend::RPP_HOST_BACKEND or RppBackend::RPP_HIP_BACKEND)

Return values:
  • RPP_SUCCESS – Successful completion.

  • RPP_ERROR* – Unsuccessful completion.

Returns:

A RppStatus enumeration.

RppStatus rppt_flip(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32u *horizontalTensor, Rpp32u *verticalTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

Flip augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.

The flip augmentation performs a mask-controlled horizontal/vertical flip for a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.

  • srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).

  • dstPtr depth ranges - Will be same depth as srcPtr.

    Sample Input

    Sample Input#

    Sample Output

    Sample Output#

Parameters:
  • srcPtr – [in] source tensor in HIP/HOST memory

  • srcDescPtr – [in] source tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 1/3)

  • dstPtr – [out] destination tensor in HIP/HOST memory

  • dstDescPtr – [in] destination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)

  • horizontalTensor – [in] horizontal flag values to set horizontal flip on/off (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize, with horizontalTensor[i] = 0/1)

  • verticalTensor – [in] vertical flag values to set vertical flip on/off (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize, with verticalTensor[i] = 0/1)

  • roiTensorPtrSrc – [in] ROI data in HIP memory (for HIP backend) or HOST memory (for HOST backend), for each image in source tensor (2D tensor of size batchSize * 4, in either format - XYWH(xy.x, xy.y, roiWidth, roiHeight) or LTRB(lt.x, lt.y, rb.x, rb.y))

  • roiType – [in] ROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)

  • rppHandle – [in] RPP HIP/HOST handle created with rppCreate()

  • executionBackend – [in] backend for execution (RppBackend::RPP_HOST_BACKEND or RppBackend::RPP_HIP_BACKEND)

Return values:
  • RPP_SUCCESS – Successful completion.

  • RPP_ERROR* – Unsuccessful completion.

Returns:

A RppStatus enumeration.

RppStatus rppt_resize(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptImagePatchPtr dstImgSizes, RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

Resize augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.

The resize augmentation performs an image resize for a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.

  • srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).

  • dstPtr depth ranges - Will be same depth as srcPtr.

    Sample Input

    Sample Input#

    Sample Output

    Sample Output#

Parameters:
  • srcPtr – [in] source tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcDescPtr – [in] source tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 1/3)

  • dstPtr – [out] destination tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • dstDescPtr – [in] destination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)

  • dstImgSizes – [in] destination image sizes ( RpptImagePatchPtr type pointer to array, in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize)

  • interpolationType – [in] Interpolation type used in RpptInterpolationType

  • roiTensorPtrSrc – [in] ROI data in HIP memory (for HIP backend) or HOST memory (for HOST backend), for each image in source tensor (2D tensor of size batchSize * 4, in either format - XYWH(xy.x, xy.y, roiWidth, roiHeight) or LTRB(lt.x, lt.y, rb.x, rb.y))

  • roiType – [in] ROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)

  • rppHandle – [in] RPP HIP/HOST handle created with rppCreate()

  • executionBackend – [in] backend for execution (RppBackend::RPP_HOST_BACKEND or RppBackend::RPP_HIP_BACKEND)

Return values:
  • RPP_SUCCESS – Successful completion.

  • RPP_ERROR* – Unsuccessful completion.

Returns:

A RppStatus enumeration.

RppStatus rppt_resize_mirror_normalize(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptImagePatchPtr dstImgSizes, RpptInterpolationType interpolationType, Rpp32f *meanTensor, Rpp32f *stdDevTensor, Rpp32u *mirrorTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

Resize mirror normalize augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.

The resize mirror normalize augmentation performs an image resize, an optional mirror and/or normalize, for a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.

  • srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).

  • dstPtr depth ranges - Will be same depth as srcPtr.

    Sample Input

    Sample Input#

    Sample Output

    Sample Output#

Parameters:
  • srcPtr – [in] source tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcDescPtr – [in] source tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 1/3)

  • dstPtr – [out] destination tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • dstDescPtr – [in] destination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)

  • dstImgSizes – [in] destination image sizes ( RpptImagePatchPtr type pointer to array, in HOST memory, of size batchSize)

  • interpolationType – [in] Interpolation type used in RpptInterpolationType

  • meanTensor – [in] mean value for each image in the batch (meanTensor[n] >= 0, 1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size = batchSize for greyscale images, size = batchSize * 3 for RGB images))

  • stdDevTensor – [in] standard deviation value for each image in the batch (stdDevTensor[n] >= 0, 1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size = batchSize for greyscale images, size = batchSize * 3 for RGB images)

  • mirrorTensor – [in] mirror flag value to set mirroring on/off (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize, with mirrorTensor[n] = 0/1)

  • roiTensorPtrSrc – [in] ROI data in HIP memory (for HIP backend) or HOST memory (for HOST backend), for each image in source tensor (2D tensor of size batchSize * 4, in either format - XYWH(xy.x, xy.y, roiWidth, roiHeight) or LTRB(lt.x, lt.y, rb.x, rb.y))

  • roiType – [in] ROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)

  • rppHandle – [in] RPP HIP/HOST handle created with rppCreate()

  • executionBackend – [in] backend for execution (RppBackend::RPP_HOST_BACKEND or RppBackend::RPP_HIP_BACKEND)

Return values:
  • RPP_SUCCESS – Successful completion.

  • RPP_ERROR* – Unsuccessful completion.

Returns:

A RppStatus enumeration.

RppStatus rppt_resize_crop_mirror(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptImagePatchPtr dstImgSizes, RpptInterpolationType interpolationType, Rpp32u *mirrorTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

Resize crop mirror augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.

The resize crop mirror augmentation performs an image resized crop, with an optional mirror, for a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.

  • srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).

  • dstPtr depth ranges - Will be same depth as srcPtr.

    Sample Input

    Sample Input#

    Sample Output

    Sample Output#

Parameters:
  • srcPtr – [in] source tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcDescPtr – [in] source tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 1/3)

  • dstPtr – [out] destination tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • dstDescPtr – [in] destination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)

  • dstImgSizes – [in] destination image sizes ( RpptImagePatchPtr type pointer to array, in HOST memory, of size batchSize)

  • interpolationType – [in] Interpolation type used in RpptInterpolationType

  • mirrorTensor – [in] mirror flag value to set mirroring on/off (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize, with mirrorTensor[n] = 0/1)

  • roiTensorPtrSrc – [in] ROI data in HIP memory (for HIP backend) or HOST memory (for HOST backend), for each image in source tensor (2D tensor of size batchSize * 4, in either format - XYWH(xy.x, xy.y, roiWidth, roiHeight) or LTRB(lt.x, lt.y, rb.x, rb.y))

  • roiType – [in] ROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)

  • rppHandle – [in] RPP HIP/HOST handle created with rppCreate()

  • executionBackend – [in] backend for execution (RppBackend::RPP_HOST_BACKEND or RppBackend::RPP_HIP_BACKEND)

Return values:
  • RPP_SUCCESS – Successful completion.

  • RPP_ERROR* – Unsuccessful completion.

Returns:

A RppStatus enumeration.

RppStatus rppt_rotate(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *angle, RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

Rotate augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.

The rotate augmentation performs a rotate transformations for a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.

  • srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).

  • dstPtr depth ranges - Will be same depth as srcPtr.

    Sample Input

    Sample Input#

    Sample Output

    Sample Output#

Parameters:
  • srcPtr – [in] source tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcDescPtr – [in] source tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 1/3)

  • dstPtr – [out] destination tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • dstDescPtr – [in] destination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)

  • angle – [in] image rotation angle in degrees - positive deg-anticlockwise/negative deg-clockwise (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize)

  • interpolationType – [in] Interpolation type used (RpptInterpolationType::XYWH or RpptRoiType::LTRB)

  • roiTensorPtrSrc – [in] ROI data in HIP memory (for HIP backend) or HOST memory (for HOST backend), for each image in source tensor (2D tensor of size batchSize * 4, in either format - XYWH(xy.x, xy.y, roiWidth, roiHeight) or LTRB(lt.x, lt.y, rb.x, rb.y))

  • roiType – [in] ROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)

  • rppHandle – [in] RPP HIP/HOST handle created with rppCreate()

  • executionBackend – [in] execution backend to run the augmentation on (RppBackend::RPP_HOST_BACKEND or RppBackend::RPP_HIP_BACKEND)

Return values:
  • RPP_SUCCESS – Successful completion.

  • RPP_ERROR* – Unsuccessful completion.

Returns:

A RppStatus enumeration.

RppStatus rppt_phase(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

Phase augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.

The phase augmentation computes phase of corresponding pixels for a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.

  • srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).

  • dstPtr depth ranges - Will be same depth as srcPtr.

    Sample Input1

    Sample Input1#

    Sample Input2

    Sample Input2#

    Sample Output

    Sample Output#

Parameters:
  • srcPtr1 – [in] source1 tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcPtr2 – [in] source2 tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcDescPtr – [in] source tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 1/3)

  • dstPtr – [out] destination tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • dstDescPtr – [in] destination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)

  • roiTensorPtrSrc – [in] ROI data in HIP memory (for HIP backend) or HOST memory (for HOST backend), for each image in source tensor (2D tensor of size batchSize * 4, in either format - XYWH(xy.x, xy.y, roiWidth, roiHeight) or LTRB(lt.x, lt.y, rb.x, rb.y))

  • roiType – [in] ROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)

  • rppHandle – [in] RPP HIP/HOST handle created with rppCreate()

  • executionBackend – [in] execution backend to run the augmentation on (RppBackend::RPP_HOST_BACKEND or RppBackend::RPP_HIP_BACKEND)

Return values:
  • RPP_SUCCESS – Successful completion.

  • RPP_ERROR* – Unsuccessful completion.

Returns:

A RppStatus enumeration.

RppStatus rppt_slice(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32s *anchorTensor, Rpp32s *shapeTensor, RppPtr_t fillValue, bool enablePadding, Rpp32u *roiTensor, rppHandle_t rppHandle, RppBackend executionBackend)#

Slice augmentation on HIP/HOST backend.

This function performs slice augmentation on a generic 4D tensor. Slice augmentation involves selecting a region of interest (ROI) from the source tensor and copying it to the destination tensor. Support added for f32 -> f32 and u8 -> u8 dataypes.

Parameters:
  • srcPtr – [in] source tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcGenericDescPtr – [in] source tensor descriptor

  • dstPtr – [out] destination tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • dstGenericDescPtr – [in] destination tensor descriptor

  • anchorTensor – [in] starting index of the slice for each dimension in input (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size = batchSize * numberOfDimensions)

  • shapeTensor – [in] length of the slice for each dimension in input (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size = batchSize * numberOfDimensions)

  • fillValue – [in] fill value that is used to fill output if enablePadding is set to true

  • enablePadding – [in] boolean flag to specify if padding is enabled or not

  • roiTensor – [in] roi data in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend) (1D tensor of size = batchSize * numberOfDimensions * 2)

  • rppHandle – [in] RPP HIP/HOST handle created with rppCreate()

  • executionBackend – [in] execution backend to run the augmentation on (RppBackend::RPP_HOST_BACKEND or RppBackend::RPP_HIP_BACKEND)

Return values:
  • RPP_SUCCESS – Successful completion.

  • RPP_ERROR* – Unsuccessful completion.

Returns:

A RppStatus enumeration.

RppStatus rppt_crop_and_patch(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrDst, RpptROIPtr cropRoiTensor, RpptROIPtr patchRoiTensor, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

Crop and Patch augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.

The crop and patch augmentation crops a ROI from 1st image and patches the cropped region in 2nd image as per the patch co-ordinates for a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.

  • srcPtr1 depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).

  • srcPtr2 depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).

  • dstPtr depth ranges - Will be same depth as srcPtr.

    Sample Input1

    Sample Input1#

    Sample Input2

    Sample Input2#

    Sample Output

    Sample Output#

Parameters:
  • srcPtr1 – [in] source tensor1 in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcPtr2 – [in] source tensor2 in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcDescPtr – [in] source tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 1/3)

  • dstPtr – [out] destination tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • dstDescPtr – [in] destination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)

  • roiTensorPtrDst – [in] ROI data in HIP memory (for HIP backend) or HOST memory (for HOST backend), for each image in destination tensor (2D tensor of size batchSize * 4, in either format - XYWH(xy.x, xy.y, roiWidth, roiHeight) or LTRB(lt.x, lt.y, rb.x, rb.y))

  • cropRoiTensor – [in] crop co-ordinates in HIP memory (for HIP backend) or HOST memory (for HOST backend), for each image in source tensor (2D tensor of size batchSize * 4, in either format - XYWH(xy.x, xy.y, roiWidth, roiHeight) or LTRB(lt.x, lt.y, rb.x, rb.y))

  • patchRoiTensor – [in] patch co-ordinates in HIP memory (for HIP backend) or HOST memory (for HOST backend), for each image in source tensor (2D tensor of size batchSize * 4, in either format - XYWH(xy.x, xy.y, roiWidth, roiHeight) or LTRB(lt.x, lt.y, rb.x, rb.y))

  • roiType – [in] ROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)

  • rppHandle – [in] RPP HIP/HOST handle created with rppCreate()

  • executionBackend – [in] execution backend to run the augmentation on (RppBackend::RPP_HOST_BACKEND or RppBackend::RPP_HIP_BACKEND)

Return values:
  • RPP_SUCCESS – Successful completion.

  • RPP_ERROR* – Unsuccessful completion.

Returns:

A RppStatus enumeration.

RppStatus rppt_flip_voxel(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32u *horizontalTensor, Rpp32u *verticalTensor, Rpp32u *depthTensor, RpptROI3DPtr roiGenericPtrSrc, RpptRoi3DType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

Flip voxel augmentation on HIP/HOST backend.

The flip voxel augmentation performs a mask-controlled horizontal/vertical/depth flip on a generic 4D tensor.

Support added for f32 -> f32 and u8 -> u8 dataypes.

Sample Input

Sample Input#

Sample Output

Sample Output#

Parameters:
  • srcPtr – [in] source tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcGenericDescPtr – [in] source tensor descriptor (Restrictions - numDims = 5, offsetInBytes >= 0, dataType = U8/F32, layout = NCDHW/NDHWC, c = 1/3)

  • dstPtr – [out] destination tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • dstGenericDescPtr – [in] destination tensor descriptor (Restrictions - numDims = 5, offsetInBytes >= 0, dataType = U8/F32, layout = NCDHW/NDHWC, c = 1/3)

  • horizontalTensor – [in] horizontal flag values to set horizontal flip on/off (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize, with horizontalTensor[i] = 0/1)

  • verticalTensor – [in] vertical flag values to set vertical flip on/off (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize, with verticalTensor[i] = 0/1)

  • depthTensor – [in] depth flag values to set depth flip on/off (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize, with depthTensor[i] = 0/1)

  • roiGenericPtrSrc – [in] ROI data for each image in source tensor (tensor of batchSize RpptRoiGeneric values)

  • roiType – [in] ROI type used (RpptRoi3DType::XYZWHD or RpptRoi3DType::LTFRBB)

  • rppHandle – [in] RPP HIP/HOST handle created with rppCreate()

  • executionBackend – [in] execution backend to run the augmentation on (RppBackend::RPP_HOST_BACKEND or RppBackend::RPP_HIP_BACKEND)

Return values:
  • RPP_SUCCESS – Successful completion.

  • RPP_ERROR* – Unsuccessful completion.

Returns:

A RppStatus enumeration.

RppStatus rppt_remap(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *rowRemapTable, Rpp32f *colRemapTable, RpptDescPtr tableDescPtr, RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

Remap augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.

Performs a remap operation using user specified remap tables for a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout. For each image, the output(x,y) = input(mapx(x, y), mapy(x, y)) for every (x,y) in the destination image.

  • srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).

  • dstPtr depth ranges - Will be same depth as srcPtr.

    Sample Input

    Sample Input#

    Sample Output

    Sample Output#

Parameters:
  • srcPtr – [in] source tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcDescPtr – [in] source tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 1/3)

  • dstPtr – [out] destination tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • dstDescPtr – [in] destination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)

  • rowRemapTable – [in] Rpp32f row numbers in HIP memory (for HIP backend) or HOST memory (for HOST backend) for every pixel in the input batch of images (Restrictions - rois in the rowRemapTable data for each image in batch must match roiTensorPtrSrc)

  • colRemapTable – [in] Rpp32f column numbers in HIP memory (for HIP backend) or HOST memory (for HOST backend) for every pixel in the input batch of images (Restrictions - rois in the colRemapTable data for each image in batch must match roiTensorPtrSrc)

  • tableDescPtr – [in] rowRemapTable and colRemapTable common tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = F32, layout = NHWC, c = 1)

  • interpolationType – [in] Interpolation type used in RpptInterpolationType (Restrictions - Supports only NEAREST_NEIGHBOR and BILINEAR)

  • roiTensorPtrSrc – [in] ROI data in HIP memory (for HIP backend) or HOST memory (for HOST backend), for each image in source tensor (2D tensor of size batchSize * 4, in either format - XYWH(xy.x, xy.y, roiWidth, roiHeight) or LTRB(lt.x, lt.y, rb.x, rb.y))

  • roiType – [in] ROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)

  • rppHandle – [in] RPP HIP/HOST handle created with rppCreate()

  • executionBackend – [in] backend for execution (RppBackend::RPP_HOST_BACKEND or RppBackend::RPP_HIP_BACKEND)

Return values:
  • RPP_SUCCESS – Successful completion.

  • RPP_ERROR* – Unsuccessful completion. group_tensor_geometric

Returns:

A RppStatus enumeration.

RppStatus rppt_lens_correction(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *rowRemapTable, Rpp32f *colRemapTable, RpptDescPtr tableDescPtr, Rpp32f *cameraMatrixTensor, Rpp32f *distortionCoeffsTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

Lens correction transformation on HIP/HOST backend for a NCHW/NHWC layout tensor.

Performs lens correction transforms on an image to compensate barrel lens distortion of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.

  • srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).

  • dstPtr depth ranges - Will be same depth as srcPtr. Note: Returns a black image if the passed camera matrix has a 0 determinant

    Sample Input

    Sample Input#

    Sample Output

    Sample Output#

  • batchSize)

Parameters:
  • srcPtr – [in] source tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcDescPtr – [in] source tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 1/3)

  • dstPtr – [out] destination tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • dstDescPtr – [in] destination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)

  • rowRemapTable – [in] Rpp32f row numbers in HIP memory (for HIP backend) or HOST memory (for HOST backend) for every pixel in the input batch of images (1D tensor of size width * height * batchSize)

  • colRemapTable – [in] Rpp32f column numbers in HIP memory (for HIP backend) or HOST memory (for HOST backend) for every pixel in the input batch of images (1D tensor of size width * height * batchSize)

  • tableDescPtr – [in] table tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = F32, layout = NHWC, c = 1)

  • cameraMatrixTensor – [in] contains camera intrinsic parameters required to compute lens corrected image. (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size 9

  • distortionCoeffsTensor – [in] contains distortion coefficients required to compute lens corrected image. (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size 8 * batchSize)

  • roiTensorPtrSrc – [in] ROI data in HIP memory (for HIP backend) or HOST memory (for HOST backend), for each image in source tensor (2D tensor of size batchSize * 4, in either format - XYWH(xy.x, xy.y, roiWidth, roiHeight) or LTRB(lt.x, lt.y, rb.x, rb.y))

  • roiType – [in] ROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)

  • rppHandle – [in] RPP HIP/HOST handle created with rppCreate()

  • executionBackend – [in] backend for execution (RppBackend::RPP_HOST_BACKEND or RppBackend::RPP_HIP_BACKEND)

Return values:
  • RPP_SUCCESS – Successful completion.

  • RPP_ERROR* – Unsuccessful completion. group_tensor_geometric

Returns:

A RppStatus enumeration.

RppStatus rppt_transpose(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32u *permTensor, Rpp32u *roiTensor, rppHandle_t rppHandle, RppBackend executionBackend)#

Transpose Generic augmentation on HIP/HOST backend.

The transpose augmentation performs an input-permutation based transpose on a generic ND Tensor.

Parameters:
  • srcPtr – [in] source tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcGenericDescPtr – [in] source tensor descriptor

  • dstPtr – [out] destination tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • dstGenericDescPtr – [in] destination tensor descriptor

  • permTensor – [in] permutation tensor for transpose operation in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • roiTensor – [in] ROI data in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend) for each element in source tensor (tensor of batchSize * number of dimensions * 2 values)

  • rppHandle – [in] RPP HIP/HOST handle created with rppCreate()

  • executionBackend – [in] backend for execution (RppBackend::RPP_HOST_BACKEND or RppBackend::RPP_HIP_BACKEND)

Return values:
  • RPP_SUCCESS – Successful completion.

  • RPP_ERROR* – Unsuccessful completion. group_tensor_geometric

Returns:

A RppStatus enumeration.

RppStatus rppt_warp_perspective(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *perspectiveTensor, RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

Warp perspective augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.

The warp perspective performs perspective transformations for a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.

  • srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).

  • dstPtr depth ranges - Will be same depth as srcPtr.

    Sample Input

    Sample Input#

    Sample Output

    Sample Output#

Parameters:
  • srcPtr – [in] source tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcDescPtr – [in] source tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 1/3)

  • dstPtr – [out] destination tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • dstDescPtr – [in] destination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)

  • perspectiveTensor – [in] perspective matrix values for transformation calculation (2D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize * 9 for each image in batch)

  • interpolationType – [in] Interpolation type used (RpptInterpolationType::BILINEAR or RpptRoiType::NEAREST_NEIGHBOR)

  • roiTensorPtrSrc – [in] ROI data in HIP memory (for HIP backend) or HOST memory (for HOST backend), for each image in source tensor (2D tensor of size batchSize * 4, in either format - XYWH(xy.x, xy.y, roiWidth, roiHeight) or LTRB(lt.x, lt.y, rb.x, rb.y))

  • roiType – [in] ROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)

  • rppHandle – [in] RPP HIP/HOST handle created with rppCreate()

  • executionBackend – [in] backend for execution (RppBackend::RPP_HOST_BACKEND or RppBackend::RPP_HIP_BACKEND)

Return values:
  • RPP_SUCCESS – Successful completion.

  • RPP_ERROR* – Unsuccessful completion.

Returns:

A RppStatus enumeration.

RppStatus rppt_concat(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptGenericDescPtr srcPtr1GenericDescPtr, RpptGenericDescPtr srcPtr2GenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32u axisMask, Rpp32u *srcPtr1roiTensor, Rpp32u *srcPtr2roiTensor, rppHandle_t rppHandle, RppBackend executionBackend)#

Concat Generic augmentation on HIP/HOST backend.

Concatenates two 2D, 3D or ND tensors in HIP/HOST memory along a specified axis. It is optimized for 2D and 3D tensors, ensuring that all dimensions except the concatenation axis must match.

Parameters:
  • srcPtr1 – [in] source tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcPtr2 – [in] source tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcPtr1GenericDescPtr – [in] source tensor descriptor for the input tensor srcPtr1

  • srcPtr2GenericDescPtr – [in] source tensor descriptor for the input tensor srcPtr2

  • dstPtr – [out] destination tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • dstGenericDescPtr – [in] destination tensor descriptor

  • axisMask – [in] axis along which concat needs to be done

  • srcPtr1roiTensor – [in] values to represent dimensions of input tensor srcPtr1 in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcPtr2roiTensor – [in] values to represent dimensions of input tensor srcPtr2 in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • rppHandle – [in] RPP HIP/HOST handle created with rppCreateWithBatchSize()

  • executionBackend – [in] backend for execution (RppBackend::RPP_HOST_BACKEND or RppBackend::RPP_HIP_BACKEND)

Return values:
  • RPP_SUCCESS – Successful completion.

  • RPP_ERROR* – Unsuccessful completion.

Returns:

A RppStatus enumeration.

RppStatus rppt_jpeg_compression_distortion(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32s *qualityTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

JPEG Compression Distortion on HIP/HOST backend.

This function simulates JPEG compression distortion on an image tensor. It introduces artifacts seen in lossy JPEG compression by converting the image to the frequency domain using the Discrete Cosine Transform (DCT), applying quantization, and then reconstructing the image using the inverse DCT (IDCT). This process introduces compression-related distortions similar to those in JPEG images.

Sample Input

Sample Input#

Sample Output

Sample Output#

Parameters:
  • srcPtr – [in] source tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcGenericDescPtr – [in] source tensor descriptor

  • dstPtr – [out] destination tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • dstGenericDescPtr – [in] destination tensor descriptor

  • qualityTensor – [in] JPEG quality factor controlling the level of compression (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend)). Valid range is 1 to 99 (inclusive).

  • roiTensorPtrSrc – [in] ROI data in HIP memory (for HIP backend) or HOST memory (for HOST backend), for each image in source tensor (2D tensor of size batchSize * 4, in either format - XYWH(xy.x, xy.y, roiWidth, roiHeight) or LTRB(lt.x, lt.y, rb.x, rb.y))

  • roiType – [in] ROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)

  • rppHandle – [in] RPP HIP/HOST handle created with rppCreate()

  • executionBackend – [in] backend for execution (RppBackend::RPP_HOST_BACKEND or RppBackend::RPP_HIP_BACKEND)

Return values:
  • RPP_SUCCESS – Successful completion.

  • RPP_ERROR* – Unsuccessful completion. group_tensor_geometric

Returns:

A RppStatus enumeration.

RppStatus rppt_fisheye(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

Fisheye augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.

The Fisheye augmentation applies fisheye effect for a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.

  • srcPtr depth ranges - Rpp8u (0 to 255), Rpp16f (0 to 1), Rpp32f (0 to 1), Rpp8s (-128 to 127).

  • dstPtr depth ranges - Will be same depth as srcPtr.

    Sample Input

    Sample Input#

    Sample Output

    Sample Output#

Parameters:
  • srcPtr – [in] source tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • srcDescPtr – [in] source tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 1/3)

  • dstPtr – [out] destination tensor in HIP memory (for HIP backend) or HOST memory (for HOST backend)

  • dstDescPtr – [in] destination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)

  • roiTensorPtrSrc – [in] ROI data in HIP memory (for HIP backend) or HOST memory (for HOST backend), for each image in source tensor (2D tensor of size batchSize * 4, in either format - XYWH(xy.x, xy.y, roiWidth, roiHeight) or LTRB(lt.x, lt.y, rb.x, rb.y))

  • roiType – [in] ROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)

  • rppHandle – [in] RPP HIP/HOST handle created with rppCreate()

  • executionBackend – [in] backend for execution (RppBackend::RPP_HOST_BACKEND or RppBackend::RPP_HIP_BACKEND)

Return values:
  • RPP_SUCCESS – Successful completion.

  • RPP_ERROR* – Unsuccessful completion.

Returns:

A RppStatus enumeration.