/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rpp/checkouts/develop/include/rppt_tensor_geometric_augmentations.h File Reference

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rpp/checkouts/develop/include/rppt_tensor_geometric_augmentations.h File Reference#

RPP: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rpp/checkouts/develop/include/rppt_tensor_geometric_augmentations.h File Reference
rppt_tensor_geometric_augmentations.h File Reference

RPPT Tensor Operations - Geometric Augmentations. More...

#include "rpp.h"
#include "rppdefs.h"

Go to the source code of this file.

Functions

RppStatus rppt_crop_host (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Crop augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_crop_gpu (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Crop augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_crop_mirror_normalize_host (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *offsetTensor, Rpp32f *multiplierTensor, Rpp32u *mirrorTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Crop mirror normalize augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_crop_mirror_normalize_gpu (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *offsetTensor, Rpp32f *multiplierTensor, Rpp32u *mirrorTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Crop mirror normalize augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_warp_affine_host (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *affineTensor, RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Warp affine augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_warp_affine_gpu (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *affineTensor, RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Warp affine augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_flip_host (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32u *horizontalTensor, Rpp32u *verticalTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Flip augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_flip_gpu (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32u *horizontalTensor, Rpp32u *verticalTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Flip augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_resize_host (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptImagePatchPtr dstImgSizes, RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Resize augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_resize_gpu (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptImagePatchPtr dstImgSizes, RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Resize augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_resize_mirror_normalize_host (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)
 Resize mirror normalize augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_resize_mirror_normalize_gpu (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)
 Resize mirror normalize augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_resize_crop_mirror_host (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptImagePatchPtr dstImgSizes, RpptInterpolationType interpolationType, Rpp32u *mirrorTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Resize crop mirror augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_resize_crop_mirror_gpu (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptImagePatchPtr dstImgSizes, RpptInterpolationType interpolationType, Rpp32u *mirrorTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Resize crop mirror augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_rotate_host (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *angle, RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Rotate augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_rotate_gpu (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *angle, RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Rotate augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_phase_host (RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Phase augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_phase_gpu (RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Phase augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_slice_host (RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32s *anchorTensor, Rpp32s *shapeTensor, RppPtr_t fillValue, bool enablePadding, Rpp32u *roiTensor, rppHandle_t rppHandle)
 Slice augmentation HOST. More...
 
RppStatus rppt_slice_gpu (RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32s *anchorTensor, Rpp32s *shapeTensor, RppPtr_t fillValue, bool enablePadding, Rpp32u *roiTensor, rppHandle_t rppHandle)
 Slice augmentation GPU. More...
 
RppStatus rppt_crop_and_patch_host (RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrDst, RpptROIPtr cropRoi, RpptROIPtr patchRoi, RpptRoiType roiType, rppHandle_t rppHandle)
 Crop and Patch augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_crop_and_patch_gpu (RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrDst, RpptROIPtr cropRoi, RpptROIPtr patchRoi, RpptRoiType roiType, rppHandle_t rppHandle)
 Crop and Patch augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_flip_voxel_host (RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32u *horizontalTensor, Rpp32u *verticalTensor, Rpp32u *depthTensor, RpptROI3DPtr roiGenericPtrSrc, RpptRoi3DType roiType, rppHandle_t rppHandle)
 Flip voxel augmentation HOST. More...
 
RppStatus rppt_flip_voxel_gpu (RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32u *horizontalTensor, Rpp32u *verticalTensor, Rpp32u *depthTensor, RpptROI3DPtr roiGenericPtrSrc, RpptRoi3DType roiType, rppHandle_t rppHandle)
 Flip voxel augmentation GPU. More...
 
RppStatus rppt_remap_host (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)
 Remap augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_remap_gpu (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)
 Remap augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_lens_correction_host (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)
 Lens correction transformation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_lens_correction_gpu (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)
 Lens correction transformation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_transpose_host (RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32u *permTensor, Rpp32u *roiTensor, rppHandle_t rppHandle)
 Transpose Generic augmentation on HOST backend. More...
 
RppStatus rppt_transpose_gpu (RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32u *permTensor, Rpp32u *roiTensor, rppHandle_t rppHandle)
 Transpose Generic augmentation on HIP backend. More...
 
RppStatus rppt_warp_perspective_host (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *perspectiveTensor, RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Warp perspective augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_warp_perspective_gpu (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *perspectiveTensor, RpptInterpolationType interpolationType, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Warp perspective augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 

Detailed Description

RPPT Tensor Operations - Geometric Augmentations.

Function Documentation

◆ rppt_warp_perspective_gpu()

RppStatus rppt_warp_perspective_gpu ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
Rpp32f perspectiveTensor,
RpptInterpolationType  interpolationType,
RpptROIPtr  roiTensorPtrSrc,
RpptRoiType  roiType,
rppHandle_t  rppHandle 
)

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

The warp perspective augmentation 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 Output
    Parameters
    [in]srcPtrsource tensor in HIP memory
    [in]srcDescPtrsource tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 1/3)
    [out]dstPtrdestination tensor in HIP memory
    [in]dstDescPtrdestination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)
    [in]perspectiveTensorperspective matrix values for transformation calculation (2D tensor in pinned/HIP memory, of size batchSize * 9 for each image in batch)
    [in]interpolationTypeInterpolation type used (RpptInterpolationType::BILINEAR or RpptRoiType::NEAREST_NEIGHBOR)
    [in]roiTensorPtrSrcROI data in HIP memory, 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))
    [in]roiTypeROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)
    [in]rppHandleRPP HIP handle created with rppCreateWithStreamAndBatchSize()
    Returns
    A RppStatus enumeration.
    Return values
    RPP_SUCCESSSuccessful completion.
    RPP_ERROR*Unsuccessful completion.

◆ rppt_warp_perspective_host()

RppStatus rppt_warp_perspective_host ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
Rpp32f perspectiveTensor,
RpptInterpolationType  interpolationType,
RpptROIPtr  roiTensorPtrSrc,
RpptRoiType  roiType,
rppHandle_t  rppHandle 
)

Warp perspective augmentation on 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 Output
    Parameters
    [in]srcPtrsource tensor in HOST memory
    [in]srcDescPtrsource tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = 1/3)
    [out]dstPtrdestination tensor in HOST memory
    [in]dstDescPtrdestination tensor descriptor (Restrictions - numDims = 4, offsetInBytes >= 0, dataType = U8/F16/F32/I8, layout = NCHW/NHWC, c = same as that of srcDescPtr)
    [in]perspectiveTensorperspective matrix values for transformation calculation (2D tensor in HOST memory, of size batchSize * 9 for each image in batch)
    [in]interpolationTypeInterpolation type used (RpptInterpolationType::BILINEAR or RpptRoiType::NEAREST_NEIGHBOR)
    [in]roiTensorPtrSrcROI data in HOST memory, 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))
    [in]roiTypeROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)
    [in]rppHandleRPP HOST handle created with rppCreateWithBatchSize()
    Returns
    A RppStatus enumeration.
    Return values
    RPP_SUCCESSSuccessful completion.
    RPP_ERROR*Unsuccessful completion.