RPP morphological operations#
-
RppStatus rppt_erode_host(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32u kernelSize, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)#
Erode augmentation on HOST backend for a NCHW/NHWC layout tensor.
The erode augmentation runs 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 3x3 Output#
Sample 5x5 Output#
Sample 7x7 Output#
Sample 9x9 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)
kernelSize – [in] kernel size for erode (a single Rpp32u odd number with kernelSize = 3/5/7/9 that applies to all images in the 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()
- Return values:
RPP_SUCCESS – Successful completion.
RPP_ERROR* – Unsuccessful completion.
- Returns:
A
RppStatusenumeration.
-
RppStatus rppt_erode(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32u kernelSize, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#
Erode augmentation on HIP backend for a NCHW/NHWC layout tensor.
The erode augmentation runs 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 3x3 Output#
Sample 5x5 Output#
Sample 7x7 Output#
Sample 9x9 Output#
- Parameters:
srcPtr – [in] source tensor in HIP 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 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)
kernelSize – [in] kernel size for erode (a single Rpp32u odd number with kernelSize = 3/5/7/9 that applies to all images in the batch)
roiTensorPtrSrc – [in] ROI 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))
roiType – [in] ROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)
rppHandle – [in] RPP HIP handle created with
rppCreate()
- Return values:
RPP_SUCCESS – Successful completion.
RPP_ERROR* – Unsuccessful completion.
- Returns:
A
RppStatusenumeration.
-
RppStatus rppt_dilate_host(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32u kernelSize, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle)#
Dilate augmentation on HOST backend for a NCHW/NHWC layout tensor.
The dilate augmentation runs 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 3x3 Output#
Sample 5x5 Output#
Sample 7x7 Output#
Sample 9x9 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)
kernelSize – [in] kernel size for dilate (a single Rpp32u odd number with kernelSize = 3/5/7/9 that applies to all images in the 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()
- Return values:
RPP_SUCCESS – Successful completion.
RPP_ERROR* – Unsuccessful completion.
- Returns:
A
RppStatusenumeration.
-
RppStatus rppt_dilate(RppPtr_t srcPtr, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, Rpp32u kernelSize, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle, RppBackend executionBackend)#
Dilate augmentation on HIP backend for a NCHW/NHWC layout tensor.
The dilate augmentation runs 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 3x3 Output#
Sample 5x5 Output#
Sample 7x7 Output#
Sample 9x9 Output#
- Parameters:
srcPtr – [in] source tensor in HIP 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 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)
kernelSize – [in] kernel size for dilate (a single Rpp32u odd number with kernelSize = 3/5/7/9 that applies to all images in the batch)
roiTensorPtrSrc – [in] ROI 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))
roiType – [in] ROI type used (RpptRoiType::XYWH or RpptRoiType::LTRB)
rppHandle – [in] RPP HIP handle created with
rppCreate()
- Return values:
RPP_SUCCESS – Successful completion.
RPP_ERROR* – Unsuccessful completion.
- Returns:
A
RppStatusenumeration.