/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rpp/checkouts/docs-6.2.0/include/rppi_morphological_transforms.h Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rpp/checkouts/docs-6.2.0/include/rppi_morphological_transforms.h Source File#

RPP: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rpp/checkouts/docs-6.2.0/include/rppi_morphological_transforms.h Source File
rppi_morphological_transforms.h
Go to the documentation of this file.
1 /*
2 MIT License
3 
4 Copyright (c) 2019 - 2024 Advanced Micro Devices, Inc.
5 
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12 
13 The above copyright notice and this permission notice shall be included in all
14 copies or substantial portions of the Software.
15 
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 SOFTWARE.
23 */
24 
25 #ifndef RPPI_MORPHOLOGICAL_TRANSFORMS_H
26 #define RPPI_MORPHOLOGICAL_TRANSFORMS_H
27 
28 #include "rppdefs.h"
29 #include "rpp.h"
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
46 /******************** erode ********************/
47 
48 // Performs an erode operation, where the output pixel is computed as the minimum value of the pixels under a [kernelSize X kernelSize] square mask, for a batch of images
49 
50 // *param[in] srcPtr Input image batch
51 // *param[in] srcSize Array containing an RppiSize for each image in the batch
52 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
53 // *param[out] dstPtr Output image batch
54 // *param[in] kernelSize Array containing an Rpp32u kernel size for each image in the batch (kernelSize[n] = 3/5/7 for optimal use)
55 // *param[in] nbatchSize Batch size or the number of images in the batch
56 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
57 // *returns a RppStatus enumeration.
58 // *retval RPP_SUCCESS : No error, Succesful completion
59 // *retval RPP_ERROR : Error
60 
61 RppStatus rppi_erode_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
62 RppStatus rppi_erode_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
63 RppStatus rppi_erode_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
64 #ifdef GPU_SUPPORT
65 RppStatus rppi_erode_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
66 RppStatus rppi_erode_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
67 RppStatus rppi_erode_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
68 #endif // GPU_SUPPORT
69 
70 /******************** dilate ********************/
71 
72 // Performs a dilate operation, where the output pixel is computed as the maximum value of the pixels under a [kernelSize X kernelSize] square mask, for a batch of images
73 
74 // *param[in] srcPtr Input image batch
75 // *param[in] srcSize Array containing an RppiSize for each image in the batch
76 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
77 // *param[out] dstPtr Output image batch
78 // *param[in] kernelSize Array containing an Rpp32u kernel size for each image in the batch (kernelSize[n] = 3/5/7 for optimal use)
79 // *param[in] nbatchSize Batch size or the number of images in the batch
80 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
81 // *returns a RppStatus enumeration.
82 // *retval RPP_SUCCESS : No error, Succesful completion
83 // *retval RPP_ERROR : Error
84 
85 RppStatus rppi_dilate_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
86 RppStatus rppi_dilate_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
87 RppStatus rppi_dilate_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
88 #ifdef GPU_SUPPORT
89 RppStatus rppi_dilate_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
90 RppStatus rppi_dilate_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
91 RppStatus rppi_dilate_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
92 #endif // GPU_SUPPORT
93 
97 #ifdef __cplusplus
98 }
99 #endif
100 #endif
unsigned int Rpp32u
32 bit unsigned int
Definition: rppdefs.h:80
void * RppPtr_t
void pointer
Definition: rppdefs.h:92
RppStatus
RPP RppStatus type enums.
Definition: rppdefs.h:100
RPP top-level header with RPP handle API.
RPP common HOST/GPU typedef, enum and structure definitions.
RPPI Image size(Width/Height dimensions) type struct.
Definition: rppdefs.h:317