RPP color augmentations#

RppStatus rppt_brightness(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *alphaTensor, Rpp32f *betaTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

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

The brightness augmentation changes brightness of 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)

  • alphaTensor – [in] alpha values for brightness calculation (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize, with 0 <= alpha <= 20 for each image in batch)

  • betaTensor – [in] beta values for brightness calculation (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize, with 0 <= beta <= 255 for each image in batch)

  • 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_gamma_correction(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *gammaTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

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

The gamma correction augmentation does a non-linear gamma correction of 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)

  • gammaTensor – [in] gamma values for gamma correction calculation (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize with gamma >= 0 for each image in batch)

  • 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_blend(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *alphaTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

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

The blend augmentation performs an alpha-blending operation 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)

  • alphaTensor – [in] alpha values for alpha-blending (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize with the transparency factor transparency factor 0 <= alpha <= 1 for each image in batch)

  • 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_hue(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *hueTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

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

The Hue augmentation does a modification of hue on a batch of RGB(3 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 = 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 = 3)

  • hueTensor – [in] hue modification parameter for hue calculation (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize with 0 <= hueTensor[i] <= 359 for each image in batch)

  • 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_saturation(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *saturationTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

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

The Saturation augmentation does a modification of saturation on a batch of RGB(3 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 = 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 = 3)

  • saturationTensor – [in] saturation modification parameter for saturation calculation (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize with saturationTensor[i] >= 0 for each image in batch)

  • 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_color_twist(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *brightnessTensor, Rpp32f *contrastTensor, Rpp32f *hueTensor, Rpp32f *saturationTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

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

The color twist augmentation does a fused modification of brightness, contrast, hue and saturation on 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)

  • brightnessTensor – [in] brightness modification parameter for color_twist calculation (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize with 0 < brightnessTensor[i] <= 20 for each image in batch)

  • contrastTensor – [in] contrast modification parameter for color_twist calculation (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize with 0 < contrastTensor[i] <= 255 for each image in batch)

  • hueTensor – [in] hue modification parameter for color_twist calculation (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize with 0 <= hueTensor[i] <= 359 for each image in batch)

  • saturationTensor – [in] saturation modification parameter for color_twist calculation (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize with saturationTensor[i] >= 0 for each image in batch)

  • 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_color_jitter(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *brightnessTensor, Rpp32f *contrastTensor, Rpp32f *hueTensor, Rpp32f *saturationTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

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

The color jitter augmentation does a fused modification of brightness, contrast, hue and saturation on 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 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 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)

  • brightnessTensor – [in] brightness modification parameter for color_jitter calculation (1D tensor in HOST memory, of size batchSize with 0 < brightnessTensor[i] <= 20 for each image in batch)

  • contrastTensor – [in] contrast modification parameter for color_jitter calculation (1D tensor in HOST memory, of size batchSize with 0 < contrastTensor[i] <= 255 for each image in batch)

  • hueTensor – [in] hue modification parameter for color_jitter calculation (1D tensor in HOST memory, of size batchSize with 0 <= hueTensor[i] <= 359 for each image in batch)

  • saturationTensor – [in] saturation modification parameter for color_jitter calculation (1D tensor in HOST memory, of size batchSize with saturationTensor[i] >= 0 for each image in batch)

  • roiTensorPtrSrc – [in] ROI 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))

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

  • rppHandle – [in] RPP 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_color_cast(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptRGB *rgbTensor, Rpp32f *alphaTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

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

The color cast augmentation does an alpha-blending operation between srcPtr and constant R/G/B values taken as input, on 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#

  • XYWH(xy.x, xy.y, roiWidth, roiHeight) or LTRB(lt.x, lt.y, rb.x, rb.y))

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)

  • rgbTensor – [in] R/G/B values for color casting calculation (2D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size sizeof(RpptRGB) * batchSize with 0 <= rgbTensor[n].<R/G/B> <= 255 for each image in batch)

  • alphaTensor – [in] alpha values for color casting calculation (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size sizeof(Rpp32f) * batchSize with alphaTensor[i] >= 0 for each image in batch)

  • 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

  • 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_exposure(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *exposureFactorTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

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

The exposure augmentation adjusts image exposure, on 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)

  • exposureFactorTensor – [in] exposure factor values for exposure adjustment (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize, with exposureFactorTensor[n] >= 0 for each image in the batch)

  • 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_contrast(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *contrastFactorTensor, Rpp32f *contrastCenterTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

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

The contrast augmentation adjusts image contrast, on 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)

  • contrastFactorTensor – [in] contrast factor values for contrast calculation (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize with contrastFactorTensor[n] > 0 for each image in a batch))

  • contrastCenterTensor – [in] contrast center values for contrast calculation (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size 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.

Returns:

A RppStatus enumeration.

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

Look Up Table augmentation on HIP/HOST backend for a NCHW/NHWC layout tensor.

The lut augmentation provides support for a look-up-table based modification of 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)

  • lutPtr – [in] lut Array in pinned / HOST memory (for HIP backend) or HOST memory (for HOST backend), containing a single integer look up table of length 65536, to be used for all images in the batch

  • 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_color_temperature(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32s *adjustmentValueTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

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

The color temperature augmentation does a image temperature adjustment operation, taking a pixel adjustment value as argument for each image in a batch of RGB(3 channel) 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)

  • adjustmentValueTensor – [in] adjustment values for color temperature calculation (1D tensor in pinned / HIP memory (for HIP backend) or HOST memory (for HOST backend), of size batchSize with -100 <= adjustmentValueTensor[i] >= 100 for each image in batch)

  • 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_histogram_equalize(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

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

The histogram equalize augmentation performs histogram equalization on a batch of RGB(3 channel) / greyscale(1 channel) images with an NHWC/NCHW tensor layout.

For RGB images, equalization is performed on the luminance (Y) channel in YCbCr color space, preserving chrominance information.

  • srcPtr depth ranges - Rpp8u (0 to 255).

  • dstPtr depth ranges - Rpp8u (0 to 255).

    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, 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, 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_tone_map(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32f *gammaTensor, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#

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

The tone map augmentation performs Reinhard global tone mapping on a batch of RGB(3 channel) images with an NHWC/NCHW tensor layout.

The algorithm computes pixel luminance using Rec.709 coefficients (L = 0.2126*R + 0.7152*G + 0.0722*B), applies the Reinhard operator (L_mapped = L / (1 + L)) to compress the dynamic range, and scales the RGB channels accordingly.

  • 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.

Parameters:
  • srcPtr – [in] source tensor in 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 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)

  • gammaTensor – [in] gamma values for tone map gamma correction (1D tensor in HOST memory, of size batchSize with gammaTensor[i] >= 0 for each image in batch)

  • roiTensorPtrSrc – [in] ROI 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))

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

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

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

Return values:
  • RPP_SUCCESS – Successful completion.

  • RPP_ERROR* – Unsuccessful completion.

Returns:

A RppStatus enumeration.