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

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

rocAL: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocal/checkouts/latest/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 - 2023 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 
367 extern "C" RocalTensor ROCAL_API_CALL rocalBlur(RocalContext context, RocalTensor input,
368  bool is_output,
369  RocalIntParam kernel_size = NULL,
370  RocalTensorLayout output_layout = ROCAL_NONE,
371  RocalTensorOutputType output_datatype = ROCAL_UINT8);
372 
383 extern "C" RocalTensor ROCAL_API_CALL rocalBlurFixed(RocalContext context, RocalTensor input,
384  int kernel_size, bool is_output,
385  RocalTensorLayout output_layout = ROCAL_NONE,
386  RocalTensorOutputType output_datatype = ROCAL_UINT8);
387 
399 extern "C" RocalTensor ROCAL_API_CALL rocalBlend(RocalContext context, RocalTensor input1, RocalTensor input2,
400  bool is_output,
401  RocalFloatParam ratio = NULL,
402  RocalTensorLayout output_layout = ROCAL_NONE,
403  RocalTensorOutputType output_datatype = ROCAL_UINT8);
404 
416 extern "C" RocalTensor ROCAL_API_CALL rocalBlendFixed(RocalContext context, RocalTensor input1, RocalTensor input2,
417  float ratio, bool is_output,
418  RocalTensorLayout output_layout = ROCAL_NONE,
419  RocalTensorOutputType output_datatype = ROCAL_UINT8);
420 
439 extern "C" RocalTensor ROCAL_API_CALL rocalWarpAffine(RocalContext context, RocalTensor input, bool is_output,
440  unsigned dest_height = 0, unsigned dest_width = 0,
441  RocalFloatParam x0 = NULL, RocalFloatParam x1 = NULL,
442  RocalFloatParam y0 = NULL, RocalFloatParam y1 = NULL,
443  RocalFloatParam o0 = NULL, RocalFloatParam o1 = NULL,
445  RocalTensorLayout output_layout = ROCAL_NONE,
446  RocalTensorOutputType output_datatype = ROCAL_UINT8);
447 
466 extern "C" RocalTensor ROCAL_API_CALL rocalWarpAffineFixed(RocalContext context, RocalTensor input, float x0, float x1,
467  float y0, float y1, float o0, float o1, bool is_output,
468  unsigned int dest_height = 0, unsigned int dest_width = 0,
470  RocalTensorLayout output_layout = ROCAL_NONE,
471  RocalTensorOutputType output_datatype = ROCAL_UINT8);
472 
482 extern "C" RocalTensor ROCAL_API_CALL rocalFishEye(RocalContext context, RocalTensor input, bool is_output,
483  RocalTensorLayout output_layout = ROCAL_NONE,
484  RocalTensorOutputType output_datatype = ROCAL_UINT8);
485 
497 extern "C" RocalTensor ROCAL_API_CALL rocalVignette(RocalContext context, RocalTensor input,
498  bool is_output, RocalFloatParam sdev = NULL,
499  RocalTensorLayout output_layout = ROCAL_NONE,
500  RocalTensorOutputType output_datatype = ROCAL_UINT8);
501 
513 extern "C" RocalTensor ROCAL_API_CALL rocalVignetteFixed(RocalContext context, RocalTensor input,
514  float sdev, bool is_output,
515  RocalTensorLayout output_layout = ROCAL_NONE,
516  RocalTensorOutputType output_datatype = ROCAL_UINT8);
517 
529 extern "C" RocalTensor ROCAL_API_CALL rocalJitter(RocalContext context, RocalTensor input,
530  bool is_output,
531  RocalIntParam kernel_size = NULL,
532  int seed = 0,
533  RocalTensorLayout output_layout = ROCAL_NONE,
534  RocalTensorOutputType output_datatype = ROCAL_UINT8);
535 
547 extern "C" RocalTensor ROCAL_API_CALL rocalJitterFixed(RocalContext context, RocalTensor input,
548  int kernel_size, bool is_output, int seed = 0,
549  RocalTensorLayout output_layout = ROCAL_NONE,
550  RocalTensorOutputType output_datatype = ROCAL_UINT8);
551 
566 extern "C" RocalTensor ROCAL_API_CALL rocalSnPNoise(RocalContext context, RocalTensor input,
567  bool is_output,
568  RocalFloatParam noise_prob = NULL, RocalFloatParam salt_prob = NULL,
569  RocalFloatParam salt_val = NULL, RocalFloatParam pepper_val = NULL,
570  int seed = 0,
571  RocalTensorLayout output_layout = ROCAL_NONE,
572  RocalTensorOutputType output_datatype = ROCAL_UINT8);
573 
588 extern "C" RocalTensor ROCAL_API_CALL rocalSnPNoiseFixed(RocalContext context, RocalTensor input,
589  float noise_prob, float salt_prob,
590  float salt_val, float pepper_val,
591  bool is_output, int seed = 0,
592  RocalTensorLayout output_layout = ROCAL_NONE,
593  RocalTensorOutputType output_datatype = ROCAL_UINT8);
594 
605 extern "C" RocalTensor ROCAL_API_CALL rocalSnow(RocalContext context, RocalTensor input,
606  bool is_output,
607  RocalFloatParam snow = NULL,
608  RocalTensorLayout output_layout = ROCAL_NONE,
609  RocalTensorOutputType output_datatype = ROCAL_UINT8);
610 
621 extern "C" RocalTensor ROCAL_API_CALL rocalSnowFixed(RocalContext context, RocalTensor input,
622  float snow, bool is_output,
623  RocalTensorLayout output_layout = ROCAL_NONE,
624  RocalTensorOutputType output_datatype = ROCAL_UINT8);
625 
639 extern "C" RocalTensor ROCAL_API_CALL rocalRain(RocalContext context, RocalTensor input,
640  bool is_output,
641  RocalFloatParam rain_value = NULL,
642  RocalIntParam rain_width = NULL,
643  RocalIntParam rain_height = NULL,
644  RocalFloatParam rain_transparency = NULL,
645  RocalTensorLayout output_layout = ROCAL_NONE,
646  RocalTensorOutputType output_datatype = ROCAL_UINT8);
647 
661 extern "C" RocalTensor ROCAL_API_CALL rocalRainFixed(RocalContext context, RocalTensor input,
662  float rain_value,
663  int rain_width,
664  int rain_height,
665  float rain_transparency,
666  bool is_output,
667  RocalTensorLayout output_layout = ROCAL_NONE,
668  RocalTensorOutputType output_datatype = ROCAL_UINT8);
669 
680 extern "C" RocalTensor ROCAL_API_CALL rocalColorTemp(RocalContext context, RocalTensor input,
681  bool is_output,
682  RocalIntParam adjustment = NULL,
683  RocalTensorLayout output_layout = ROCAL_NONE,
684  RocalTensorOutputType output_datatype = ROCAL_UINT8);
685 
696 extern "C" RocalTensor ROCAL_API_CALL rocalColorTempFixed(RocalContext context, RocalTensor input,
697  int adjustment, bool is_output,
698  RocalTensorLayout output_layout = ROCAL_NONE,
699  RocalTensorOutputType output_datatype = ROCAL_UINT8);
700 
711 extern "C" RocalTensor ROCAL_API_CALL rocalFog(RocalContext context, RocalTensor input,
712  bool is_output,
713  RocalFloatParam fog_value = NULL,
714  RocalTensorLayout output_layout = ROCAL_NONE,
715  RocalTensorOutputType output_datatype = ROCAL_UINT8);
716 
727 extern "C" RocalTensor ROCAL_API_CALL rocalFogFixed(RocalContext context, RocalTensor input,
728  float fog_value, bool is_output,
729  RocalTensorLayout output_layout = ROCAL_NONE,
730  RocalTensorOutputType output_datatype = ROCAL_UINT8);
731 
743 extern "C" RocalTensor ROCAL_API_CALL rocalLensCorrection(RocalContext context, RocalTensor input, bool is_output,
744  RocalFloatParam strength = NULL,
745  RocalFloatParam zoom = NULL,
746  RocalTensorLayout output_layout = ROCAL_NONE,
747  RocalTensorOutputType output_datatype = ROCAL_UINT8);
748 
760 extern "C" RocalTensor ROCAL_API_CALL rocalLensCorrectionFixed(RocalContext context, RocalTensor input,
761  float strength, float zoom, bool is_output,
762  RocalTensorLayout output_layout = ROCAL_NONE,
763  RocalTensorOutputType output_datatype = ROCAL_UINT8);
764 
774 extern "C" RocalTensor ROCAL_API_CALL rocalPixelate(RocalContext context, RocalTensor input,
775  bool is_output,
776  RocalTensorLayout output_layout = ROCAL_NONE,
777  RocalTensorOutputType output_datatype = ROCAL_UINT8);
778 
789 extern "C" RocalTensor ROCAL_API_CALL rocalExposure(RocalContext context, RocalTensor input,
790  bool is_output,
791  RocalFloatParam exposure_factor = NULL,
792  RocalTensorLayout output_layout = ROCAL_NONE,
793  RocalTensorOutputType output_datatype = ROCAL_UINT8);
794 
805 extern "C" RocalTensor ROCAL_API_CALL rocalExposureFixed(RocalContext context, RocalTensor input,
806  float exposure_factor, bool is_output,
807  RocalTensorLayout output_layout = ROCAL_NONE,
808  RocalTensorOutputType output_datatype = ROCAL_UINT8);
809 
820 extern "C" RocalTensor ROCAL_API_CALL rocalHue(RocalContext context, RocalTensor input,
821  bool is_output,
822  RocalFloatParam hue = NULL,
823  RocalTensorLayout output_layout = ROCAL_NONE,
824  RocalTensorOutputType output_datatype = ROCAL_UINT8);
825 
836 extern "C" RocalTensor ROCAL_API_CALL rocalHueFixed(RocalContext context, RocalTensor input,
837  float hue,
838  bool is_output,
839  RocalTensorLayout output_layout = ROCAL_NONE,
840  RocalTensorOutputType output_datatype = ROCAL_UINT8);
841 
852 extern "C" RocalTensor ROCAL_API_CALL rocalSaturation(RocalContext context, RocalTensor input,
853  bool is_output,
854  RocalFloatParam saturation = NULL,
855  RocalTensorLayout output_layout = ROCAL_NONE,
856  RocalTensorOutputType output_datatype = ROCAL_UINT8);
857 
868 extern "C" RocalTensor ROCAL_API_CALL rocalSaturationFixed(RocalContext context, RocalTensor input,
869  float saturation, bool is_output,
870  RocalTensorLayout output_layout = ROCAL_NONE,
871  RocalTensorOutputType output_datatype = ROCAL_UINT8);
872 
880 extern "C" RocalTensor ROCAL_API_CALL rocalCopy(RocalContext context, RocalTensor input, bool is_output);
881 
889 extern "C" RocalTensor ROCAL_API_CALL rocalNop(RocalContext context, RocalTensor input, bool is_output);
890 
904 extern "C" RocalTensor ROCAL_API_CALL rocalColorTwist(RocalContext context, RocalTensor input,
905  bool is_output,
906  RocalFloatParam alpha = NULL,
907  RocalFloatParam beta = NULL,
908  RocalFloatParam hue = NULL,
909  RocalFloatParam sat = NULL,
910  RocalTensorLayout output_layout = ROCAL_NONE,
911  RocalTensorOutputType output_datatype = ROCAL_UINT8);
912 
926 extern "C" RocalTensor ROCAL_API_CALL rocalColorTwistFixed(RocalContext context, RocalTensor input,
927  float alpha,
928  float beta,
929  float hue,
930  float sat,
931  bool is_output,
932  RocalTensorLayout output_layout = ROCAL_NONE,
933  RocalTensorOutputType output_datatype = ROCAL_UINT8);
934 
951 extern "C" RocalTensor ROCAL_API_CALL rocalCropMirrorNormalize(RocalContext context, RocalTensor input,
952  unsigned crop_height,
953  unsigned crop_width,
954  float start_x,
955  float start_y,
956  std::vector<float> &mean,
957  std::vector<float> &std_dev,
958  bool is_output,
959  RocalIntParam mirror = NULL,
960  RocalTensorLayout output_layout = ROCAL_NONE,
961  RocalTensorOutputType output_datatype = ROCAL_UINT8);
962 
978 extern "C" RocalTensor ROCAL_API_CALL rocalCrop(RocalContext context, RocalTensor input, bool is_output,
979  RocalFloatParam crop_width = NULL,
980  RocalFloatParam crop_height = NULL,
981  RocalFloatParam crop_depth = NULL,
982  RocalFloatParam crop_pox_x = NULL,
983  RocalFloatParam crop_pos_y = NULL,
984  RocalFloatParam crop_pos_z = NULL,
985  RocalTensorLayout output_layout = ROCAL_NONE,
986  RocalTensorOutputType output_datatype = ROCAL_UINT8);
987 
1003 extern "C" RocalTensor ROCAL_API_CALL rocalCropFixed(RocalContext context, RocalTensor input,
1004  unsigned crop_width,
1005  unsigned crop_height,
1006  unsigned crop_depth,
1007  bool is_output,
1008  float crop_pox_x,
1009  float crop_pos_y,
1010  float crop_pos_z,
1011  RocalTensorLayout output_layout = ROCAL_NONE,
1012  RocalTensorOutputType output_datatype = ROCAL_UINT8);
1013 
1026 extern "C" RocalTensor ROCAL_API_CALL rocalCropCenterFixed(RocalContext context, RocalTensor input,
1027  unsigned crop_width,
1028  unsigned crop_height,
1029  unsigned crop_depth,
1030  bool is_output,
1031  RocalTensorLayout output_layout = ROCAL_NONE,
1032  RocalTensorOutputType output_datatype = ROCAL_UINT8);
1033 
1048 extern "C" RocalTensor ROCAL_API_CALL rocalResizeCropMirrorFixed(RocalContext context, RocalTensor input,
1049  unsigned dest_width, unsigned dest_height,
1050  bool is_output,
1051  unsigned crop_h,
1052  unsigned crop_w,
1053  RocalIntParam mirror,
1054  RocalTensorLayout output_layout = ROCAL_NONE,
1055  RocalTensorOutputType output_datatype = ROCAL_UINT8);
1056 
1071 extern "C" RocalTensor ROCAL_API_CALL rocalResizeCropMirror(RocalContext context, RocalTensor input,
1072  unsigned dest_width, unsigned dest_height,
1073  bool is_output, RocalFloatParam crop_height = NULL,
1074  RocalFloatParam crop_width = NULL, RocalIntParam mirror = NULL,
1075  RocalTensorLayout output_layout = ROCAL_NONE,
1076  RocalTensorOutputType output_datatype = ROCAL_UINT8);
1077 
1092 extern "C" RocalTensor ROCAL_API_CALL rocalRandomCrop(RocalContext context, RocalTensor input,
1093  bool is_output,
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 
1117 extern "C" RocalTensor ROCAL_API_CALL rocalSSDRandomCrop(RocalContext context, RocalTensor input,
1118  bool is_output,
1119  RocalFloatParam threshold = NULL,
1120  RocalFloatParam crop_area_factor = NULL,
1121  RocalFloatParam crop_aspect_ratio = NULL,
1122  RocalFloatParam crop_pos_x = NULL,
1123  RocalFloatParam crop_pos_y = NULL,
1124  int num_of_attempts = 20,
1125  RocalTensorLayout output_layout = ROCAL_NONE,
1126  RocalTensorOutputType output_datatype = ROCAL_UINT8);
1127 
1138 extern "C" RocalTensor ROCAL_API_CALL rocalPreEmphasisFilter(RocalContext context,
1139  RocalTensor input,
1140  bool is_output,
1141  RocalFloatParam preemph_coeff = NULL,
1143  RocalTensorOutputType output_datatype = ROCAL_FP32);
1144 
1161 extern "C" RocalTensor ROCAL_API_CALL rocalSpectrogram(RocalContext context,
1162  RocalTensor input,
1163  bool is_output,
1164  std::vector<float> &window_fn,
1165  bool center_windows,
1166  bool reflect_padding,
1167  int power,
1168  int nfft,
1169  int window_length = 512,
1170  int window_step = 256,
1171  RocalTensorLayout output_layout = ROCAL_NFT,
1172  RocalTensorOutputType output_datatype = ROCAL_FP32);
1173 
1185 extern "C" RocalTensor ROCAL_API_CALL rocalToDecibels(RocalContext p_context,
1186  RocalTensor p_input,
1187  bool is_output,
1188  float cutoff_db,
1189  float multiplier,
1190  float reference_magnitude,
1191  RocalTensorOutputType rocal_tensor_output_type);
1192 
1204 extern "C" RocalTensor ROCAL_API_CALL rocalResample(RocalContext p_context,
1205  RocalTensor p_input,
1206  RocalTensor p_output_resample_rate,
1207  bool is_output,
1208  float sample_hint,
1209  float quality = 50.0,
1210  RocalTensorOutputType output_datatype = ROCAL_FP32);
1211 
1220 extern "C" RocalTensor ROCAL_API_CALL rocalUniformDistribution(RocalContext p_context,
1221  RocalTensor p_input,
1222  bool is_output,
1223  std::vector<float> &range);
1224 
1233 extern "C" RocalTensor ROCAL_API_CALL rocalNormalDistribution(RocalContext p_context,
1234  RocalTensor p_input,
1235  bool is_output,
1236  float mean = 0.0,
1237  float stddev = 0.0);
1238 
1247 extern "C" RocalTensor ROCAL_API_CALL rocalTensorMulScalar(RocalContext p_context,
1248  RocalTensor p_input,
1249  bool is_output,
1250  float scalar = 0.0,
1251  RocalTensorOutputType output_datatype = ROCAL_FP32);
1252 
1261 extern "C" RocalTensor ROCAL_API_CALL rocalTensorAddTensor(RocalContext p_context,
1262  RocalTensor p_input1,
1263  RocalTensor p_input2,
1264  bool is_output,
1265  RocalTensorOutputType output_datatype = ROCAL_FP32);
1266 
1279  RocalTensor input,
1280  bool is_output,
1281  float cutoff_db,
1282  float reference_power,
1283  int reset_interval,
1284  int window_length);
1285 
1298 extern "C" RocalTensor ROCAL_API_CALL rocalSlice(RocalContext context,
1299  RocalTensor input,
1300  bool is_output,
1301  RocalTensor anchor,
1302  RocalTensor shape,
1303  std::vector<float> fill_values,
1305  RocalTensorOutputType output_datatype = ROCAL_FP32);
1306 
1320 extern "C" RocalTensor ROCAL_API_CALL rocalNormalize(RocalContext context, RocalTensor input,
1321  std::vector<unsigned> &axes,
1322  std::vector<float> &mean,
1323  std::vector<float> &std_dev,
1324  bool is_output,
1325  float scale = 1.0, float shift = 0.0,
1326  RocalTensorOutputType output_datatype = ROCAL_FP32);
1327 
1343 extern "C" RocalTensor ROCAL_API_CALL rocalMelFilterBank(RocalContext p_context,
1344  RocalTensor p_input,
1345  bool is_output,
1346  float freq_high,
1347  float freq_low,
1348  RocalMelScaleFormula mel_formula,
1349  int nfilter,
1350  bool normalize,
1351  float sample_rate,
1352  RocalTensorOutputType output_datatype);
1353 
1354 #endif // MIVISIONX_ROCAL_API_AUGMENTATION_H
RocalTensor ROCAL_API_CALL rocalLensCorrection(RocalContext context, RocalTensor input, bool is_output, RocalFloatParam strength=NULL, RocalFloatParam zoom=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies lens correction effect on images.
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 rocalBlur(RocalContext context, RocalTensor input, bool is_output, RocalIntParam kernel_size=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies blur effect to images.
RocalTensor ROCAL_API_CALL rocalBlurFixed(RocalContext context, RocalTensor input, int kernel_size, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies blur effect to images with fixed parameters.
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 rocalRain(RocalContext context, RocalTensor input, bool is_output, RocalFloatParam rain_value=NULL, RocalIntParam rain_width=NULL, RocalIntParam rain_height=NULL, RocalFloatParam rain_transparency=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies rain effect on images.
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 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 rocalLensCorrectionFixed(RocalContext context, RocalTensor input, float strength, float zoom, 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 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.
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 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 rocalRainFixed(RocalContext context, RocalTensor input, float rain_value, int rain_width, int rain_height, float rain_transparency, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies rain effect on images with fixed parameter.
RocalTensor ROCAL_API_CALL rocalPixelate(RocalContext context, RocalTensor input, bool is_output, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies pixelate effect 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 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 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 rocalFogFixed(RocalContext context, RocalTensor input, float fog_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 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 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 rocalFog(RocalContext context, RocalTensor input, bool is_output, RocalFloatParam fog_value=NULL, RocalTensorLayout output_layout=ROCAL_NONE, RocalTensorOutputType output_datatype=ROCAL_UINT8)
Applies fog effect on images.
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:315
RocalTensorLayout
rocAL Tensor Layout enum
Definition: rocal_api_types.h:208
RocalMelScaleFormula
rocAL MelScale formula enum
Definition: rocal_api_types.h:430
RocalTensorOutputType
rocAL Tensor Output Type enum
Definition: rocal_api_types.h:240
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:415
RocalAudioBorderType
rocAL Audio Border Type enum
Definition: rocal_api_types.h:400
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:337
@ 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:321
@ ROCAL_NONE
AMD ROCAL_NONE.
Definition: rocal_api_types.h:234
@ ROCAL_NFT
AMD ROCAL_NFT Spectrogram Layout FT.
Definition: rocal_api_types.h:227
@ ROCAL_FP32
AMD ROCAL_FP32.
Definition: rocal_api_types.h:243
@ ROCAL_UINT8
AMD ROCAL_UINT8.
Definition: rocal_api_types.h:249
@ ROCAL_ERROR
Error.
Definition: rocal_api_types.h:424
@ ROCAL_CLAMP
AMD ROCAL_CLAMP.
Definition: rocal_api_types.h:406
@ ROCAL_LINEAR_INTERPOLATION
AMD ROCAL_LINEAR_INTERPOLATION.
Definition: rocal_api_types.h:343
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.
The AMD rocAL Library - Types.
#define ROCAL_API_CALL
Definition: rocal_api_types.h:35