RPPT Tensor Operations - Effects Augmentations.

RPPT Tensor Operations - Effects Augmentations.#

RPP: RPPT Tensor Operations - Effects Augmentations.
RPPT Tensor Operations - Effects Augmentations.

RPPT Tensor Operations - Effects Augmentations. More...

Functions

RppStatus rppt_gridmask_host (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32u tileWidth, Rpp32f gridRatio, Rpp32f gridAngle, RpptUintVector2D translateVector, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Gridmask augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_gridmask_gpu (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32u tileWidth, Rpp32f gridRatio, Rpp32f gridAngle, RpptUintVector2D translateVector, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Gridmask augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_spatter_host (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptRGB spatterColor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Spatter augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_spatter_gpu (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptRGB spatterColor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Spatter augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_salt_and_pepper_noise_host (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *noiseProbabilityTensor, Rpp32f *saltProbabilityTensor, Rpp32f *saltValueTensor, Rpp32f *pepperValueTensor, Rpp32u seed, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Salt and pepper noise augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_salt_and_pepper_noise_gpu (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *noiseProbabilityTensor, Rpp32f *saltProbabilityTensor, Rpp32f *saltValueTensor, Rpp32f *pepperValueTensor, Rpp32u seed, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Salt and pepper noise augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_shot_noise_host (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *shotNoiseFactorTensor, Rpp32u seed, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Shot noise augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_shot_noise_gpu (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *shotNoiseFactorTensor, Rpp32u seed, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Shot noise augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_gaussian_noise_host (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *meanTensor, Rpp32f *stdDevTensor, Rpp32u seed, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Gaussian noise augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_gaussian_noise_gpu (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *meanTensor, Rpp32f *stdDevTensor, Rpp32u seed, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Gaussian noise augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_non_linear_blend_host (RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *stdDevTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Non linear blend augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_non_linear_blend_gpu (RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *stdDevTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Non linear blend augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_water_host (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *amplitudeXTensor, Rpp32f *amplitudeYTensor, Rpp32f *frequencyXTensor, Rpp32f *frequencyYTensor, Rpp32f *phaseXTensor, Rpp32f *phaseYTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Water augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_water_gpu (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *amplitudeXTensor, Rpp32f *amplitudeYTensor, Rpp32f *frequencyXTensor, Rpp32f *frequencyYTensor, Rpp32f *phaseXTensor, Rpp32f *phaseYTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Water augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_ricap_host (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32u *permutedIndicesTensor, RpptROIPtr roiPtrInputCropRegion, RpptRoiType roiType, rppHandle_t rppHandle)
 RICAP (Random Image Crop And Patch) augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_ricap_gpu (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32u *permutedIndicesTensor, RpptROIPtr roiPtrInputCropRegion, RpptRoiType roiType, rppHandle_t rppHandle)
 RICAP (Random Image Crop And Patch) augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_vignette_host (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *vignetteIntensityTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Vignette augmentation on HOST backend for a NCHW/NHWC layout tensor. More...
 
RppStatus rppt_vignette_gpu (RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *vignetteIntensityTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)
 Vignette augmentation on HIP backend for a NCHW/NHWC layout tensor. More...
 

Detailed Description

RPPT Tensor Operations - Effects Augmentations.

Function Documentation

◆ rppt_gaussian_noise_gpu()

RppStatus rppt_gaussian_noise_gpu ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
Rpp32f meanTensor,
Rpp32f stdDevTensor,
Rpp32u  seed,
RpptROIPtr  roiTensorPtrSrc,
RpptRoiType  roiType,
rppHandle_t  rppHandle 
)

Gaussian noise augmentation on HIP backend for a NCHW/NHWC layout tensor.

The gaussian noise augmentation adds Gaussian noise based on user defined means and standard deviations, 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]meanTensormean values for each image, which are used to compute the generalized Box-Mueller transforms in a gaussian distribution (1D tensor in pinned/HOST memory, of size batchSize with meanTensor[i] >= 0 for each image in batch)
    [in]stdDevTensorstdDev values for each image, which are used to compute the generalized Box-Mueller transforms in a gaussian distribution (1D tensor in pinned/HOST memory, of size batchSize with stdDevTensor[i] >= 0 for each image in batch)
    [in]seedA user-defined seed value (single Rpp32u value)
    [in]roiTensorSrcROI 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_gaussian_noise_host()

RppStatus rppt_gaussian_noise_host ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
Rpp32f meanTensor,
Rpp32f stdDevTensor,
Rpp32u  seed,
RpptROIPtr  roiTensorPtrSrc,
RpptRoiType  roiType,
rppHandle_t  rppHandle 
)

Gaussian noise augmentation on HOST backend for a NCHW/NHWC layout tensor.

The gaussian noise augmentation adds Gaussian noise based on user defined means and standard deviations, 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]meanTensormean values for each image, which are used to compute the generalized Box-Mueller transforms in a gaussian distribution (1D tensor in HOST memory, of size batchSize with meanTensor[i] >= 0 for each image in batch)
    [in]stdDevTensorstdDev values for each image, which are used to compute the generalized Box-Mueller transforms in a gaussian distribution (1D tensor in HOST memory, of size batchSize with stdDevTensor[i] >= 0 for each image in batch)
    [in]seedA user-defined seed value (single Rpp32u value)
    [in]roiTensorSrcROI 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.

◆ rppt_gridmask_gpu()

RppStatus rppt_gridmask_gpu ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
Rpp32u  tileWidth,
Rpp32f  gridRatio,
Rpp32f  gridAngle,
RpptUintVector2D  translateVector,
RpptROIPtr  roiTensorPtrSrc,
RpptRoiType  roiType,
rppHandle_t  rppHandle 
)

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

The gridmask augmentation runs as per https://arxiv.org/abs/2001.04086 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]tileWidthtileWidth value for gridmask calculation = width of black square + width of spacing until next black square on grid (a single Rpp32u number with tileWidth <= min(srcDescPtr->w, srcDescPtr->h) that applies to all images in the batch)
    [in]gridRatiogridRatio value for gridmask calculation = black square width / tileWidth (a single Rpp32f number with 0 <= gridRatio <= 1 that applies to all images in the batch)
    [in]gridAnglegridAngle value for gridmask calculation = grid rotation angle in radians (a single Rpp32f number that applies to all images in the batch)
    [in]translateVectortranslateVector for gridmask calculation = grid X and Y translation lengths in pixels (a single RpptUintVector2D x,y value pair that applies to all images in the batch)
    [in]roiTensorSrcROI 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_gridmask_host()

RppStatus rppt_gridmask_host ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
Rpp32u  tileWidth,
Rpp32f  gridRatio,
Rpp32f  gridAngle,
RpptUintVector2D  translateVector,
RpptROIPtr  roiTensorPtrSrc,
RpptRoiType  roiType,
rppHandle_t  rppHandle 
)

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

The gridmask augmentation runs as per https://arxiv.org/abs/2001.04086 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]tileWidthtileWidth value for gridmask calculation = width of black square + width of spacing until next black square on grid (a single Rpp32u number with tileWidth <= min(srcDescPtr->w, srcDescPtr->h) that applies to all images in the batch)
    [in]gridRatiogridRatio value for gridmask calculation = black square width / tileWidth (a single Rpp32f number with 0 <= gridRatio <= 1 that applies to all images in the batch)
    [in]gridAnglegridAngle value for gridmask calculation = grid rotation angle in radians (a single Rpp32f number that applies to all images in the batch)
    [in]translateVectortranslateVector for gridmask calculation = grid X and Y translation lengths in pixels (a single RpptUintVector2D x,y value pair that applies to all images in the batch)
    [in]roiTensorSrcROI 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.

◆ rppt_non_linear_blend_gpu()

RppStatus rppt_non_linear_blend_gpu ( RppPtr_t  srcPtr1,
RppPtr_t  srcPtr2,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
Rpp32f stdDevTensor,
RpptROIPtr  roiTensorPtrSrc,
RpptRoiType  roiType,
rppHandle_t  rppHandle 
)

Non linear blend augmentation on HIP backend for a NCHW/NHWC layout tensor.

The non linear blend augmentation adds standard deviation based non-linear alpha-blending, between two sets of batches 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 Input2
    Sample Output
    Parameters
    [in]srcPtr1source1 tensor in HIP memory
    [in]srcPtr2source2 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]stdDevTensorstdDev values for each image, which are used to compute the generalized Box-Mueller transforms in a gaussian distribution (1D tensor in pinned/HOST memory, of size batchSize with stdDevTensor[i] >= 0 for each image in batch)
    [in]roiTensorSrcROI 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_non_linear_blend_host()

RppStatus rppt_non_linear_blend_host ( RppPtr_t  srcPtr1,
RppPtr_t  srcPtr2,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
Rpp32f stdDevTensor,
RpptROIPtr  roiTensorPtrSrc,
RpptRoiType  roiType,
rppHandle_t  rppHandle 
)

Non linear blend augmentation on HOST backend for a NCHW/NHWC layout tensor.

The non linear blend augmentation adds standard deviation based non-linear alpha-blending, between two sets of batches 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 Input2
    Sample Output
    Parameters
    [in]srcPtr1source1 tensor in HOST memory
    [in]srcPtr2source2 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]stdDevTensorstdDev values for each image, which are used to compute the generalized Box-Mueller transforms in a gaussian distribution (1D tensor in HOST memory, of size batchSize with stdDevTensor[i] >= 0 for each image in batch)
    [in]roiTensorSrcROI 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.

◆ rppt_ricap_gpu()

RppStatus rppt_ricap_gpu ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
Rpp32u permutedIndicesTensor,
RpptROIPtr  roiPtrInputCropRegion,
RpptRoiType  roiType,
rppHandle_t  rppHandle 
)

RICAP (Random Image Crop And Patch) augmentation on HIP backend for a NCHW/NHWC layout tensor.

The RICAP (Random Image Crop And Patch) augmentation runs as per https://arxiv.org/abs/1811.09030 for a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.
The RICAP augmentation requires dimensions of input images to be the same across entire batch.

  • 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 Input2
    Sample Input3
    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]permutedIndicesTensorArray of batchSize permutation sets (2D tensor in pinned/HOST memory, of batchSize * 4. Each set of 4 permutations contains Rpp32u image indices for each region in the respective RICAP-output-image in the batch)
    [in]roiPtrInputCropRegionArray of 4 ROIs (2D tensor in HIP memory, of size 4 * 4-elements per ROI, 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_ricap_host()

RppStatus rppt_ricap_host ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
Rpp32u permutedIndicesTensor,
RpptROIPtr  roiPtrInputCropRegion,
RpptRoiType  roiType,
rppHandle_t  rppHandle 
)

RICAP (Random Image Crop And Patch) augmentation on HOST backend for a NCHW/NHWC layout tensor.

The RICAP (Random Image Crop And Patch) augmentation runs as per https://arxiv.org/abs/1811.09030 for a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.
The RICAP augmentation requires dimensions of input images to be the same across entire batch.

  • 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 Input2
    Sample Input3
    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]permutedIndicesTensorArray of batchSize permutation sets (2D tensor in HOST memory, of batchSize * 4. Each set of 4 permutations contains Rpp32u image indices for each region in the respective RICAP-output-image in the batch)
    [in]roiPtrInputCropRegionArray of 4 ROIs (2D tensor in HOST memory, of size 4 * 4-elements per ROI, 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.

◆ rppt_salt_and_pepper_noise_gpu()

RppStatus rppt_salt_and_pepper_noise_gpu ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
Rpp32f noiseProbabilityTensor,
Rpp32f saltProbabilityTensor,
Rpp32f saltValueTensor,
Rpp32f pepperValueTensor,
Rpp32u  seed,
RpptROIPtr  roiTensorPtrSrc,
RpptRoiType  roiType,
rppHandle_t  rppHandle 
)

Salt and pepper noise augmentation on HIP backend for a NCHW/NHWC layout tensor.

The salt and pepper noise augmentation adds SnP noise based on user defined noise/salt probabilities, and user defined salt/pepper values 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]noiseProbailityTensornoiseProbaility values to decide if a destination pixel is a noise-pixel, or equal to source (1D tensor in pinned/HOST memory, of size batchSize with 0 <= noiseProbailityTensor[i] <= 1 for each image in batch)
    [in]saltProbailityTensorsaltProbaility values to decide if a given destination noise-pixel is salt or pepper (1D tensor in pinned/HOST memory, of size batchSize with 0 <= saltProbailityTensor[i] <= 1 for each image in batch)
    [in]saltValueTensorA user-defined salt noise value (1D tensor in pinned/HOST memory, of size batchSize with 0 <= saltValueTensor[i] <= 1 for each image in batch)
    [in]pepperValueTensorA user-defined pepper noise value (1D tensor in pinned/HOST memory, of size batchSize with 0 <= pepperValueTensor[i] <= 1 for each image in batch)
    [in]seedA user-defined seed value (single Rpp32u value)
    [in]roiTensorSrcROI 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_salt_and_pepper_noise_host()

RppStatus rppt_salt_and_pepper_noise_host ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
Rpp32f noiseProbabilityTensor,
Rpp32f saltProbabilityTensor,
Rpp32f saltValueTensor,
Rpp32f pepperValueTensor,
Rpp32u  seed,
RpptROIPtr  roiTensorPtrSrc,
RpptRoiType  roiType,
rppHandle_t  rppHandle 
)

Salt and pepper noise augmentation on HOST backend for a NCHW/NHWC layout tensor.

The salt and pepper noise augmentation adds SnP noise based on user defined noise/salt probabilities, and user defined salt/pepper values 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]noiseProbailityTensornoiseProbaility values to decide if a destination pixel is a noise-pixel, or equal to source (1D tensor in HOST memory, of size batchSize with 0 <= noiseProbailityTensor[i] <= 1 for each image in batch)
    [in]saltProbailityTensorsaltProbaility values to decide if a given destination noise-pixel is salt or pepper (1D tensor in HOST memory, of size batchSize with 0 <= saltProbailityTensor[i] <= 1 for each image in batch)
    [in]saltValueTensorA user-defined salt noise value (1D tensor in HOST memory, of size batchSize with 0 <= saltValueTensor[i] <= 1 for each image in batch)
    [in]pepperValueTensorA user-defined pepper noise value (1D tensor in HOST memory, of size batchSize with 0 <= pepperValueTensor[i] <= 1 for each image in batch)
    [in]seedA user-defined seed value (single Rpp32u value)
    [in]roiTensorSrcROI 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.

◆ rppt_shot_noise_gpu()

RppStatus rppt_shot_noise_gpu ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
Rpp32f shotNoiseFactorTensor,
Rpp32u  seed,
RpptROIPtr  roiTensorPtrSrc,
RpptRoiType  roiType,
rppHandle_t  rppHandle 
)

Shot noise augmentation on HIP backend for a NCHW/NHWC layout tensor.

The shot noise augmentation adds Poisson/shot noise based on a user defined shotNoiseFactor, 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]shotNoiseFactorTensorshotNoiseFactor values for each image, which are used to compute the lambda values in a poisson distribution (1D tensor in pinned/HOST memory, of size batchSize with shotNoiseFactorTensor[i] >= 0 for each image in batch)
    [in]seedA user-defined seed value (single Rpp32u value)
    [in]roiTensorSrcROI 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_shot_noise_host()

RppStatus rppt_shot_noise_host ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
Rpp32f shotNoiseFactorTensor,
Rpp32u  seed,
RpptROIPtr  roiTensorPtrSrc,
RpptRoiType  roiType,
rppHandle_t  rppHandle 
)

Shot noise augmentation on HOST backend for a NCHW/NHWC layout tensor.

The shot noise augmentation adds Poisson/shot noise based on a user defined shotNoiseFactor, 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]shotNoiseFactorTensorshotNoiseFactor values for each image, which are used to compute the lambda values in a poisson distribution (1D tensor in HOST memory, of size batchSize with shotNoiseFactorTensor[i] >= 0 for each image in batch)
    [in]seedA user-defined seed value (single Rpp32u value)
    [in]roiTensorSrcROI 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.

◆ rppt_spatter_gpu()

RppStatus rppt_spatter_gpu ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
RpptRGB  spatterColor,
RpptROIPtr  roiTensorPtrSrc,
RpptRoiType  roiType,
rppHandle_t  rppHandle 
)

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

The spatter augmentation adds random spatter of a user-defined color, 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 - Mud Spatter
    Sample Output - Ink Spatter
    Sample Output - Blood Spatter
    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]spatterColorRGB values to use for the spatter augmentation (A single set of 3 Rpp8u values as RpptRGB that applies to all images in the batch)
    [in]roiTensorSrcROI 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)) | (Restrictions - roiTensorSrc[i].xywhROI.roiWidth <= 1920 and roiTensorSrc[i].xywhROI.roiHeight <= 1080)
    [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_spatter_host()

RppStatus rppt_spatter_host ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
RpptRGB  spatterColor,
RpptROIPtr  roiTensorPtrSrc,
RpptRoiType  roiType,
rppHandle_t  rppHandle 
)

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

The spatter augmentation adds random spatter of a user-defined color, 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 - Mud Spatter
    Sample Output - Ink Spatter
    Sample Output - Blood Spatter
    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]spatterColorRGB values to use for the spatter augmentation (A single set of 3 Rpp8u values as RpptRGB that applies to all images in the batch)
    [in]roiTensorSrcROI 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)) | (Restrictions - roiTensorSrc[i].xywhROI.roiWidth <= 1920 and roiTensorSrc[i].xywhROI.roiHeight <= 1080)
    [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.

◆ rppt_vignette_gpu()

RppStatus rppt_vignette_gpu ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
Rpp32f vignetteIntensityTensor,
RpptROIPtr  roiTensorPtrSrc,
RpptRoiType  roiType,
rppHandle_t  rppHandle 
)

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

The vignette augmentation adds a vignette 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 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]vignetteIntensityTensorintensity values to quantify vignette effect (1D tensor of size batchSize with 0 < vignetteIntensityTensor[n] for each image in batch)
    [in]roiTensorSrcROI 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_vignette_host()

RppStatus rppt_vignette_host ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
Rpp32f vignetteIntensityTensor,
RpptROIPtr  roiTensorPtrSrc,
RpptRoiType  roiType,
rppHandle_t  rppHandle 
)

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

The Vignette augmentation adds a vignette 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 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]vignetteIntensityTensorintensity values to quantify vignette effect (1D tensor of size batchSize with 0 < vignetteIntensityTensor[n] for each image in batch)
    [in]roiTensorSrcROI 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.

◆ rppt_water_gpu()

RppStatus rppt_water_gpu ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
Rpp32f amplitudeXTensor,
Rpp32f amplitudeYTensor,
Rpp32f frequencyXTensor,
Rpp32f frequencyYTensor,
Rpp32f phaseXTensor,
Rpp32f phaseYTensor,
RpptROIPtr  roiTensorPtrSrc,
RpptRoiType  roiType,
rppHandle_t  rppHandle 
)

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

The water augmentation adds a water 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 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]amplitudeXTensoramplitudeX values for water effect (1D tensor in pinned/HOST memory, of size batchSize)
    [in]amplitudeYTensoramplitudeY values for water effect (1D tensor in pinned/HOST memory, of size batchSize)
    [in]freqXTensorfreqX values for water effect (1D tensor in pinned/HOST memory, of size batchSize)
    [in]freqYTensorfreqY values for water effect (1D tensor in pinned/HOST memory, of size batchSize)
    [in]phaseXTensoramplitudeY values for water effect (1D tensor in pinned/HOST memory, of size batchSize)
    [in]phaseYTensoramplitudeY values for water effect (1D tensor in pinned/HOST memory, of size batchSize)
    [in]roiTensorSrcROI 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_water_host()

RppStatus rppt_water_host ( RppPtr_t  srcPtr,
RpptDescPtr  srcDescPtr,
RppPtr_t  dstPtr,
RpptDescPtr  dstDescPtr,
Rpp32f amplitudeXTensor,
Rpp32f amplitudeYTensor,
Rpp32f frequencyXTensor,
Rpp32f frequencyYTensor,
Rpp32f phaseXTensor,
Rpp32f phaseYTensor,
RpptROIPtr  roiTensorPtrSrc,
RpptRoiType  roiType,
rppHandle_t  rppHandle 
)

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

The water augmentation adds a water 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 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]amplitudeXTensoramplitudeX values for water effect (1D tensor in HOST memory, of size batchSize)
    [in]amplitudeYTensoramplitudeY values for water effect (1D tensor in HOST memory, of size batchSize)
    [in]freqXTensorfreqX values for water effect (1D tensor in HOST memory, of size batchSize)
    [in]freqYTensorfreqY values for water effect (1D tensor in HOST memory, of size batchSize)
    [in]phaseXTensoramplitudeY values for water effect (1D tensor in HOST memory, of size batchSize)
    [in]phaseYTensoramplitudeY values for water effect (1D tensor in HOST memory, of size batchSize)
    [in]roiTensorSrcROI 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.