/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 
173 extern "C" RocalTensor ROCAL_API_CALL rocalRotate(RocalContext context, RocalTensor input, bool is_output,
174  RocalFloatParam angle = NULL, unsigned dest_width = 0,
175  unsigned dest_height = 0,
177  RocalTensorLayout output_layout = ROCAL_NONE,
178  RocalTensorOutputType output_datatype = ROCAL_UINT8);
179 
193 extern "C" RocalTensor ROCAL_API_CALL rocalRotateFixed(RocalContext context, RocalTensor input, float angle,
194  bool is_output, unsigned dest_width = 0, unsigned dest_height = 0,
196  RocalTensorLayout output_layout = ROCAL_NONE,
197  RocalTensorOutputType output_datatype = ROCAL_UINT8);
198 
210 extern "C" RocalTensor ROCAL_API_CALL rocalBrightness(RocalContext context, RocalTensor input, bool is_output,
211  RocalFloatParam alpha = NULL, RocalFloatParam beta = NULL,
212  RocalTensorLayout output_layout = ROCAL_NONE,
213  RocalTensorOutputType output_datatype = ROCAL_UINT8);
214 
226 extern "C" RocalTensor ROCAL_API_CALL rocalBrightnessFixed(RocalContext context, RocalTensor input,
227  float alpha, float beta,
228  bool is_output,
229  RocalTensorLayout output_layout = ROCAL_NONE,
230  RocalTensorOutputType output_datatype = ROCAL_UINT8);
231 
242 extern "C" RocalTensor ROCAL_API_CALL rocalGamma(RocalContext context, RocalTensor input,
243  bool is_output,
244  RocalFloatParam gamma = NULL,
245  RocalTensorLayout output_layout = ROCAL_NONE,
246  RocalTensorOutputType output_datatype = ROCAL_UINT8);
247 
258 extern "C" RocalTensor ROCAL_API_CALL rocalGammaFixed(RocalContext context, RocalTensor input,
259  float gamma,
260  bool is_output,
261  RocalTensorLayout output_layout = ROCAL_NONE,
262  RocalTensorOutputType output_datatype = ROCAL_UINT8);
263 
275 extern "C" RocalTensor ROCAL_API_CALL rocalContrast(RocalContext context, RocalTensor input,
276  bool is_output,
277  RocalFloatParam contrast_factor = NULL, RocalFloatParam contrast_center = NULL,
278  RocalTensorLayout output_layout = ROCAL_NONE,
279  RocalTensorOutputType output_datatype = ROCAL_UINT8);
280 
292 extern "C" RocalTensor ROCAL_API_CALL rocalContrastFixed(RocalContext context, RocalTensor input,
293  float contrast_factor, float contrast_center,
294  bool is_output,
295  RocalTensorLayout output_layout = ROCAL_NONE,
296  RocalTensorOutputType output_datatype = ROCAL_UINT8);
297 
309 extern "C" RocalTensor ROCAL_API_CALL rocalFlip(RocalContext context, RocalTensor input, bool is_output,
310  RocalIntParam horizonal_flag = NULL, RocalIntParam vertical_flag = NULL,
311  RocalTensorLayout output_layout = ROCAL_NONE,
312  RocalTensorOutputType output_datatype = ROCAL_UINT8);
313 
325 extern "C" RocalTensor ROCAL_API_CALL rocalFlipFixed(RocalContext context, RocalTensor input,
326  int horizonal_flag, int vertical_flag, bool is_output,
327  RocalTensorLayout output_layout = ROCAL_NONE,
328  RocalTensorOutputType output_datatype = ROCAL_UINT8);
329 
340 extern "C" RocalTensor ROCAL_API_CALL rocalBlur(RocalContext context, RocalTensor input,
341  bool is_output,
342  RocalIntParam kernel_size = NULL,
343  RocalTensorLayout output_layout = ROCAL_NONE,
344  RocalTensorOutputType output_datatype = ROCAL_UINT8);
345 
356 extern "C" RocalTensor ROCAL_API_CALL rocalBlurFixed(RocalContext context, RocalTensor input,
357  int kernel_size, bool is_output,
358  RocalTensorLayout output_layout = ROCAL_NONE,
359  RocalTensorOutputType output_datatype = ROCAL_UINT8);
360 
372 extern "C" RocalTensor ROCAL_API_CALL rocalBlend(RocalContext context, RocalTensor input1, RocalTensor input2,
373  bool is_output,
374  RocalFloatParam ratio = NULL,
375  RocalTensorLayout output_layout = ROCAL_NONE,
376  RocalTensorOutputType output_datatype = ROCAL_UINT8);
377 
389 extern "C" RocalTensor ROCAL_API_CALL rocalBlendFixed(RocalContext context, RocalTensor input1, RocalTensor input2,
390  float ratio, bool is_output,
391  RocalTensorLayout output_layout = ROCAL_NONE,
392  RocalTensorOutputType output_datatype = ROCAL_UINT8);
393 
412 extern "C" RocalTensor ROCAL_API_CALL rocalWarpAffine(RocalContext context, RocalTensor input, bool is_output,
413  unsigned dest_height = 0, unsigned dest_width = 0,
414  RocalFloatParam x0 = NULL, RocalFloatParam x1 = NULL,
415  RocalFloatParam y0 = NULL, RocalFloatParam y1 = NULL,
416  RocalFloatParam o0 = NULL, RocalFloatParam o1 = NULL,
418  RocalTensorLayout output_layout = ROCAL_NONE,
419  RocalTensorOutputType output_datatype = ROCAL_UINT8);
420 
439 extern "C" RocalTensor ROCAL_API_CALL rocalWarpAffineFixed(RocalContext context, RocalTensor input, float x0, float x1,
440  float y0, float y1, float o0, float o1, bool is_output,
441  unsigned int dest_height = 0, unsigned int dest_width = 0,
443  RocalTensorLayout output_layout = ROCAL_NONE,
444  RocalTensorOutputType output_datatype = ROCAL_UINT8);
445 
455 extern "C" RocalTensor ROCAL_API_CALL rocalFishEye(RocalContext context, RocalTensor input, bool is_output,
456  RocalTensorLayout output_layout = ROCAL_NONE,
457  RocalTensorOutputType output_datatype = ROCAL_UINT8);
458 
470 extern "C" RocalTensor ROCAL_API_CALL rocalVignette(RocalContext context, RocalTensor input,
471  bool is_output, RocalFloatParam sdev = NULL,
472  RocalTensorLayout output_layout = ROCAL_NONE,
473  RocalTensorOutputType output_datatype = ROCAL_UINT8);
474 
486 extern "C" RocalTensor ROCAL_API_CALL rocalVignetteFixed(RocalContext context, RocalTensor input,
487  float sdev, bool is_output,
488  RocalTensorLayout output_layout = ROCAL_NONE,
489  RocalTensorOutputType output_datatype = ROCAL_UINT8);
490 
502 extern "C" RocalTensor ROCAL_API_CALL rocalJitter(RocalContext context, RocalTensor input,
503  bool is_output,
504  RocalIntParam kernel_size = NULL,
505  int seed = 0,
506  RocalTensorLayout output_layout = ROCAL_NONE,
507  RocalTensorOutputType output_datatype = ROCAL_UINT8);
508 
520 extern "C" RocalTensor ROCAL_API_CALL rocalJitterFixed(RocalContext context, RocalTensor input,
521  int kernel_size, bool is_output, int seed = 0,
522  RocalTensorLayout output_layout = ROCAL_NONE,
523  RocalTensorOutputType output_datatype = ROCAL_UINT8);
524 
539 extern "C" RocalTensor ROCAL_API_CALL rocalSnPNoise(RocalContext context, RocalTensor input,
540  bool is_output,
541  RocalFloatParam noise_prob = NULL, RocalFloatParam salt_prob = NULL,
542  RocalFloatParam salt_val = NULL, RocalFloatParam pepper_val = NULL,
543  int seed = 0,
544  RocalTensorLayout output_layout = ROCAL_NONE,
545  RocalTensorOutputType output_datatype = ROCAL_UINT8);
546 
561 extern "C" RocalTensor ROCAL_API_CALL rocalSnPNoiseFixed(RocalContext context, RocalTensor input,
562  float noise_prob, float salt_prob,
563  float salt_val, float pepper_val,
564  bool is_output, int seed = 0,
565  RocalTensorLayout output_layout = ROCAL_NONE,
566  RocalTensorOutputType output_datatype = ROCAL_UINT8);
567 
578 extern "C" RocalTensor ROCAL_API_CALL rocalSnow(RocalContext context, RocalTensor input,
579  bool is_output,
580  RocalFloatParam snow = NULL,
581  RocalTensorLayout output_layout = ROCAL_NONE,
582  RocalTensorOutputType output_datatype = ROCAL_UINT8);
583 
594 extern "C" RocalTensor ROCAL_API_CALL rocalSnowFixed(RocalContext context, RocalTensor input,
595  float snow, bool is_output,
596  RocalTensorLayout output_layout = ROCAL_NONE,
597  RocalTensorOutputType output_datatype = ROCAL_UINT8);
598 
612 extern "C" RocalTensor ROCAL_API_CALL rocalRain(RocalContext context, RocalTensor input,
613  bool is_output,
614  RocalFloatParam rain_value = NULL,
615  RocalIntParam rain_width = NULL,
616  RocalIntParam rain_height = NULL,
617  RocalFloatParam rain_transparency = NULL,
618  RocalTensorLayout output_layout = ROCAL_NONE,
619  RocalTensorOutputType output_datatype = ROCAL_UINT8);
620 
634 extern "C" RocalTensor ROCAL_API_CALL rocalRainFixed(RocalContext context, RocalTensor input,
635  float rain_value,
636  int rain_width,
637  int rain_height,
638  float rain_transparency,
639  bool is_output,
640  RocalTensorLayout output_layout = ROCAL_NONE,
641  RocalTensorOutputType output_datatype = ROCAL_UINT8);
642 
653 extern "C" RocalTensor ROCAL_API_CALL rocalColorTemp(RocalContext context, RocalTensor input,
654  bool is_output,
655  RocalIntParam adjustment = NULL,
656  RocalTensorLayout output_layout = ROCAL_NONE,
657  RocalTensorOutputType output_datatype = ROCAL_UINT8);
658 
669 extern "C" RocalTensor ROCAL_API_CALL rocalColorTempFixed(RocalContext context, RocalTensor input,
670  int adjustment, bool is_output,
671  RocalTensorLayout output_layout = ROCAL_NONE,
672  RocalTensorOutputType output_datatype = ROCAL_UINT8);
673 
684 extern "C" RocalTensor ROCAL_API_CALL rocalFog(RocalContext context, RocalTensor input,
685  bool is_output,
686  RocalFloatParam fog_value = NULL,
687  RocalTensorLayout output_layout = ROCAL_NONE,
688  RocalTensorOutputType output_datatype = ROCAL_UINT8);
689 
700 extern "C" RocalTensor ROCAL_API_CALL rocalFogFixed(RocalContext context, RocalTensor input,
701  float fog_value, bool is_output,
702  RocalTensorLayout output_layout = ROCAL_NONE,
703  RocalTensorOutputType output_datatype = ROCAL_UINT8);
704 
716 extern "C" RocalTensor ROCAL_API_CALL rocalLensCorrection(RocalContext context, RocalTensor input, bool is_output,
717  RocalFloatParam strength = NULL,
718  RocalFloatParam zoom = NULL,
719  RocalTensorLayout output_layout = ROCAL_NONE,
720  RocalTensorOutputType output_datatype = ROCAL_UINT8);
721 
733 extern "C" RocalTensor ROCAL_API_CALL rocalLensCorrectionFixed(RocalContext context, RocalTensor input,
734  float strength, float zoom, bool is_output,
735  RocalTensorLayout output_layout = ROCAL_NONE,
736  RocalTensorOutputType output_datatype = ROCAL_UINT8);
737 
747 extern "C" RocalTensor ROCAL_API_CALL rocalPixelate(RocalContext context, RocalTensor input,
748  bool is_output,
749  RocalTensorLayout output_layout = ROCAL_NONE,
750  RocalTensorOutputType output_datatype = ROCAL_UINT8);
751 
762 extern "C" RocalTensor ROCAL_API_CALL rocalExposure(RocalContext context, RocalTensor input,
763  bool is_output,
764  RocalFloatParam exposure_factor = NULL,
765  RocalTensorLayout output_layout = ROCAL_NONE,
766  RocalTensorOutputType output_datatype = ROCAL_UINT8);
767 
778 extern "C" RocalTensor ROCAL_API_CALL rocalExposureFixed(RocalContext context, RocalTensor input,
779  float exposure_factor, bool is_output,
780  RocalTensorLayout output_layout = ROCAL_NONE,
781  RocalTensorOutputType output_datatype = ROCAL_UINT8);
782 
793 extern "C" RocalTensor ROCAL_API_CALL rocalHue(RocalContext context, RocalTensor input,
794  bool is_output,
795  RocalFloatParam hue = NULL,
796  RocalTensorLayout output_layout = ROCAL_NONE,
797  RocalTensorOutputType output_datatype = ROCAL_UINT8);
798 
809 extern "C" RocalTensor ROCAL_API_CALL rocalHueFixed(RocalContext context, RocalTensor input,
810  float hue,
811  bool is_output,
812  RocalTensorLayout output_layout = ROCAL_NONE,
813  RocalTensorOutputType output_datatype = ROCAL_UINT8);
814 
825 extern "C" RocalTensor ROCAL_API_CALL rocalSaturation(RocalContext context, RocalTensor input,
826  bool is_output,
827  RocalFloatParam saturation = NULL,
828  RocalTensorLayout output_layout = ROCAL_NONE,
829  RocalTensorOutputType output_datatype = ROCAL_UINT8);
830 
841 extern "C" RocalTensor ROCAL_API_CALL rocalSaturationFixed(RocalContext context, RocalTensor input,
842  float saturation, bool is_output,
843  RocalTensorLayout output_layout = ROCAL_NONE,
844  RocalTensorOutputType output_datatype = ROCAL_UINT8);
845 
853 extern "C" RocalTensor ROCAL_API_CALL rocalCopy(RocalContext context, RocalTensor input, bool is_output);
854 
862 extern "C" RocalTensor ROCAL_API_CALL rocalNop(RocalContext context, RocalTensor input, bool is_output);
863 
877 extern "C" RocalTensor ROCAL_API_CALL rocalColorTwist(RocalContext context, RocalTensor input,
878  bool is_output,
879  RocalFloatParam alpha = NULL,
880  RocalFloatParam beta = NULL,
881  RocalFloatParam hue = NULL,
882  RocalFloatParam sat = NULL,
883  RocalTensorLayout output_layout = ROCAL_NONE,
884  RocalTensorOutputType output_datatype = ROCAL_UINT8);
885 
899 extern "C" RocalTensor ROCAL_API_CALL rocalColorTwistFixed(RocalContext context, RocalTensor input,
900  float alpha,
901  float beta,
902  float hue,
903  float sat,
904  bool is_output,
905  RocalTensorLayout output_layout = ROCAL_NONE,
906  RocalTensorOutputType output_datatype = ROCAL_UINT8);
907 
924 extern "C" RocalTensor ROCAL_API_CALL rocalCropMirrorNormalize(RocalContext context, RocalTensor input,
925  unsigned crop_height,
926  unsigned crop_width,
927  float start_x,
928  float start_y,
929  std::vector<float> &mean,
930  std::vector<float> &std_dev,
931  bool is_output,
932  RocalIntParam mirror = NULL,
933  RocalTensorLayout output_layout = ROCAL_NONE,
934  RocalTensorOutputType output_datatype = ROCAL_UINT8);
935 
951 extern "C" RocalTensor ROCAL_API_CALL rocalCrop(RocalContext context, RocalTensor input, bool is_output,
952  RocalFloatParam crop_width = NULL,
953  RocalFloatParam crop_height = NULL,
954  RocalFloatParam crop_depth = NULL,
955  RocalFloatParam crop_pox_x = NULL,
956  RocalFloatParam crop_pos_y = NULL,
957  RocalFloatParam crop_pos_z = NULL,
958  RocalTensorLayout output_layout = ROCAL_NONE,
959  RocalTensorOutputType output_datatype = ROCAL_UINT8);
960 
976 extern "C" RocalTensor ROCAL_API_CALL rocalCropFixed(RocalContext context, RocalTensor input,
977  unsigned crop_width,
978  unsigned crop_height,
979  unsigned crop_depth,
980  bool is_output,
981  float crop_pox_x,
982  float crop_pos_y,
983  float crop_pos_z,
984  RocalTensorLayout output_layout = ROCAL_NONE,
985  RocalTensorOutputType output_datatype = ROCAL_UINT8);
986 
999 extern "C" RocalTensor ROCAL_API_CALL rocalCropCenterFixed(RocalContext context, RocalTensor input,
1000  unsigned crop_width,
1001  unsigned crop_height,
1002  unsigned crop_depth,
1003  bool is_output,
1004  RocalTensorLayout output_layout = ROCAL_NONE,
1005  RocalTensorOutputType output_datatype = ROCAL_UINT8);
1006 
1021 extern "C" RocalTensor ROCAL_API_CALL rocalResizeCropMirrorFixed(RocalContext context, RocalTensor input,
1022  unsigned dest_width, unsigned dest_height,
1023  bool is_output,
1024  unsigned crop_h,
1025  unsigned crop_w,
1026  RocalIntParam mirror,
1027  RocalTensorLayout output_layout = ROCAL_NONE,
1028  RocalTensorOutputType output_datatype = ROCAL_UINT8);
1029 
1044 extern "C" RocalTensor ROCAL_API_CALL rocalResizeCropMirror(RocalContext context, RocalTensor input,
1045  unsigned dest_width, unsigned dest_height,
1046  bool is_output, RocalFloatParam crop_height = NULL,
1047  RocalFloatParam crop_width = NULL, RocalIntParam mirror = NULL,
1048  RocalTensorLayout output_layout = ROCAL_NONE,
1049  RocalTensorOutputType output_datatype = ROCAL_UINT8);
1050 
1065 extern "C" RocalTensor ROCAL_API_CALL rocalRandomCrop(RocalContext context, RocalTensor input,
1066  bool is_output,
1067  RocalFloatParam crop_area_factor = NULL,
1068  RocalFloatParam crop_aspect_ratio = NULL,
1069  RocalFloatParam crop_pos_x = NULL,
1070  RocalFloatParam crop_pos_y = NULL,
1071  int num_of_attempts = 20,
1072  RocalTensorLayout output_layout = ROCAL_NONE,
1073  RocalTensorOutputType output_datatype = ROCAL_UINT8);
1074 
1090 extern "C" RocalTensor ROCAL_API_CALL rocalSSDRandomCrop(RocalContext context, RocalTensor input,
1091  bool is_output,
1092  RocalFloatParam threshold = NULL,
1093  RocalFloatParam crop_area_factor = NULL,
1094  RocalFloatParam crop_aspect_ratio = NULL,
1095  RocalFloatParam crop_pos_x = NULL,
1096  RocalFloatParam crop_pos_y = NULL,
1097  int num_of_attempts = 20,
1098  RocalTensorLayout output_layout = ROCAL_NONE,
1099  RocalTensorOutputType output_datatype = ROCAL_UINT8);
1100 
1101 #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 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 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 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 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.
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 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 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 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 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:298
RocalTensorLayout
rocAL Tensor Layout enum
Definition: rocal_api_types.h:208
RocalTensorOutputType
rocAL Tensor Output Type enum
Definition: rocal_api_types.h:229
void * RocalIntParam
typedef void* rocAL Int Param
Definition: rocal_api_types.h:58
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:320
@ 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:304
@ ROCAL_NONE
AMD ROCAL_NONE.
Definition: rocal_api_types.h:223
@ ROCAL_UINT8
AMD ROCAL_UINT8.
Definition: rocal_api_types.h:238
@ ROCAL_LINEAR_INTERPOLATION
AMD ROCAL_LINEAR_INTERPOLATION.
Definition: rocal_api_types.h:326
The AMD rocAL Library - Types.
#define ROCAL_API_CALL
Definition: rocal_api_types.h:35