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

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

RPP: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rpp/checkouts/docs-6.1.1/include/rppi_computer_vision.h Source File
rppi_computer_vision.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_COMPUTER_VISION_H
26 #define RPPI_COMPUTER_VISION_H
27 
28 #include "rppdefs.h"
29 #include "rpp.h"
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
46 /******************** local_binary_pattern ********************/
47 
48 // Performs the 8 neighbor Local Binary Pattern (LBP), where the LBP for each pixel is defined by comparing the pixel value against its 8 neighbors, 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] nbatchSize Batch size or the number of images in the batch
55 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
56 // *returns a RppStatus enumeration.
57 // *retval RPP_SUCCESS : No error, Succesful completion
58 // *retval RPP_ERROR : Error
59 
60 RppStatus rppi_local_binary_pattern_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
61 RppStatus rppi_local_binary_pattern_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
62 RppStatus rppi_local_binary_pattern_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
63 #ifdef GPU_SUPPORT
64 RppStatus rppi_local_binary_pattern_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
65 RppStatus rppi_local_binary_pattern_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
66 RppStatus rppi_local_binary_pattern_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
67 #endif // GPU_SUPPORT
68 
69 /******************** data_object_copy ********************/
70 
71 // Performs a buffer copy for a batch of images
72 
73 // *param[in] srcPtr Input image batch
74 // *param[in] srcSize Array containing an RppiSize for each image in the batch
75 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
76 // *param[out] dstPtr Output image batch
77 // *param[in] nbatchSize Batch size or the number of images in the batch
78 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
79 // *returns a RppStatus enumeration.
80 // *retval RPP_SUCCESS : No error, Succesful completion
81 // *retval RPP_ERROR : Error
82 
83 RppStatus rppi_data_object_copy_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
84 RppStatus rppi_data_object_copy_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
85 RppStatus rppi_data_object_copy_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
86 #ifdef GPU_SUPPORT
87 RppStatus rppi_data_object_copy_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
88 RppStatus rppi_data_object_copy_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
89 RppStatus rppi_data_object_copy_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
90 #endif // GPU_SUPPORT
91 
92 /******************** gaussian_image_pyramid ********************/
93 
94 // Performs a gaussian image pyramid computation for a batch of images
95 
96 // *param[in] srcPtr Input image batch
97 // *param[in] srcSize Array containing an RppiSize for each image in the batch
98 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
99 // *param[out] dstPtr Output image batch
100 // *param[in] stdDev Array containing an Rpp32f stdDev for each image in the batch (stdDev[n] >= 0)
101 // *param[in] kernelSize Array containing an Rpp32u kernel size for each image in the batch (kernelSize[n] = 3/5/7 for optimal use)
102 // *param[in] nbatchSize Batch size or the number of images in the batch
103 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
104 // *returns a RppStatus enumeration.
105 // *retval RPP_SUCCESS : No error, Succesful completion
106 // *retval RPP_ERROR : Error
107 
108 RppStatus rppi_gaussian_image_pyramid_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
109 RppStatus rppi_gaussian_image_pyramid_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
110 RppStatus rppi_gaussian_image_pyramid_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
111 #ifdef GPU_SUPPORT
112 RppStatus rppi_gaussian_image_pyramid_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
113 RppStatus rppi_gaussian_image_pyramid_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
114 RppStatus rppi_gaussian_image_pyramid_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
115 #endif // GPU_SUPPORT
116 
117 /******************** laplacian_image_pyramid ********************/
118 
119 // Performs a laplacian image pyramid computation for a batch of images
120 
121 // *param[in] srcPtr Input image batch
122 // *param[in] srcSize Array containing an RppiSize for each image in the batch
123 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
124 // *param[out] dstPtr Output image batch
125 // *param[in] stdDev Array containing an Rpp32f stdDev for each image in the batch (stdDev[n] >= 0)
126 // *param[in] kernelSize Array containing an Rpp32u kernel size for each image in the batch (kernelSize[n] = 3/5/7 for optimal use)
127 // *param[in] nbatchSize Batch size or the number of images in the batch
128 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
129 // *returns a RppStatus enumeration.
130 // *retval RPP_SUCCESS : No error, Succesful completion
131 // *retval RPP_ERROR : Error
132 
133 RppStatus rppi_laplacian_image_pyramid_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
134 RppStatus rppi_laplacian_image_pyramid_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
135 RppStatus rppi_laplacian_image_pyramid_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
136 #ifdef GPU_SUPPORT
137 RppStatus rppi_laplacian_image_pyramid_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
138 RppStatus rppi_laplacian_image_pyramid_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
139 RppStatus rppi_laplacian_image_pyramid_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
140 #endif // GPU_SUPPORT
141 
142 /******************** canny_edge_detector ********************/
143 
144 // Performs a canny edge detection and outputs edge-images for a batch of images
145 
146 // *param[in] srcPtr Input image batch
147 // *param[in] srcSize Array containing an RppiSize for each image in the batch
148 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
149 // *param[out] dstPtr Output image batch
150 // *param[in] minThreshold Array containing an Rpp8u minimum threshold for every pixel in each image in the batch (0 <= minThreshold <= 255)
151 // *param[in] maxThreshold Array containing an Rpp8u maximum threshold for every pixel in each image in the batch (0 <= maxThreshold <= 255)
152 // *param[in] nbatchSize Batch size or the number of images in the batch
153 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
154 // *returns a RppStatus enumeration.
155 // *retval RPP_SUCCESS : No error, Succesful completion
156 // *retval RPP_ERROR : Error
157 
158 RppStatus rppi_canny_edge_detector_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp8u *minThreshold, Rpp8u *maxThreshold, Rpp32u nbatchSize, rppHandle_t rppHandle);
159 RppStatus rppi_canny_edge_detector_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp8u *minThreshold, Rpp8u *maxThreshold, Rpp32u nbatchSize, rppHandle_t rppHandle);
160 RppStatus rppi_canny_edge_detector_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp8u *minThreshold, Rpp8u *maxThreshold, Rpp32u nbatchSize, rppHandle_t rppHandle);
161 #ifdef GPU_SUPPORT
162 RppStatus rppi_canny_edge_detector_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp8u *minThreshold, Rpp8u *maxThreshold, Rpp32u nbatchSize, rppHandle_t rppHandle);
163 RppStatus rppi_canny_edge_detector_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp8u *minThreshold, Rpp8u *maxThreshold, Rpp32u nbatchSize, rppHandle_t rppHandle);
164 RppStatus rppi_canny_edge_detector_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp8u *minThreshold, Rpp8u *maxThreshold, Rpp32u nbatchSize, rppHandle_t rppHandle);
165 #endif // GPU_SUPPORT
166 
167 /******************** harris_corner_detector ********************/
168 
169 // Performs a harris corner detection and outputs corner-overlayed-images for a batch of images
170 
171 // *param[in] srcPtr Input image batch
172 // *param[in] srcSize Array containing an RppiSize for each image in the batch
173 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
174 // *param[out] dstPtr Output image batch
175 // *param[in] gaussianKernelSize Array containing an Rpp32u gaussian kernel size for each image in the batch (gaussianKernelSize[n] = 3/5/7 for optimal use)
176 // *param[in] stdDev Array containing an Rpp32f standard deviation for each image in the batch (stdDev >= 0)
177 // *param[in] kernelSize Array containing an Rpp32u corner detection kernel size for each image in the batch (kernelSize[n] = 3/5/7 for optimal use)
178 // *param[in] kValue Array containing an appropriate Rpp32f k value for each image in the batch
179 // *param[in] threshold Array containing an appropriate Rpp32f threshold for each image in the batch
180 // *param[in] nonmaxKernelSize Array containing an Rpp32u nonmax suppression kernel size for each image in the batch (nonmaxKernelSize[n] = 3/5/7 for optimal use)
181 // *param[in] nbatchSize Batch size or the number of images in the batch
182 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
183 // *returns a RppStatus enumeration.
184 // *retval RPP_SUCCESS : No error, Succesful completion
185 // *retval RPP_ERROR : Error
186 
187 RppStatus rppi_harris_corner_detector_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *gaussianKernelSize, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32f *kValue, Rpp32f *threshold, Rpp32u *nonmaxKernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
188 RppStatus rppi_harris_corner_detector_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *gaussianKernelSize, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32f *kValue, Rpp32f *threshold, Rpp32u *nonmaxKernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
189 RppStatus rppi_harris_corner_detector_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *gaussianKernelSize, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32f *kValue, Rpp32f *threshold, Rpp32u *nonmaxKernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
190 #ifdef GPU_SUPPORT
191 RppStatus rppi_harris_corner_detector_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *gaussianKernelSize, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32f *kValue, Rpp32f *threshold, Rpp32u *nonmaxKernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
192 RppStatus rppi_harris_corner_detector_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *gaussianKernelSize, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32f *kValue, Rpp32f *threshold, Rpp32u *nonmaxKernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
193 RppStatus rppi_harris_corner_detector_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *gaussianKernelSize, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32f *kValue, Rpp32f *threshold, Rpp32u *nonmaxKernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
194 #endif // GPU_SUPPORT
195 
196 /******************** tensor_convert_bit_depth ********************/
197 
198 // Converts bit depth of the elements of a tensor
199 
200 // *param[in] srcPtr Input tensor
201 // *param[out] dstPtr Output tensor
202 // *param[in] tensorDimension Number of dimensions in the tensor
203 // *param[in] tensorDimensionValues Array of length - "tensorDimension", containing size of each dimension in the tensor
204 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
205 // *returns a RppStatus enumeration.
206 // *retval RPP_SUCCESS : No error, Succesful completion
207 // *retval RPP_ERROR : Error
208 
209 RppStatus rppi_tensor_convert_bit_depth_u8s8_host(RppPtr_t srcPtr, RppPtr_t dstPtr, Rpp32u tensorDimension, RppPtr_t tensorDimensionValues);
210 RppStatus rppi_tensor_convert_bit_depth_u8u16_host(RppPtr_t srcPtr, RppPtr_t dstPtr, Rpp32u tensorDimension, RppPtr_t tensorDimensionValues);
211 RppStatus rppi_tensor_convert_bit_depth_u8s16_host(RppPtr_t srcPtr, RppPtr_t dstPtr, Rpp32u tensorDimension, RppPtr_t tensorDimensionValues);
212 
213 /******************** fast_corner_detector ********************/
214 
215 // Performs a fast corner detection and outputs corner-overlayed-images for a batch of images
216 
217 // *param[in] srcPtr Input image batch
218 // *param[in] srcSize Array containing an RppiSize for each image in the batch
219 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
220 // *param[out] dstPtr Output image batch
221 // *param[in] numOfPixels Array containing an Rpp32u minimum number of contiguous pixel to detect a corner, for each image in the batch (numOfPixels[n] >= 0)
222 // *param[in] threshold Array containing an appropriate Rpp8u intensity-difference threshold for corners for each image in the batch (0 <= threshold[n] <= 255)
223 // *param[in] nonmaxKernelSize Array containing an Rpp32u nonmax suppression kernel size for each image in the batch (nonmaxKernelSize[n] = 3/5/7/9/11/15 for optimal use)
224 // *param[in] nbatchSize Batch size or the number of images in the batch
225 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
226 // *returns a RppStatus enumeration.
227 // *retval RPP_SUCCESS : No error, Succesful completion
228 // *retval RPP_ERROR : Error
229 
230 RppStatus rppi_fast_corner_detector_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *numOfPixels, Rpp8u *threshold, Rpp32u *nonmaxKernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
231 RppStatus rppi_fast_corner_detector_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *numOfPixels, Rpp8u *threshold, Rpp32u *nonmaxKernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
232 RppStatus rppi_fast_corner_detector_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *numOfPixels, Rpp8u *threshold, Rpp32u *nonmaxKernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
233 
234 /******************** reconstruction_laplacian_image_pyramid ********************/
235 
236 // Performs a reconstruction of original image from its laplacian image pyramid for a batch of images
237 
238 // *param[in] srcPtr1 Input image1
239 // *param[in] srcSize1 Array containing an RppiSize for each image in the image1 batch
240 // *param[in] maxSrcSize1 A single RppiSize which is the maxWidth and maxHeight for all images in the image1 batch
241 // *param[in] srcPtr2 Input image2
242 // *param[in] srcSize1 Array containing an RppiSize for each image in the image2 batch
243 // *param[in] maxSrcSize1 A single RppiSize which is the maxWidth and maxHeight for all images in the image2 batch
244 // *param[out] dstPtr Output image batch
245 // *param[in] stdDev Array containing an Rpp32f standard deviation for each image in the batch (stdDev[n] >= 0)
246 // *param[in] kerenelSize Array containing an Rpp32u kernel size for each image in the batch (kernelSize[n] = 3/5/7 for optimal use)
247 // *param[in] nbatchSize Batch size or the number of images in the batch
248 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
249 // *returns a RppStatus enumeration.
250 // *retval RPP_SUCCESS : No error, Succesful completion
251 // *retval RPP_ERROR : Error
252 
253 RppStatus rppi_reconstruction_laplacian_image_pyramid_u8_pln1_batchPD_host(RppPtr_t srcPtr1, RppiSize *srcSize1, RppiSize maxSrcSize1, RppPtr_t srcPtr2, RppiSize *srcSize2, RppiSize maxSrcSize2, RppPtr_t dstPtr, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
254 RppStatus rppi_reconstruction_laplacian_image_pyramid_u8_pln3_batchPD_host(RppPtr_t srcPtr1, RppiSize *srcSize1, RppiSize maxSrcSize1, RppPtr_t srcPtr2, RppiSize *srcSize2, RppiSize maxSrcSize2, RppPtr_t dstPtr, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
255 RppStatus rppi_reconstruction_laplacian_image_pyramid_u8_pkd3_batchPD_host(RppPtr_t srcPtr1, RppiSize *srcSize1, RppiSize maxSrcSize1, RppPtr_t srcPtr2, RppiSize *srcSize2, RppiSize maxSrcSize2, RppPtr_t dstPtr, Rpp32f *stdDev, Rpp32u *kernelSize, Rpp32u nbatchSize, rppHandle_t rppHandle);
256 
257 /******************** control_flow ********************/
258 
259 RppStatus rpp_bool_control_flow(bool num1, bool num2, bool *output, RppOp operation, rppHandle_t rppHandle);
260 RppStatus rpp_u8_control_flow(Rpp8u num1, Rpp8u num2, Rpp8u *output, RppOp operation, rppHandle_t rppHandle);
261 
262 /******************** hough_lines ********************/
263 
264 // Runs the hough lines algorithm using the progressive probabilistic Hough Transform to find lines in a batch of images (the inputs must be single channel outputs from a canny edge detector)
265 
266 // *param[in] srcPtr Input image batch
267 // *param[in] srcSize Array containing an RppiSize for each image in the batch
268 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
269 // *param[out] lines Output line coordinate in the form [x1_start, y1_start, x1_end, y1_end, x2_start, y2_start, x2_end, y2_end .....]
270 // *param[in] rho Array containing an Rpp32f rho for each image in the batch (Distance resolution of the parameter in pixels)
271 // *param[in] theta Array containing an Rpp32f theta for each image in the batch (Angle resolution of the parameter in radians)
272 // *param[in] threshold Array containing an Rpp32u threshold for each image in the batch (The minimum number of intersections to detect a line)
273 // *param[in] minLineLength Array containing an Rpp32u minimum line length for each image in the batch (The minimum number of points that can form a line. Line segments shorter than that are rejected)
274 // *param[in] maxLineGap Array containing an Rpp32u maximum line gap for each image in the batch (The maximum allowed gap between points on the same line to link them)
275 // *param[in] linesMax Array containing an Rpp32u maximum number of detected lines for each image in the batch
276 // *param[in] nbatchSize Batch size or the number of images in the batch
277 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
278 // *returns a RppStatus enumeration.
279 // *retval RPP_SUCCESS : No error, Succesful completion
280 // *retval RPP_ERROR : Error
281 
282 RppStatus rppi_hough_lines_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t lines, Rpp32f* rho, Rpp32f* theta, Rpp32u *threshold, Rpp32u *minLineLength, Rpp32u *maxLineGap, Rpp32u *linesMax, Rpp32u nbatchSize, rppHandle_t rppHandle);
283 
284 /******************** hog ********************/
285 
286 // Finds the histogram of oriented gradients for a batch of images
287 
288 // *param[in] srcPtr Input image batch
289 // *param[in] srcSize Array containing an RppiSize for each image in the batch
290 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
291 // *param[out] binsTensor Output HOG bins tensor
292 // *param[in] binsTensorLength Array containing an Rpp32u length value of the HOG bins tensor for each image in the batch
293 // *param[in] kernelSize Array containing an RppiSize kernel width/height size pair for each image in the batch
294 // *param[in] windowSize Array containing an RppiSize window width/height size pair for each image in the batch (windowSize[n] must be even muliple of kernelSize[n])
295 // *param[in] windowStride Array containing an Rpp32u window stride for each image in the batch
296 // *param[in] numOfBins Array containing an Rpp32u number of HOG bins for each image in the batch
297 // *param[in] nbatchSize Batch size or the number of images in the batch
298 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
299 // *returns a RppStatus enumeration.
300 // *retval RPP_SUCCESS : No error, Succesful completion
301 // *retval RPP_ERROR : Error
302 
303 RppStatus rppi_hog_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t binsTensor, Rpp32u *binsTensorLength, RppiSize *kernelSize, RppiSize *windowSize, Rpp32u *windowStride, Rpp32u *numOfBins, Rpp32u nbatchSize, rppHandle_t rppHandle);
304 
305 /******************** remap ********************/
306 
307 // Performs a remap operation using user specified remap tables for a batch of images. For each image, the output(x,y) = input(mapx(x, y), mapy(x, y)) for every (x,y) in the destination image
308 
309 // *param[in] srcPtr Input image batch
310 // *param[in] srcSize Array containing an RppiSize for each image in the batch
311 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
312 // *param[out] dstPtr Output image batch
313 // *param[in] rowRemapTable Array of Rpp32u row numbers for every pixel in the input batch of images
314 // *param[in] colRemapTable Array of Rpp32u column numbers for every pixel in the input batch of images
315 // *param[in] nbatchSize Batch size or the number of images in the batch
316 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
317 // *returns a RppStatus enumeration.
318 // *retval RPP_SUCCESS : No error, Succesful completion
319 // *retval RPP_ERROR : Error
320 
321 RppStatus rppi_remap_u8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *rowRemapTable, Rpp32u *colRemapTable, Rpp32u nbatchSize, rppHandle_t rppHandle);
322 RppStatus rppi_remap_u8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *rowRemapTable, Rpp32u *colRemapTable, Rpp32u nbatchSize, rppHandle_t rppHandle);
323 RppStatus rppi_remap_u8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *rowRemapTable, Rpp32u *colRemapTable, Rpp32u nbatchSize, rppHandle_t rppHandle);
324 #ifdef GPU_SUPPORT
325 RppStatus rppi_remap_u8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *rowRemapTable, Rpp32u *colRemapTable, Rpp32u nbatchSize, rppHandle_t rppHandle);
326 RppStatus rppi_remap_u8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *rowRemapTable, Rpp32u *colRemapTable, Rpp32u nbatchSize, rppHandle_t rppHandle);
327 RppStatus rppi_remap_u8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u *rowRemapTable, Rpp32u *colRemapTable, Rpp32u nbatchSize, rppHandle_t rppHandle);
328 #endif // GPU_SUPPORT
329 
330 /******************** tensor_matrix_multiply ********************/
331 
332 // Performs matrix multiplication on two tensors
333 
334 // *param[in] srcPtr1 Input tensor1
335 // *param[in] srcPtr2 Input tensor2
336 // *param[out] dstPtr Output tensor
337 // *param[in] tensorDimensionValues1 Array containing dimensions of tensor1
338 // *param[in] tensorDimensionValues2 Array containing dimensions of tensor2
339 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
340 // *returns a RppStatus enumeration.
341 // *retval RPP_SUCCESS : No error, Succesful completion
342 // *retval RPP_ERROR : Error
343 
344 RppStatus rppi_tensor_matrix_multiply_u8_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppPtr_t dstPtr, RppPtr_t tensorDimensionValues1, RppPtr_t tensorDimensionValues2, rppHandle_t rppHandle);
345 #ifdef GPU_SUPPORT
346 RppStatus rppi_tensor_matrix_multiply_u8_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RppPtr_t dstPtr, RppPtr_t tensorDimensionValues1, RppPtr_t tensorDimensionValues2, rppHandle_t rppHandle);
347 #endif // GPU_SUPPORT
348 
349 /******************** tensor_transpose ********************/
350 
351 // Performs a transpose of the input tensor based on the current shape and the permutation desired
352 
353 // *param[in] srcPtr Input tensor
354 // *param[out] dstPtr Output tensor
355 // *param[in] shape Current shape of tensor
356 // *param[in] perm Permutation of dimensions desired
357 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
358 // *returns a RppStatus enumeration.
359 // *retval RPP_SUCCESS : No error, Succesful completion
360 // *retval RPP_ERROR : Error
361 
362 RppStatus rppi_tensor_transpose_u8_host(RppPtr_t srcPtr, RppPtr_t dstPtr, Rpp32u *shape, Rpp32u *perm, rppHandle_t rppHandle);
363 RppStatus rppi_tensor_transpose_f16_host(RppPtr_t srcPtr, RppPtr_t dstPtr, Rpp32u *shape, Rpp32u *perm, rppHandle_t rppHandle);
364 RppStatus rppi_tensor_transpose_f32_host(RppPtr_t srcPtr, RppPtr_t dstPtr, Rpp32u *shape, Rpp32u *perm, rppHandle_t rppHandle);
365 RppStatus rppi_tensor_transpose_i8_host(RppPtr_t srcPtr, RppPtr_t dstPtr, Rpp32u *shape, Rpp32u *perm, rppHandle_t rppHandle);
366 #ifdef GPU_SUPPORT
367 RppStatus rppi_tensor_transpose_u8_gpu(RppPtr_t srcPtr, RppPtr_t dstPtr, RppPtr_t shape, RppPtr_t perm, rppHandle_t rppHandle);
368 RppStatus rppi_tensor_transpose_f16_gpu(RppPtr_t srcPtr, RppPtr_t dstPtr, RppPtr_t shape, RppPtr_t perm, rppHandle_t rppHandle);
369 RppStatus rppi_tensor_transpose_f32_gpu(RppPtr_t srcPtr, RppPtr_t dstPtr, RppPtr_t shape, RppPtr_t perm, rppHandle_t rppHandle);
370 RppStatus rppi_tensor_transpose_i8_gpu(RppPtr_t srcPtr, RppPtr_t dstPtr, RppPtr_t shape, RppPtr_t perm, rppHandle_t rppHandle);
371 #endif // GPU_SUPPORT
372 
373 /******************** convert_bit_depth ********************/
374 
375 // Converts bit depth of the elements of a batch of images
376 
377 // *param[in] srcPtr Input image batch
378 // *param[in] srcSize Array containing an RppiSize for each image in the batch
379 // *param[in] maxSrcSize A single RppiSize which is the maxWidth and maxHeight for all images in the batch
380 // *param[out] dstPtr Output image batch
381 // *param[in] nbatchSize Batch size or the number of images in the batch
382 // *param[in] rppHandle OpenCL-handle/HIP-handle for "_gpu" variants and Host-handle for "_host" variants
383 // *returns a RppStatus enumeration.
384 // *retval RPP_SUCCESS : No error, Succesful completion
385 // *retval RPP_ERROR : Error
386 
387 RppStatus rppi_convert_bit_depth_u8s8_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
388 RppStatus rppi_convert_bit_depth_u8u16_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
389 RppStatus rppi_convert_bit_depth_u8s16_pln1_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
390 RppStatus rppi_convert_bit_depth_u8s8_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
391 RppStatus rppi_convert_bit_depth_u8u16_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
392 RppStatus rppi_convert_bit_depth_u8s16_pln3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
393 RppStatus rppi_convert_bit_depth_u8s8_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
394 RppStatus rppi_convert_bit_depth_u8u16_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
395 RppStatus rppi_convert_bit_depth_u8s16_pkd3_batchPD_host(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
396 #ifdef GPU_SUPPORT
397 RppStatus rppi_convert_bit_depth_u8s8_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
398 RppStatus rppi_convert_bit_depth_u8u16_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
399 RppStatus rppi_convert_bit_depth_u8s16_pln1_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
400 RppStatus rppi_convert_bit_depth_u8s8_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
401 RppStatus rppi_convert_bit_depth_u8u16_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
402 RppStatus rppi_convert_bit_depth_u8s16_pln3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
403 RppStatus rppi_convert_bit_depth_u8s8_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
404 RppStatus rppi_convert_bit_depth_u8u16_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
405 RppStatus rppi_convert_bit_depth_u8s16_pkd3_batchPD_gpu(RppPtr_t srcPtr, RppiSize *srcSize, RppiSize maxSrcSize, RppPtr_t dstPtr, Rpp32u nbatchSize, rppHandle_t rppHandle);
406 #endif // GPU_SUPPORT
407 
411 #ifdef __cplusplus
412 }
413 #endif
414 
415 #endif
unsigned int Rpp32u
32 bit unsigned int
Definition: rppdefs.h:62
unsigned char Rpp8u
8 bit unsigned char
Definition: rppdefs.h:54
void * RppPtr_t
void pointer
Definition: rppdefs.h:74
RppStatus
RPP RppStatus type enums.
Definition: rppdefs.h:82
RppOp
RPP Operations type enum.
Definition: rppdefs.h:145
float Rpp32f
32 bit float
Definition: rppdefs.h:70
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:291