/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocal/checkouts/docs-7.0.0/rocAL/include/api/rocal_api_augmentation.h Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocal/checkouts/docs-7.0.0/rocAL/include/api/rocal_api_augmentation.h Source File#

rocAL: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocal/checkouts/docs-7.0.0/rocAL/include/api/rocal_api_augmentation.h Source File
rocal_api_augmentation.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2019 - 2025 Advanced Micro Devices, Inc. All rights reserved.
3 
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10 
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13 
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 THE SOFTWARE.
21 */
22 
23 #ifndef MIVISIONX_ROCAL_API_AUGMENTATION_H
24 #define MIVISIONX_ROCAL_API_AUGMENTATION_H
25 #include "rocal_api_types.h"
26 
45 extern "C" RocalTensor ROCAL_API_CALL rocalSequenceRearrange(RocalContext p_context, RocalTensor p_input,
46  std::vector<unsigned int> &new_order,
47  bool is_output);
48 
67 extern "C" RocalTensor ROCAL_API_CALL rocalResize(RocalContext context, RocalTensor input,
68  unsigned dest_width, unsigned dest_height,
69  bool is_output,
71  std::vector<unsigned> max_size = {},
72  unsigned resize_shorter = 0,
73  unsigned resize_longer = 0,
75  RocalTensorLayout output_layout = ROCAL_NONE,
76  RocalTensorOutputType output_datatype = ROCAL_UINT8);
77 
98 extern "C" RocalTensor ROCAL_API_CALL rocalResizeMirrorNormalize(RocalContext p_context, RocalTensor p_input, unsigned dest_width,
99  unsigned dest_height, std::vector<float> &mean, std::vector<float> &std_dev,
100  bool is_output,
102  std::vector<unsigned> max_size = {}, unsigned resize_shorter = 0,
103  unsigned resize_longer = 0,
105  RocalIntParam mirror = NULL,
106  RocalTensorLayout output_layout = ROCAL_NONE,
107  RocalTensorOutputType output_datatype = ROCAL_UINT8);
108 
125 extern "C" RocalTensor ROCAL_API_CALL rocalCropResize(RocalContext context, RocalTensor input,
126  unsigned dest_width, unsigned dest_height,
127  bool is_output,
128  RocalFloatParam area = NULL,
129  RocalFloatParam aspect_ratio = NULL,
130  RocalFloatParam x_center_drift = NULL,
131  RocalFloatParam y_center_drift = NULL,
132  RocalTensorLayout output_layout = ROCAL_NONE,
133  RocalTensorOutputType output_datatype = ROCAL_UINT8);
134 
151 extern "C" RocalTensor ROCAL_API_CALL rocalCropResizeFixed(RocalContext context, RocalTensor input,
152  unsigned dest_width, unsigned dest_height,
153  bool is_output,
154  float area, float aspect_ratio,
155  float x_center_drift, float y_center_drift,
156  RocalTensorLayout output_layout = ROCAL_NONE,
157  RocalTensorOutputType output_datatype = ROCAL_UINT8);
158 
175 extern "C" RocalTensor ROCAL_API_CALL rocalROIResize(RocalContext context, RocalTensor input,
176  unsigned dest_width, unsigned dest_height,
177  bool is_output,
178  unsigned roi_h,
179  unsigned roi_w,
180  float roi_pos_x = 0.0f,
181  float roi_pos_y = 0.0f,
183  RocalTensorLayout output_layout = ROCAL_NONE,
184  RocalTensorOutputType output_datatype = ROCAL_UINT8);
185 
200 extern "C" RocalTensor ROCAL_API_CALL rocalRotate(RocalContext context, RocalTensor input, bool is_output,
201  RocalFloatParam angle = NULL, unsigned dest_width = 0,
202  unsigned dest_height = 0,
204  RocalTensorLayout output_layout = ROCAL_NONE,
205  RocalTensorOutputType output_datatype = ROCAL_UINT8);
206 
220 extern "C" RocalTensor ROCAL_API_CALL rocalRotateFixed(RocalContext context, RocalTensor input, float angle,
221  bool is_output, unsigned dest_width = 0, unsigned dest_height = 0,
223  RocalTensorLayout output_layout = ROCAL_NONE,
224  RocalTensorOutputType output_datatype = ROCAL_UINT8);
225 
237 extern "C" RocalTensor ROCAL_API_CALL rocalBrightness(RocalContext context, RocalTensor input, bool is_output,
238  RocalFloatParam alpha = NULL, RocalFloatParam beta = NULL,
239  RocalTensorLayout output_layout = ROCAL_NONE,
240  RocalTensorOutputType output_datatype = ROCAL_UINT8);
241 
253 extern "C" RocalTensor ROCAL_API_CALL rocalBrightnessFixed(RocalContext context, RocalTensor input,
254  float alpha, float beta,
255  bool is_output,
256  RocalTensorLayout output_layout = ROCAL_NONE,
257  RocalTensorOutputType output_datatype = ROCAL_UINT8);
258 
269 extern "C" RocalTensor ROCAL_API_CALL rocalGamma(RocalContext context, RocalTensor input,
270  bool is_output,
271  RocalFloatParam gamma = NULL,
272  RocalTensorLayout output_layout = ROCAL_NONE,
273  RocalTensorOutputType output_datatype = ROCAL_UINT8);
274 
285 extern "C" RocalTensor ROCAL_API_CALL rocalGammaFixed(RocalContext context, RocalTensor input,
286  float gamma,
287  bool is_output,
288  RocalTensorLayout output_layout = ROCAL_NONE,
289  RocalTensorOutputType output_datatype = ROCAL_UINT8);
290 
302 extern "C" RocalTensor ROCAL_API_CALL rocalContrast(RocalContext context, RocalTensor input,
303  bool is_output,
304  RocalFloatParam contrast_factor = NULL, RocalFloatParam contrast_center = NULL,
305  RocalTensorLayout output_layout = ROCAL_NONE,
306  RocalTensorOutputType output_datatype = ROCAL_UINT8);
307 
319 extern "C" RocalTensor ROCAL_API_CALL rocalContrastFixed(RocalContext context, RocalTensor input,
320  float contrast_factor, float contrast_center,
321  bool is_output,
322  RocalTensorLayout output_layout = ROCAL_NONE,
323  RocalTensorOutputType output_datatype = ROCAL_UINT8);
324 
336 extern "C" RocalTensor ROCAL_API_CALL rocalFlip(RocalContext context, RocalTensor input, bool is_output,
337  RocalIntParam horizonal_flag = NULL, RocalIntParam vertical_flag = NULL,
338  RocalTensorLayout output_layout = ROCAL_NONE,
339  RocalTensorOutputType output_datatype = ROCAL_UINT8);
340 
352 extern "C" RocalTensor ROCAL_API_CALL rocalFlipFixed(RocalContext context, RocalTensor input,
353  int horizonal_flag, int vertical_flag, bool is_output,
354  RocalTensorLayout output_layout = ROCAL_NONE,
355  RocalTensorOutputType output_datatype = ROCAL_UINT8);
356 
366 extern "C" RocalTensor ROCAL_API_CALL rocalBlur(RocalContext context, RocalTensor input,
367  bool is_output,
368  RocalTensorLayout output_layout = ROCAL_NONE,
369  RocalTensorOutputType output_datatype = ROCAL_UINT8);
370 
382 extern "C" RocalTensor ROCAL_API_CALL rocalBlend(RocalContext context, RocalTensor input1, RocalTensor input2,
383  bool is_output,
384  RocalFloatParam ratio = NULL,
385  RocalTensorLayout output_layout = ROCAL_NONE,
386  RocalTensorOutputType output_datatype = ROCAL_UINT8);
387 
399 extern "C" RocalTensor ROCAL_API_CALL rocalBlendFixed(RocalContext context, RocalTensor input1, RocalTensor input2,
400  float ratio, bool is_output,
401  RocalTensorLayout output_layout = ROCAL_NONE,
402  RocalTensorOutputType output_datatype = ROCAL_UINT8);
403 
422 extern "C" RocalTensor ROCAL_API_CALL rocalWarpAffine(RocalContext context, RocalTensor input, bool is_output,
423  unsigned dest_height = 0, unsigned dest_width = 0,
424  RocalFloatParam x0 = NULL, RocalFloatParam x1 = NULL,
425  RocalFloatParam y0 = NULL, RocalFloatParam y1 = NULL,
426  RocalFloatParam o0 = NULL, RocalFloatParam o1 = NULL,
428  RocalTensorLayout output_layout = ROCAL_NONE,
429  RocalTensorOutputType output_datatype = ROCAL_UINT8);
430 
449 extern "C" RocalTensor ROCAL_API_CALL rocalWarpAffineFixed(RocalContext context, RocalTensor input, float x0, float x1,
450  float y0, float y1, float o0, float o1, bool is_output,
451  unsigned int dest_height = 0, unsigned int dest_width = 0,
453  RocalTensorLayout output_layout = ROCAL_NONE,
454  RocalTensorOutputType output_datatype = ROCAL_UINT8);
455 
465 extern "C" RocalTensor ROCAL_API_CALL rocalFishEye(RocalContext context, RocalTensor input, bool is_output,
466  RocalTensorLayout output_layout = ROCAL_NONE,
467  RocalTensorOutputType output_datatype = ROCAL_UINT8);
468 
480 extern "C" RocalTensor ROCAL_API_CALL rocalVignette(RocalContext context, RocalTensor input,
481  bool is_output, RocalFloatParam sdev = NULL,
482  RocalTensorLayout output_layout = ROCAL_NONE,
483  RocalTensorOutputType output_datatype = ROCAL_UINT8);
484 
496 extern "C" RocalTensor ROCAL_API_CALL rocalVignetteFixed(RocalContext context, RocalTensor input,
497  float sdev, bool is_output,
498  RocalTensorLayout output_layout = ROCAL_NONE,
499  RocalTensorOutputType output_datatype = ROCAL_UINT8);
500 
512 extern "C" RocalTensor ROCAL_API_CALL rocalJitter(RocalContext context, RocalTensor input,
513  bool is_output,
514  RocalIntParam kernel_size = NULL,
515  int seed = 0,
516  RocalTensorLayout output_layout = ROCAL_NONE,
517  RocalTensorOutputType output_datatype = ROCAL_UINT8);
518 
530 extern "C" RocalTensor ROCAL_API_CALL rocalJitterFixed(RocalContext context, RocalTensor input,
531  int kernel_size, bool is_output, int seed = 0,
532  RocalTensorLayout output_layout = ROCAL_NONE,
533  RocalTensorOutputType output_datatype = ROCAL_UINT8);
534 
549 extern "C" RocalTensor ROCAL_API_CALL rocalSnPNoise(RocalContext context, RocalTensor input,
550  bool is_output,
551  RocalFloatParam noise_prob = NULL, RocalFloatParam salt_prob = NULL,
552  RocalFloatParam salt_val = NULL, RocalFloatParam pepper_val = NULL,
553  int seed = 0,
554  RocalTensorLayout output_layout = ROCAL_NONE,
555  RocalTensorOutputType output_datatype = ROCAL_UINT8);
556 
571 extern "C" RocalTensor ROCAL_API_CALL rocalSnPNoiseFixed(RocalContext context, RocalTensor input,
572  float noise_prob, float salt_prob,
573  float salt_val, float pepper_val,
574  bool is_output, int seed = 0,
575  RocalTensorLayout output_layout = ROCAL_NONE,
576  RocalTensorOutputType output_datatype = ROCAL_UINT8);
577 
588 extern "C" RocalTensor ROCAL_API_CALL rocalSnow(RocalContext context, RocalTensor input,
589  bool is_output,
590  RocalFloatParam snow = NULL,
591  RocalTensorLayout output_layout = ROCAL_NONE,
592  RocalTensorOutputType output_datatype = ROCAL_UINT8);
593 
604 extern "C" RocalTensor ROCAL_API_CALL rocalSnowFixed(RocalContext context, RocalTensor input,
605  float snow, bool is_output,
606  RocalTensorLayout output_layout = ROCAL_NONE,
607  RocalTensorOutputType output_datatype = ROCAL_UINT8);
608 
623 extern "C" RocalTensor ROCAL_API_CALL rocalRain(RocalContext context, RocalTensor input,
624  bool is_output,
625  float rain_percentage = 0.0,
626  int rain_width = 0,
627  int rain_height = 0,
628  float rain_slant_angle = 0.0,
629  RocalFloatParam rain_transparency = NULL,
630  RocalTensorLayout output_layout = ROCAL_NONE,
631  RocalTensorOutputType output_datatype = ROCAL_UINT8);
632 
647 extern "C" RocalTensor ROCAL_API_CALL rocalRainFixed(RocalContext context, RocalTensor input,
648  bool is_output,
649  float rain_percentage = 0.0,
650  int rain_width = 0,
651  int rain_height = 0,
652  float rain_slant_angle = 0.0,
653  float rain_transparency = 0.0,
654  RocalTensorLayout output_layout = ROCAL_NONE,
655  RocalTensorOutputType output_datatype = ROCAL_UINT8);
656 
667 extern "C" RocalTensor ROCAL_API_CALL rocalColorTemp(RocalContext context, RocalTensor input,
668  bool is_output,
669  RocalIntParam adjustment = NULL,
670  RocalTensorLayout output_layout = ROCAL_NONE,
671  RocalTensorOutputType output_datatype = ROCAL_UINT8);
672 
683 extern "C" RocalTensor ROCAL_API_CALL rocalColorTempFixed(RocalContext context, RocalTensor input,
684  int adjustment, bool is_output,
685  RocalTensorLayout output_layout = ROCAL_NONE,
686  RocalTensorOutputType output_datatype = ROCAL_UINT8);
687 
699 extern "C" RocalTensor ROCAL_API_CALL rocalFog(RocalContext context, RocalTensor input,
700  bool is_output,
701  RocalFloatParam intensity_value = NULL,
702  RocalFloatParam gray_value = NULL,
703  RocalTensorLayout output_layout = ROCAL_NONE,
704  RocalTensorOutputType output_datatype = ROCAL_UINT8);
705 
717 extern "C" RocalTensor ROCAL_API_CALL rocalFogFixed(RocalContext context, RocalTensor input,
718  float fog_value, float gray_value, bool is_output,
719  RocalTensorLayout output_layout = ROCAL_NONE,
720  RocalTensorOutputType output_datatype = ROCAL_UINT8);
721 
733 extern "C" RocalTensor ROCAL_API_CALL rocalLensCorrection(RocalContext context, RocalTensor input,
734  std::vector<CameraMatrix> camera_matrix, std::vector<DistortionCoeffs> distortion_coeffs,
735  bool is_output, RocalTensorLayout output_layout = ROCAL_NONE,
736  RocalTensorOutputType output_datatype = ROCAL_UINT8);
737 
748 extern "C" RocalTensor ROCAL_API_CALL rocalPixelate(RocalContext context, RocalTensor input,
749  bool is_output, float pixelate_percentage = 50.0,
750  RocalTensorLayout output_layout = ROCAL_NONE,
751  RocalTensorOutputType output_datatype = ROCAL_UINT8);
752 
763 extern "C" RocalTensor ROCAL_API_CALL rocalExposure(RocalContext context, RocalTensor input,
764  bool is_output,
765  RocalFloatParam exposure_factor = NULL,
766  RocalTensorLayout output_layout = ROCAL_NONE,
767  RocalTensorOutputType output_datatype = ROCAL_UINT8);
768 
779 extern "C" RocalTensor ROCAL_API_CALL rocalExposureFixed(RocalContext context, RocalTensor input,
780  float exposure_factor, bool is_output,
781  RocalTensorLayout output_layout = ROCAL_NONE,
782  RocalTensorOutputType output_datatype = ROCAL_UINT8);
783 
794 extern "C" RocalTensor ROCAL_API_CALL rocalHue(RocalContext context, RocalTensor input,
795  bool is_output,
796  RocalFloatParam hue = NULL,
797  RocalTensorLayout output_layout = ROCAL_NONE,
798  RocalTensorOutputType output_datatype = ROCAL_UINT8);
799 
810 extern "C" RocalTensor ROCAL_API_CALL rocalHueFixed(RocalContext context, RocalTensor input,
811  float hue,
812  bool is_output,
813  RocalTensorLayout output_layout = ROCAL_NONE,
814  RocalTensorOutputType output_datatype = ROCAL_UINT8);
815 
826 extern "C" RocalTensor ROCAL_API_CALL rocalSaturation(RocalContext context, RocalTensor input,
827  bool is_output,
828  RocalFloatParam saturation = NULL,
829  RocalTensorLayout output_layout = ROCAL_NONE,
830  RocalTensorOutputType output_datatype = ROCAL_UINT8);
831 
842 extern "C" RocalTensor ROCAL_API_CALL rocalSaturationFixed(RocalContext context, RocalTensor input,
843  float saturation, bool is_output,
844  RocalTensorLayout output_layout = ROCAL_NONE,
845  RocalTensorOutputType output_datatype = ROCAL_UINT8);
846 
854 extern "C" RocalTensor ROCAL_API_CALL rocalCopy(RocalContext context, RocalTensor input, bool is_output);
855 
863 extern "C" RocalTensor ROCAL_API_CALL rocalNop(RocalContext context, RocalTensor input, bool is_output);
864 
878 extern "C" RocalTensor ROCAL_API_CALL rocalColorTwist(RocalContext context, RocalTensor input,
879  bool is_output,
880  RocalFloatParam alpha = NULL,
881  RocalFloatParam beta = NULL,
882  RocalFloatParam hue = NULL,
883  RocalFloatParam sat = NULL,
884  RocalTensorLayout output_layout = ROCAL_NONE,
885  RocalTensorOutputType output_datatype = ROCAL_UINT8);
886 
900 extern "C" RocalTensor ROCAL_API_CALL rocalColorTwistFixed(RocalContext context, RocalTensor input,
901  float alpha,
902  float beta,
903  float hue,
904  float sat,
905  bool is_output,
906  RocalTensorLayout output_layout = ROCAL_NONE,
907  RocalTensorOutputType output_datatype = ROCAL_UINT8);
908 
925 extern "C" RocalTensor ROCAL_API_CALL rocalCropMirrorNormalize(RocalContext context, RocalTensor input,
926  unsigned crop_height,
927  unsigned crop_width,
928  float start_x,
929  float start_y,
930  std::vector<float> &mean,
931  std::vector<float> &std_dev,
932  bool is_output,
933  RocalIntParam mirror = NULL,
934  RocalTensorLayout output_layout = ROCAL_NONE,
935  RocalTensorOutputType output_datatype = ROCAL_UINT8);
936 
952 extern "C" RocalTensor ROCAL_API_CALL rocalCrop(RocalContext context, RocalTensor input, bool is_output,
953  RocalFloatParam crop_width = NULL,
954  RocalFloatParam crop_height = NULL,
955  RocalFloatParam crop_depth = NULL,
956  RocalFloatParam crop_pox_x = NULL,
957  RocalFloatParam crop_pos_y = NULL,
958  RocalFloatParam crop_pos_z = NULL,
959  RocalTensorLayout output_layout = ROCAL_NONE,
960  RocalTensorOutputType output_datatype = ROCAL_UINT8);
961 
977 extern "C" RocalTensor ROCAL_API_CALL rocalCropFixed(RocalContext context, RocalTensor input,
978  unsigned crop_width,
979  unsigned crop_height,
980  unsigned crop_depth,
981  bool is_output,
982  float crop_pox_x,
983  float crop_pos_y,
984  float crop_pos_z,
985  RocalTensorLayout output_layout = ROCAL_NONE,
986  RocalTensorOutputType output_datatype = ROCAL_UINT8);
987 
1000 extern "C" RocalTensor ROCAL_API_CALL rocalCropCenterFixed(RocalContext context, RocalTensor input,
1001  unsigned crop_width,
1002  unsigned crop_height,
1003  unsigned crop_depth,
1004  bool is_output,
1005  RocalTensorLayout output_layout = ROCAL_NONE,
1006  RocalTensorOutputType output_datatype = ROCAL_UINT8);
1007 
1022 extern "C" RocalTensor ROCAL_API_CALL rocalResizeCropMirrorFixed(RocalContext context, RocalTensor input,
1023  unsigned dest_width, unsigned dest_height,
1024  bool is_output,
1025  unsigned crop_h,
1026  unsigned crop_w,
1027  RocalIntParam mirror,
1028  RocalTensorLayout output_layout = ROCAL_NONE,
1029  RocalTensorOutputType output_datatype = ROCAL_UINT8);
1030 
1045 extern "C" RocalTensor ROCAL_API_CALL rocalResizeCropMirror(RocalContext context, RocalTensor input,
1046  unsigned dest_width, unsigned dest_height,
1047  bool is_output, RocalFloatParam crop_height = NULL,
1048  RocalFloatParam crop_width = NULL, RocalIntParam mirror = NULL,
1049  RocalTensorLayout output_layout = ROCAL_NONE,
1050  RocalTensorOutputType output_datatype = ROCAL_UINT8);
1051 
1066 extern "C" RocalTensor ROCAL_API_CALL rocalRandomCrop(RocalContext context, RocalTensor input,
1067  bool is_output,
1068  RocalFloatParam crop_area_factor = NULL,
1069  RocalFloatParam crop_aspect_ratio = NULL,
1070  RocalFloatParam crop_pos_x = NULL,
1071  RocalFloatParam crop_pos_y = NULL,
1072  int num_of_attempts = 20,
1073  RocalTensorLayout output_layout = ROCAL_NONE,
1074  RocalTensorOutputType output_datatype = ROCAL_UINT8);
1075 
1091 extern "C" RocalTensor ROCAL_API_CALL rocalSSDRandomCrop(RocalContext context, RocalTensor input,
1092  bool is_output,
1093  RocalFloatParam threshold = NULL,
1094  RocalFloatParam crop_area_factor = NULL,
1095  RocalFloatParam crop_aspect_ratio = NULL,
1096  RocalFloatParam crop_pos_x = NULL,
1097  RocalFloatParam crop_pos_y = NULL,
1098  int num_of_attempts = 20,
1099  RocalTensorLayout output_layout = ROCAL_NONE,
1100  RocalTensorOutputType output_datatype = ROCAL_UINT8);
1101 
1112 extern "C" RocalTensor ROCAL_API_CALL rocalPreEmphasisFilter(RocalContext context,
1113  RocalTensor input,
1114  bool is_output,
1115  RocalFloatParam preemph_coeff = NULL,
1117  RocalTensorOutputType output_datatype = ROCAL_FP32);
1118 
1135 extern "C" RocalTensor ROCAL_API_CALL rocalSpectrogram(RocalContext context,
1136  RocalTensor input,
1137  bool is_output,
1138  std::vector<float> &window_fn,
1139  bool center_windows,
1140  bool reflect_padding,
1141  int power,
1142  int nfft,
1143  int window_length = 512,
1144  int window_step = 256,
1145  RocalTensorLayout output_layout = ROCAL_NFT,
1146  RocalTensorOutputType output_datatype = ROCAL_FP32);
1147 
1159 extern "C" RocalTensor ROCAL_API_CALL rocalToDecibels(RocalContext p_context,
1160  RocalTensor p_input,
1161  bool is_output,
1162  float cutoff_db,
1163  float multiplier,
1164  float reference_magnitude,
1165  RocalTensorOutputType rocal_tensor_output_type);
1166 
1178 extern "C" RocalTensor ROCAL_API_CALL rocalResample(RocalContext p_context,
1179  RocalTensor p_input,
1180  RocalTensor p_output_resample_rate,
1181  bool is_output,
1182  float sample_hint,
1183  float quality = 50.0,
1184  RocalTensorOutputType output_datatype = ROCAL_FP32);
1185 
1194 extern "C" RocalTensor ROCAL_API_CALL rocalUniformDistribution(RocalContext p_context,
1195  RocalTensor p_input,
1196  bool is_output,
1197  std::vector<float> &range);
1198 
1207 extern "C" RocalTensor ROCAL_API_CALL rocalNormalDistribution(RocalContext p_context,
1208  RocalTensor p_input,
1209  bool is_output,
1210  float mean = 0.0,
1211  float stddev = 0.0);
1212 
1221 extern "C" RocalTensor ROCAL_API_CALL rocalTensorMulScalar(RocalContext p_context,
1222  RocalTensor p_input,
1223  bool is_output,
1224  float scalar = 0.0,
1225  RocalTensorOutputType output_datatype = ROCAL_FP32);
1226 
1235 extern "C" RocalTensor ROCAL_API_CALL rocalTensorAddTensor(RocalContext p_context,
1236  RocalTensor p_input1,
1237  RocalTensor p_input2,
1238  bool is_output,
1239  RocalTensorOutputType output_datatype = ROCAL_FP32);
1240 
1253  RocalTensor input,
1254  bool is_output,
1255  float cutoff_db,
1256  float reference_power,
1257  int reset_interval,
1258  int window_length);
1259 
1272 extern "C" RocalTensor ROCAL_API_CALL rocalSlice(RocalContext context,
1273  RocalTensor input,
1274  bool is_output,
1275  RocalTensor anchor,
1276  RocalTensor shape,
1277  std::vector<float> fill_values,
1279  RocalTensorOutputType output_datatype = ROCAL_FP32);
1280 
1294 extern "C" RocalTensor ROCAL_API_CALL rocalNormalize(RocalContext context, RocalTensor input,
1295  std::vector<unsigned> &axes,
1296  std::vector<float> &mean,
1297  std::vector<float> &std_dev,
1298  bool is_output,
1299  float scale = 1.0, float shift = 0.0,
1300  RocalTensorOutputType output_datatype = ROCAL_FP32);
1301 
1317 extern "C" RocalTensor ROCAL_API_CALL rocalMelFilterBank(RocalContext p_context,
1318  RocalTensor p_input,
1319  bool is_output,
1320  float freq_high,
1321  float freq_low,
1322  RocalMelScaleFormula mel_formula,
1323  int nfilter,
1324  bool normalize,
1325  float sample_rate,
1326  RocalTensorOutputType output_datatype);
1327 
1338 extern "C" RocalTensor ROCAL_API_CALL rocalTranspose(RocalContext context, RocalTensor input, std::vector<unsigned> perm, bool is_output,
1339  RocalTensorLayout output_layout = ROCAL_NONE);
1340 
1347 extern "C" RocalTensor ROCAL_API_CALL rocalLog1p(RocalContext p_context,
1348  RocalTensor p_input,
1349  bool is_output);
1350 
1351 #endif // MIVISIONX_ROCAL_API_AUGMENTATION_H
RocalTensor ROCAL_API_CALL rocalContrastFixed(RocalContext context, RocalTensor input, float contrast_factor, float contrast_center, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Adjusts contrast of the image with fixed parameters.
RocalTensor ROCAL_API_CALL rocalSlice(RocalContext context, RocalTensor input, bool is_output, RocalTensor anchor, RocalTensor shape, std::vector< float > fill_values, RocalOutOfBoundsPolicy policy=RocalOutOfBoundsPolicy::ROCAL_ERROR, RocalTensorOutputType output_datatype=ROCAL_FP32)
Extracts the sub-tensor from a given input tensor.
RocalTensor ROCAL_API_CALL rocalSequenceRearrange(RocalContext p_context, RocalTensor p_input, std::vector< unsigned int > &new_order, bool is_output)
Rearranges the order of the frames in the sequences with respect to new_order. new_order can have val...
RocalTensor ROCAL_API_CALL rocalFishEye(RocalContext context, RocalTensor input, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies fish eye effect on images.
RocalTensor ROCAL_API_CALL rocalBlend(RocalContext context, RocalTensor input1, RocalTensor input2, bool is_output, RocalFloatParam ratio=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Blends two input images given the ratio: output = input1*ratio + input2*(1-ratio)
RocalTensor ROCAL_API_CALL rocalHue(RocalContext context, RocalTensor input, bool is_output, RocalFloatParam hue=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Adjusts the hue in images.
RocalTensor ROCAL_API_CALL rocalBlendFixed(RocalContext context, RocalTensor input1, RocalTensor input2, float ratio, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Blends two input images given the fixed ratio: output = input1*ratio + input2*(1-ratio)
RocalTensor ROCAL_API_CALL rocalSpectrogram(RocalContext context, RocalTensor input, bool is_output, std::vector< float > &window_fn, bool center_windows, bool reflect_padding, int power, int nfft, int window_length=512, int window_step=256, RocalTensorLayout output_layout=ROCAL_NFT, RocalTensorOutputType output_datatype=ROCAL_FP32)
Produces a spectrogram from a 1D audio signal.
RocalTensor ROCAL_API_CALL rocalCropResize(RocalContext context, RocalTensor input, unsigned dest_width, unsigned dest_height, bool is_output, RocalFloatParam area=NULL, RocalFloatParam aspect_ratio=NULL, RocalFloatParam x_center_drift=NULL, RocalFloatParam y_center_drift=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Fused function which perrforms crop and resize on images.
RocalTensor ROCAL_API_CALL rocalCropMirrorNormalize(RocalContext context, RocalTensor input, unsigned crop_height, unsigned crop_width, float start_x, float start_y, std::vector< float > &mean, std::vector< float > &std_dev, bool is_output, RocalIntParam mirror=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Fused function which performs crop, normalize and flip on images.
RocalTensor ROCAL_API_CALL rocalJitter(RocalContext context, RocalTensor input, bool is_output, RocalIntParam kernel_size=NULL, int seed=0, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies jitter effect on images.
RocalTensor ROCAL_API_CALL rocalResize(RocalContext context, RocalTensor input, unsigned dest_width, unsigned dest_height, bool is_output, RocalResizeScalingMode scaling_mode=ROCAL_SCALING_MODE_STRETCH, std::vector< unsigned > max_size={}, unsigned resize_shorter=0, unsigned resize_longer=0, RocalResizeInterpolationType interpolation_type=ROCAL_LINEAR_INTERPOLATION, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Resize images.
RocalTensor ROCAL_API_CALL rocalMelFilterBank(RocalContext p_context, RocalTensor p_input, bool is_output, float freq_high, float freq_low, RocalMelScaleFormula mel_formula, int nfilter, bool normalize, float sample_rate, RocalTensorOutputType output_datatype)
Applies mel-filter bank augmentation on the given input tensor.
RocalTensor ROCAL_API_CALL rocalPreEmphasisFilter(RocalContext context, RocalTensor input, bool is_output, RocalFloatParam preemph_coeff=NULL, RocalAudioBorderType preemph_border_type=RocalAudioBorderType::ROCAL_CLAMP, RocalTensorOutputType output_datatype=ROCAL_FP32)
Applies preemphasis filter to the input data.
RocalTensor ROCAL_API_CALL rocalSaturationFixed(RocalContext context, RocalTensor input, float saturation, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Adjusts the saturation in images with fixed parameters.
RocalTensor ROCAL_API_CALL rocalUniformDistribution(RocalContext p_context, RocalTensor p_input, bool is_output, std::vector< float > &range)
Creates and returns rocALTensor generated from an uniform distribution.
RocalTensor ROCAL_API_CALL rocalExposureFixed(RocalContext context, RocalTensor input, float exposure_factor, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Adjusts the exposure in images with fixed parameters.
RocalTensor ROCAL_API_CALL rocalExposure(RocalContext context, RocalTensor input, bool is_output, RocalFloatParam exposure_factor=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Adjusts the exposure in images.
RocalTensor ROCAL_API_CALL rocalBlur(RocalContext context, RocalTensor input, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies blur effect to images.
RocalTensor ROCAL_API_CALL rocalSnowFixed(RocalContext context, RocalTensor input, float snow, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies snow effect on images with fixed parameter.
RocalTensor ROCAL_API_CALL rocalLensCorrection(RocalContext context, RocalTensor input, std::vector< CameraMatrix > camera_matrix, std::vector< DistortionCoeffs > distortion_coeffs, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies lens correction effect on images with fixed parameters.
RocalTensor ROCAL_API_CALL rocalContrast(RocalContext context, RocalTensor input, bool is_output, RocalFloatParam contrast_factor=NULL, RocalFloatParam contrast_center=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Adjusts contrast of the image.
RocalTensor ROCAL_API_CALL rocalVignetteFixed(RocalContext context, RocalTensor input, float sdev, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies vignette effect on images with fixed parameters.
RocalTensor ROCAL_API_CALL rocalFogFixed(RocalContext context, RocalTensor input, float fog_value, float gray_value, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies fog effect on images with fixed parameter.
RocalTensor ROCAL_API_CALL rocalSaturation(RocalContext context, RocalTensor input, bool is_output, RocalFloatParam saturation=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Adjusts the saturation in images.
RocalTensor ROCAL_API_CALL rocalWarpAffineFixed(RocalContext context, RocalTensor input, float x0, float x1, float y0, float y1, float o0, float o1, bool is_output, unsigned int dest_height=0, unsigned int dest_width=0, RocalResizeInterpolationType interpolation_type=ROCAL_LINEAR_INTERPOLATION, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies affine transformation to images with fixed affine matrix.
RocalTensor ROCAL_API_CALL rocalPixelate(RocalContext context, RocalTensor input, bool is_output, float pixelate_percentage=50.0, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies pixelate effect on images.
RocalNSROutput ROCAL_API_CALL rocalNonSilentRegionDetection(RocalContext context, RocalTensor input, bool is_output, float cutoff_db, float reference_power, int reset_interval, int window_length)
Performs silence detection in the input audio tensor.
RocalTensor ROCAL_API_CALL rocalCropFixed(RocalContext context, RocalTensor input, unsigned crop_width, unsigned crop_height, unsigned crop_depth, bool is_output, float crop_pox_x, float crop_pos_y, float crop_pos_z, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Crops images with fixed coordinates.
RocalTensor ROCAL_API_CALL rocalToDecibels(RocalContext p_context, RocalTensor p_input, bool is_output, float cutoff_db, float multiplier, float reference_magnitude, RocalTensorOutputType rocal_tensor_output_type)
A.
RocalTensor ROCAL_API_CALL rocalSnPNoise(RocalContext context, RocalTensor input, bool is_output, RocalFloatParam noise_prob=NULL, RocalFloatParam salt_prob=NULL, RocalFloatParam salt_val=NULL, RocalFloatParam pepper_val=NULL, int seed=0, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies salt and pepper noise effect on images.
RocalTensor ROCAL_API_CALL rocalResample(RocalContext p_context, RocalTensor p_input, RocalTensor p_output_resample_rate, bool is_output, float sample_hint, float quality=50.0, RocalTensorOutputType output_datatype=ROCAL_FP32)
Applies resample augmentation to input tensors.
RocalTensor ROCAL_API_CALL rocalRotateFixed(RocalContext context, RocalTensor input, float angle, bool is_output, unsigned dest_width=0, unsigned dest_height=0, RocalResizeInterpolationType interpolation_type=ROCAL_LINEAR_INTERPOLATION, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Rotates images with fixed angle value.
RocalTensor ROCAL_API_CALL rocalGammaFixed(RocalContext context, RocalTensor input, float gamma, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies gamma correction on image with fixed parameters.
RocalTensor ROCAL_API_CALL rocalROIResize(RocalContext context, RocalTensor input, unsigned dest_width, unsigned dest_height, bool is_output, unsigned roi_h, unsigned roi_w, float roi_pos_x=0.0f, float roi_pos_y=0.0f, RocalResizeInterpolationType interpolation_type=ROCAL_LINEAR_INTERPOLATION, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Resizes images based on the ROI region passed by the user.
RocalTensor ROCAL_API_CALL rocalVignette(RocalContext context, RocalTensor input, bool is_output, RocalFloatParam sdev=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies vignette effect on images.
RocalTensor ROCAL_API_CALL rocalRandomCrop(RocalContext context, RocalTensor input, bool is_output, RocalFloatParam crop_area_factor=NULL, RocalFloatParam crop_aspect_ratio=NULL, RocalFloatParam crop_pos_x=NULL, RocalFloatParam crop_pos_y=NULL, int num_of_attempts=20, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Crops images randomly.
RocalTensor ROCAL_API_CALL rocalColorTemp(RocalContext context, RocalTensor input, bool is_output, RocalIntParam adjustment=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Adjusts the color temperature in images.
RocalTensor ROCAL_API_CALL rocalTranspose(RocalContext context, RocalTensor input, std::vector< unsigned > perm, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE)
Transposes the tensors by reordering the dimensions based on the perm parameter.
RocalTensor ROCAL_API_CALL rocalColorTwist(RocalContext context, RocalTensor input, bool is_output, RocalFloatParam alpha=NULL, RocalFloatParam beta=NULL, RocalFloatParam hue=NULL, RocalFloatParam sat=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Adjusts the brightness, hue and saturation of the images.
RocalTensor ROCAL_API_CALL rocalCopy(RocalContext context, RocalTensor input, bool is_output)
Copies input tensor to output tensor.
RocalTensor ROCAL_API_CALL rocalRotate(RocalContext context, RocalTensor input, bool is_output, RocalFloatParam angle=NULL, unsigned dest_width=0, unsigned dest_height=0, RocalResizeInterpolationType interpolation_type=ROCAL_LINEAR_INTERPOLATION, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Rotates images.
RocalTensor ROCAL_API_CALL rocalResizeMirrorNormalize(RocalContext p_context, RocalTensor p_input, unsigned dest_width, unsigned dest_height, std::vector< float > &mean, std::vector< float > &std_dev, bool is_output, RocalResizeScalingMode scaling_mode=ROCAL_SCALING_MODE_STRETCH, std::vector< unsigned > max_size={}, unsigned resize_shorter=0, unsigned resize_longer=0, RocalResizeInterpolationType interpolation_type=ROCAL_LINEAR_INTERPOLATION, RocalIntParam mirror=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Fused function which performs resize, normalize and flip on images.
RocalTensor ROCAL_API_CALL rocalSnow(RocalContext context, RocalTensor input, bool is_output, RocalFloatParam snow=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies snow effect on images.
RocalTensor ROCAL_API_CALL rocalSnPNoiseFixed(RocalContext context, RocalTensor input, float noise_prob, float salt_prob, float salt_val, float pepper_val, bool is_output, int seed=0, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies salt and pepper noise on images with fixed parameters.
RocalTensor ROCAL_API_CALL rocalRain(RocalContext context, RocalTensor input, bool is_output, float rain_percentage=0.0, int rain_width=0, int rain_height=0, float rain_slant_angle=0.0, RocalFloatParam rain_transparency=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies rain effect on images.
RocalTensor ROCAL_API_CALL rocalSSDRandomCrop(RocalContext context, RocalTensor input, bool is_output, RocalFloatParam threshold=NULL, RocalFloatParam crop_area_factor=NULL, RocalFloatParam crop_aspect_ratio=NULL, RocalFloatParam crop_pos_x=NULL, RocalFloatParam crop_pos_y=NULL, int num_of_attempts=20, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Crops images randomly used for SSD training.
RocalTensor ROCAL_API_CALL rocalNop(RocalContext context, RocalTensor input, bool is_output)
Performs no operation.
RocalTensor ROCAL_API_CALL rocalWarpAffine(RocalContext context, RocalTensor input, bool is_output, unsigned dest_height=0, unsigned dest_width=0, RocalFloatParam x0=NULL, RocalFloatParam x1=NULL, RocalFloatParam y0=NULL, RocalFloatParam y1=NULL, RocalFloatParam o0=NULL, RocalFloatParam o1=NULL, RocalResizeInterpolationType interpolation_type=ROCAL_LINEAR_INTERPOLATION, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies affine transformation to images.
RocalTensor ROCAL_API_CALL rocalHueFixed(RocalContext context, RocalTensor input, float hue, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Adjusts the hue in images with fixed parameters.
RocalTensor ROCAL_API_CALL rocalFlip(RocalContext context, RocalTensor input, bool is_output, RocalIntParam horizonal_flag=NULL, RocalIntParam vertical_flag=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Flip images horizontally and/or vertically based on inputs.
RocalTensor ROCAL_API_CALL rocalColorTwistFixed(RocalContext context, RocalTensor input, float alpha, float beta, float hue, float sat, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Adjusts the brightness, hue and saturation of the images with fixed parameters.
RocalTensor ROCAL_API_CALL rocalResizeCropMirror(RocalContext context, RocalTensor input, unsigned dest_width, unsigned dest_height, bool is_output, RocalFloatParam crop_height=NULL, RocalFloatParam crop_width=NULL, RocalIntParam mirror=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Fused function which performs resize, crop and flip on images.
RocalTensor ROCAL_API_CALL rocalCropResizeFixed(RocalContext context, RocalTensor input, unsigned dest_width, unsigned dest_height, bool is_output, float area, float aspect_ratio, float x_center_drift, float y_center_drift, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Fused function which perrforms crop and resize on images with fixed crop coordinates.
RocalTensor ROCAL_API_CALL rocalCrop(RocalContext context, RocalTensor input, bool is_output, RocalFloatParam crop_width=NULL, RocalFloatParam crop_height=NULL, RocalFloatParam crop_depth=NULL, RocalFloatParam crop_pox_x=NULL, RocalFloatParam crop_pos_y=NULL, RocalFloatParam crop_pos_z=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Crops images.
RocalTensor ROCAL_API_CALL rocalFog(RocalContext context, RocalTensor input, bool is_output, RocalFloatParam intensity_value=NULL, RocalFloatParam gray_value=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies fog effect on images.
RocalTensor ROCAL_API_CALL rocalColorTempFixed(RocalContext context, RocalTensor input, int adjustment, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Adjusts the color temperature in images with fixed value.
RocalTensor ROCAL_API_CALL rocalFlipFixed(RocalContext context, RocalTensor input, int horizonal_flag, int vertical_flag, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Flip images horizontally and/or vertically with fixed parameters.
RocalTensor ROCAL_API_CALL rocalGamma(RocalContext context, RocalTensor input, bool is_output, RocalFloatParam gamma=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies gamma correction on image.
RocalTensor ROCAL_API_CALL rocalNormalize(RocalContext context, RocalTensor input, std::vector< unsigned > &axes, std::vector< float > &mean, std::vector< float > &std_dev, bool is_output, float scale=1.0, float shift=0.0, RocalTensorOutputType output_datatype=ROCAL_FP32)
Performs mean-stddev normalization on images.
RocalTensor ROCAL_API_CALL rocalBrightness(RocalContext context, RocalTensor input, bool is_output, RocalFloatParam alpha=NULL, RocalFloatParam beta=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Adjusts brightness of the image.
RocalTensor ROCAL_API_CALL rocalJitterFixed(RocalContext context, RocalTensor input, int kernel_size, bool is_output, int seed=0, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies jitter effect on images with fixed kernel size.
RocalTensor ROCAL_API_CALL rocalCropCenterFixed(RocalContext context, RocalTensor input, unsigned crop_width, unsigned crop_height, unsigned crop_depth, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Crops images at the center with fixed coordinates.
RocalTensor ROCAL_API_CALL rocalRainFixed(RocalContext context, RocalTensor input, bool is_output, float rain_percentage=0.0, int rain_width=0, int rain_height=0, float rain_slant_angle=0.0, float rain_transparency=0.0, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies rain effect on images with fixed parameter.
RocalTensor ROCAL_API_CALL rocalBrightnessFixed(RocalContext context, RocalTensor input, float alpha, float beta, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Adjusts brightness of the image with fixed parameters.
RocalTensor ROCAL_API_CALL rocalResizeCropMirrorFixed(RocalContext context, RocalTensor input, unsigned dest_width, unsigned dest_height, bool is_output, unsigned crop_h, unsigned crop_w, RocalIntParam mirror, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Fused function which performs resize, crop and flip on images with fixed crop.
RocalResizeScalingMode
rocAL Resize Scaling Mode enum
Definition: rocal_api_types.h:326
RocalTensorLayout
rocAL Tensor Layout enum
Definition: rocal_api_types.h:208
RocalMelScaleFormula
rocAL MelScale formula enum
Definition: rocal_api_types.h:441
RocalTensorOutputType
rocAL Tensor Output Type enum
Definition: rocal_api_types.h:246
void * RocalIntParam
typedef void* rocAL Int Param
Definition: rocal_api_types.h:58
RocalOutOfBoundsPolicy
rocAL Out Of Bounds Policy Type enum
Definition: rocal_api_types.h:426
RocalAudioBorderType
rocAL Audio Border Type enum
Definition: rocal_api_types.h:411
void * RocalFloatParam
typedef void* Float Param
Definition: rocal_api_types.h:53
void * RocalContext
typedef void* rocAL Context
Definition: rocal_api_types.h:63
RocalResizeInterpolationType
rocAL Resize Interpolation Type enum
Definition: rocal_api_types.h:348
@ ROCAL_SCALING_MODE_STRETCH
scales wrt specified size, if only resize width/height is provided the other dimension is not scaled
Definition: rocal_api_types.h:332
@ ROCAL_NONE
AMD ROCAL_NONE.
Definition: rocal_api_types.h:240
@ ROCAL_NFT
AMD ROCAL_NFT Spectrogram Layout FT.
Definition: rocal_api_types.h:227
@ ROCAL_FP32
AMD ROCAL_FP32.
Definition: rocal_api_types.h:249
@ ROCAL_UINT8
AMD ROCAL_UINT8.
Definition: rocal_api_types.h:255
@ ROCAL_ERROR
Error.
Definition: rocal_api_types.h:435
@ ROCAL_CLAMP
AMD ROCAL_CLAMP.
Definition: rocal_api_types.h:417
@ ROCAL_LINEAR_INTERPOLATION
AMD ROCAL_LINEAR_INTERPOLATION.
Definition: rocal_api_types.h:354
RocalTensor ROCAL_API_CALL rocalTensorMulScalar(RocalContext p_context, RocalTensor p_input, bool is_output, float scalar=0.0, RocalTensorOutputType output_datatype=ROCAL_FP32)
Multiples a tensor and a scalar and returns the output.
RocalTensor ROCAL_API_CALL rocalTensorAddTensor(RocalContext p_context, RocalTensor p_input1, RocalTensor p_input2, bool is_output, RocalTensorOutputType output_datatype=ROCAL_FP32)
Adds two tensors and returns the output.
RocalTensor ROCAL_API_CALL rocalNormalDistribution(RocalContext p_context, RocalTensor p_input, bool is_output, float mean=0.0, float stddev=0.0)
Creates and returns rocALTensor generated from an normal distribution.
RocalTensor ROCAL_API_CALL rocalLog1p(RocalContext p_context, RocalTensor p_input, bool is_output)
Computes the natural logarithm of 1 + input element-wise and returns the output.
The AMD rocAL Library - Types.
#define ROCAL_API_CALL
Definition: rocal_api_types.h:35