AMD rocAL - Augmentation API

AMD rocAL - Augmentation API#

rocAL: API: AMD rocAL - Augmentation API
API: AMD rocAL - Augmentation API

The AMD rocAL augmentation functions. More...

Functions

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 values in the range [0, sequence_length). Frames can be repeated or dropped in the new_order. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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) More...
 
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) More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
RocalTensor ROCAL_API_CALL rocalCopy (RocalContext context, RocalTensor input, bool is_output)
 Copies input tensor to output tensor. More...
 
RocalTensor ROCAL_API_CALL rocalNop (RocalContext context, RocalTensor input, bool is_output)
 Performs no operation. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
std::pair< RocalTensor, RocalTensor > 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. More...
 
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. More...
 
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. More...
 
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. More...
 

Detailed Description

The AMD rocAL augmentation functions.

Function Documentation

◆ rocalBlend()

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)

Parameters
[in]contextRocal context
[in]input1Input1 Rocal tensor
[in]input2Input2 Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]ratioRocal parameter defining the blending ratio, should be between 0.0 and 1.0
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalBlendFixed()

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)

Parameters
[in]contextRocal context
[in]input1Input1 Rocal tensor
[in]input2Input2 Rocal tensor
[in]ratioFloat value defining the blending ratio, should be between 0.0 and 1.0.
[in]is_outputis the output tensor part of the graph output
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalBlur()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]kernel_sizesize ofthr kernel used for blurring
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalBlurFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]kernel_sizesize of the kernel used for blurring
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalBrightness()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]alphacontrols contrast of the image
[in]betacontrols brightness of the image
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalBrightnessFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]alphacontrols contrast of the image
[in]betacontrols brightness of the image
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalColorTemp()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]adjustmentcolor temperature adjustment value
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalColorTempFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]adjustmentcolor temperature adjustment value
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
[in]is_outputis the output tensor part of the graph output
Returns
RocalTensor

◆ rocalColorTwist()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]alphaparameter that controls the brightness of an image
[in]betaparameter that helps in tuning the color balance of an image
[in]hueparameter that adjusts the hue of an image
[in]satparameter that controls the intensity of colors
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalColorTwistFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]alphaparameter that controls the brightness of an image
[in]betaparameter that helps in tuning the color balance of an image
[in]hueparameter that adjusts the hue of an image
[in]satparameter that controls the intensity of colors
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
[in]is_outputis the output tensor part of the graph output
Returns
RocalTensor

◆ rocalContrast()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]contrast_factorparameter representing the contrast factor for the contrast operation
[in]contrast_centerparameter representing the contrast center for the contrast operation
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalContrastFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]contrast_factorparameter representing the contrast factor for the contrast operation
[in]contrast_centerparameter representing the contrast center for the contrast operation
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalCopy()

RocalTensor ROCAL_API_CALL rocalCopy ( RocalContext  context,
RocalTensor  input,
bool  is_output 
)

Copies input tensor to output tensor.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
Returns
RocalTensor

◆ rocalCrop()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]crop_heightcrop width of the tensor
[in]crop_widthcrop height of the tensor
[in]crop_depthcrop depth of the tensor
[in]crop_pox_xx-coordinate, start of the input tensor to be cropped
[in]crop_pos_yy-coordinate, start of the input tensor to be cropped
[in]crop_pos_zz-coordinate, start of the input tensor to be cropped
[in]is_outputis the output tensor part of the graph output
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalCropCenterFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]crop_heightcrop width of the tensor
[in]crop_widthcrop height of the tensor
[in]crop_depthcrop depth of the tensor
[in]is_outputis the output tensor part of the graph output
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalCropFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]crop_heightcrop width of the tensor
[in]crop_widthcrop height of the tensor
[in]crop_depthcrop depth of the tensor
[in]crop_pox_xx-coordinate, start of the input tensor to be cropped
[in]crop_pos_yy-coordinate, start of the input tensor to be cropped
[in]crop_pos_zz-coordinate, start of the input tensor to be cropped
[in]is_outputis the output tensor part of the graph output
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalCropMirrorNormalize()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]crop_heightcrop width of the tensor
[in]crop_widthcrop height of the tensor
[in]start_xx-coordinate, start of the input tensor to be cropped
[in]start_yy-coordinate, start of the input tensor to be cropped
[in]meanmean value (specified for each channel) for tensor normalization
[in]std_devstandard deviation value (specified for each channel) for tensor normalization
[in]is_outputis the output tensor part of the graph output
[in]mirrorcontrols horizontal flip of the tensor
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalCropResize()

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.

Note
Accepts U8 and RGB24 input.
Parameters
[in]contextRocal context
[in]inputInput Rocal Tensor
[in]dest_widthoutput width
[in]dest_heightoutput height
[in]is_outputTrue: the output image is needed by user and will be copied to output buffers using the data transfer API calls. False: the output image is just an intermediate image, user is not interested in using it directly. This option allows certain optimizations to be achieved.
[in]areaTarget area for the crop
[in]aspect_ratiospecifies the aspect ratio of the cropped region
[in]x_center_driftHorizontal shift of the crop center from its original position in the input image
[in]y_center_driftVertical shift of the crop center from its original position in the input image
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalCropResizeFixed()

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.

Note
Accepts U8 and RGB24 input.
Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]dest_widthoutput width
[in]dest_heightoutput height
[in]is_outputTrue: the output image is needed by user and will be copied to output buffers using the data transfer API calls. False: the output image is just an intermediate image, user is not interested in using it directly. This option allows certain optimizations to be achieved.
[in]areaTarget area for the crop
[in]aspect_ratiospecifies the aspect ratio of the cropped region
[in]x_center_driftHorizontal shift of the crop center from its original position in the input image
[in]y_center_driftVertical shift of the crop center from its original position in the input image
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalExposure()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]exposure_factorexposure adjustment factor
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalExposureFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]exposure_factorexposure adjustment factor
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalFishEye()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalFlip()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]horizonal_flagdetermines whether the input tensor should be flipped horizontally
[in]vertical_flagdetermines whether the input tensor should be flipped vertically
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalFlipFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]horizonal_flagdetermines whether the input tensor should be flipped horizontally
[in]vertical_flagdetermines whether the input tensor should be flipped vertically
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalFog()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]fog_valueparameter representing the intensity of fog effect
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalFogFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]fog_valueparameter representing the intensity of fog effect
[in]is_outputis the output tensor part of the graph output
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalGamma()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]gammagamma value for the image.
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalGammaFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]gammagamma value for the image.
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalHue()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]huehue adjustment value in degrees
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalHueFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]huehue adjustment value in degrees
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalJitter()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]kernel_sizekernel size used for the jitter effect
[in]seedseed value for the random number generator
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalJitterFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]kernel_sizekernel size used for the jitter effect
[in]seedseed value for the random number generator
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalLensCorrection()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]strengthparameter representing the strength of the lens correction.
[in]zoomparameter representing the zoom factor of the lens correction.
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalLensCorrectionFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]strengthparameter representing the strength of the lens correction.
[in]zoomparameter representing the zoom factor of the lens correction.
[in]is_outputis the output tensor part of the graph output
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalMelFilterBank()

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.

Parameters
[in]p_contextRocal context
[in]p_inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]freq_highmaximum frequency
[in]freq_lowminimum frequency
[in]mel_formulaformula used to convert frequencies from hertz to mel and from mel to hertz
[in]nfilternumber of mel filters
[in]normalizeboolean variable that determine whether to normalize weights / not
[in]sample_ratesampling rate of the audio data
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalNonSilentRegionDetection()

std::pair<RocalTensor, RocalTensor> 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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]cutoff_dbthreshold(dB) below which the signal is considered silent
[in]reference_powerreference power that is used to convert the signal to dB
[in]reset_intervalnumber of samples after which the moving mean average is recalculated to avoid loss of precision
[in]window_lengthsize of the sliding window used to calculate of the short-term power of the signal
Returns
std::pair<RocalTensor, RocalTensor>

◆ rocalNop()

RocalTensor ROCAL_API_CALL rocalNop ( RocalContext  context,
RocalTensor  input,
bool  is_output 
)

Performs no operation.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
Returns
RocalTensor

◆ rocalNormalize()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]axesaxes list for tensor normalization
[in]meanmean value (specified for each channel) for tensor normalization
[in]std_devstandard deviation value (specified for each channel) for tensor normalization
[in]is_outputis the output tensor part of the graph output
[in]scalescale value (specified for each channel) for tensor normalization
[in]shiftshift value (specified for each channel) for tensor normalization
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalPixelate()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalPreEmphasisFilter()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputSets to True if the output tensor is part of the graph output
[in]preemph_coeffPreemphasis coefficient
[in]preemph_border_typeBorder value policy. Possible values are "zero", "clamp", "reflect".
[in]output_datatypeThe data type of the output tensor
Returns
RocalTensor

◆ rocalRain()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]rain_valueparameter represents the intensity of rain effect
[in]rain_widthparameter represents the width of the rain effect
[in]rain_heightparameter represents the width of the rain effect
[in]rain_transparencyparameter represents the transperancy of the rain effect
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalRainFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]rain_valueparameter represents the intensity of rain effect
[in]rain_widthparameter represents the width of the rain effect
[in]rain_heightparameter represents the width of the rain effect
[in]rain_transparencyparameter represents the transperancy of the rain effect
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalRandomCrop()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]num_of_attemptsmaximum number of attempts the function will make to find a valid crop
[in]crop_area_factorspecifies the proportion of the input image to be included in the cropped region
[in]crop_aspect_ratiospecifies the aspect ratio of the cropped region
[in]crop_pos_xspecifies a specific horizontal position for the crop
[in]crop_pos_yspecifies a specific vertical position for the crop
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalResample()

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.

Parameters
[in]p_contextRocal context
[in]p_inputInput Rocal tensor
[in]p_output_resample_ratethe output resample rate for a batch of audio samples
[in]is_outputIs the output tensor part of the graph output
[in]sample_hintsample_hint value is the value required to allocate the max memory for output tensor wrt resample_rate and the samples
[in]qualityThe resampling is achieved by applying a sinc filter with Hann window with an extent controlled by the quality argument
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalResize()

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.

Note
Accepts U8 and RGB24 input.
: Accepts U8 and RGB24 input.
Parameters
[in]contextcontext for the pipeline.
[in]inputInput Rocal Tensor
[in]dest_widthoutput width
[in]dest_heightouput Height
[in]is_outputTrue: the output image is needed by user and will be copied to output buffers using the data transfer API calls. False: the output image is just an intermediate image, user is not interested in using it directly. This option allows certain optimizations to be achieved.
[in]scaling_modeThe resize scaling_mode to resize the image.
[in]max_sizeLimits the size of the resized image.
[in]resize_shorterThe length of the shorter dimension of the image.
[in]resize_longerThe length of the larger dimension of the image.
[in]interpolation_typeThe type of interpolation to be used for resize.
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalResizeCropMirror()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]dest_heightoutput height
[in]dest_widthoutput width
[in]crop_heightcrop width of the tensor
[in]crop_widthcrop height of the tensor
[in]is_outputis the output tensor part of the graph output
[in]mirrorcontrols horizontal flip of the tensor
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalResizeCropMirrorFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]dest_heightoutput height
[in]dest_widthoutput width
[in]crop_hcrop width of the tensor
[in]crop_wcrop height of the tensor
[in]is_outputis the output tensor part of the graph output
[in]mirrorcontrols horizontal flip of the tensor
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalResizeMirrorNormalize()

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.

Note
Accepts U8 and RGB24 input.
Parameters
[in]p_contextRocal context
[in]p_inputInput Rocal Tensor
[in]dest_widthoutput width
[in]dest_heightoutput height
[in]meanThe channel mean values
[in]std_devThe channel standard deviation values
[in]is_outputTrue: the output image is needed by user and will be copied to output buffers using the data transfer API calls. False: the output image is just an intermediate image, user is not interested in using it directly. This option allows certain optimizations to be achieved.
[in]scaling_modeThe resize scaling_mode to resize the image.
[in]max_sizeLimits the size of the resized image.
[in]resize_shorterThe length of the shorter dimension of the image.
[in]resize_longerThe length of the larger dimension of the image.
[in]interpolation_typeThe type of interpolation to be used for resize.
[in]mirrorParameter to enable horizontal flip for output image.
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalRotate()

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.

Note
Accepts U8 and RGB24 input.
Parameters
[in]contextRocal context
[in]inputInput Rocal Tensor
[in]is_outputTrue: the output tensor is needed by user and will be copied to output buffers using the data transfer API calls. False: the output tensor is just an intermediate tensor, user is not interested in using it directly. This option allows certain optimizations to be achieved.
[in]angleRocal parameter defining the rotation angle value in degrees.
[in]dest_widthoutput width
[in]dest_heightoutput height
[in]interpolation_typeThe type of interpolation to be used for rotate.
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalRotateFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal Tensor
[in]dest_widthoutput width
[in]dest_heightoutput height
[in]is_outputIs the output tensor part of the graph output
[in]angleThe rotation angle value in degrees.
[in]interpolation_typeThe type of interpolation to be used for rotate.
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalSaturation()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]saturationsaturation adjustment value
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalSaturationFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]saturationsaturation adjustment value
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalSequenceRearrange()

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 values in the range [0, sequence_length). Frames can be repeated or dropped in the new_order.

Note
Accepts U8 and RGB24 input.
Parameters
[in]p_contextcontext for the pipeline.
[in]p_inputInput Rocal Tensor
[in]new_orderrepresents the new order of the frames in the sequence
[in]is_outputTrue: the output image is needed by user and will be copied to output buffers using the data transfer API calls. False: the output image is just an intermediate image, user is not interested in using it directly. This option allows certain optimizations to be achieved.
Returns
RocalTensor

◆ rocalSlice()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]anchoranchor values used for specifying the starting indices of slice
[in]shapeshape values used for specifying the length of slice
[in]fill_valuesfill values based on out of Bound policy
[in]policy
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalSnow()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]snowFloat param representing the intensity of snow effect
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalSnowFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]snowFloat param representing the intensity of snow effect
[in]is_outputis the output tensor part of the graph output
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalSnPNoise()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]noise_probprobability of applying the Salt and Pepper noise.
[in]salt_probprobability of applying salt noise
[in]salt_valspecifies the value of the salt noise
[in]pepper_valspecifies the value of the pepper noise
[in]seedseed value for the random number generator
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalSnPNoiseFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]noise_probprobability of applying the Salt and Pepper noise.
[in]salt_probprobability of applying salt noise
[in]salt_valspecifies the value of the salt noise
[in]pepper_valspecifies the value of the pepper noise
[in]seedseed value for the random number generator
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalSpectrogram()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]window_fnvalues of the window function
[in]center_windowsboolean value to specify whether extracted windows should be padded so that the window function is centered at multiples of window_step
[in]reflect_paddingIndicates the padding policy when sampling outside the bounds of the audio data
[in]spectrogram_layoutoutput spectrogram layout
[in]powerExponent of the magnitude of the spectrum
[in]nfftSize of the Fast Fourier transform (FFT)
[in]window_lengthWindow size in the number of samples
[in]window_stepStep between the Short-time Fourier transform (STFT) windows in number of samples
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalSSDRandomCrop()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]thresholdthe threshold parameter for crop operation
[in]crop_area_factorspecifies the proportion of the input image to be included in the cropped region
[in]crop_aspect_ratiospecifies the aspect ratio of the cropped region
[in]crop_pos_xspecifies a specific horizontal position for the crop
[in]crop_pos_yspecifies a specific vertical position for the crop
[in]num_of_attemptshe maximum number of attempts the function will make to find a valid crop
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalToDecibels()

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.

Parameters
[in]p_contextRocal context
[in]p_inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]cutoff_dbminimum or cut-off ratio in dB
[in]multiplierfactor by which the logarithm is multiplied
[in]reference_magnitudeReference magnitude which if not provided uses maximum value of input as reference
[in]rocal_tensor_output_typethe data type of the output tensor
Returns
RocalTensor

◆ rocalUniformDistribution()

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.

Parameters
[in]p_contextRocal context
[in]p_inputInput Rocal tensor
[in]is_outputIs the output tensor part of the graph output
[in]rangeThe range for generating uniform distribution
Returns
RocalTensor

◆ rocalVignette()

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.

Note
Accepts U8 and RGB24 input.
Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]sdevstandard deviation for the vignette effect
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalVignetteFixed()

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.

Note
Accepts U8 and RGB24 input.
Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]sdevstandard deviation for the vignette effect
[in]is_outputis the output tensor part of the graph output
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalWarpAffine()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]x0float parameter representing the coefficient of affine tensor matrix
[in]x1float parameter representing the coefficient of affine tensor matrix
[in]y0float parameter representing the coefficient of affine tensor matrix
[in]y1float parameter representing the coefficient of affine tensor matrix
[in]o0float parameter representing the coefficient of affine tensor matrix
[in]o1float parameter representing the coefficient of affine tensor matrix
[in]dest_heightoutput height
[in]dest_widthoutput width
[in]interpolation_typeThe type of interpolation to be used for warp affine.
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor

◆ rocalWarpAffineFixed()

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.

Parameters
[in]contextRocal context
[in]inputInput Rocal tensor
[in]is_outputis the output tensor part of the graph output
[in]x0float parameter representing the coefficient of affine tensor matrix
[in]x1float parameter representing the coefficient of affine tensor matrix
[in]y0float parameter representing the coefficient of affine tensor matrix
[in]y1float parameter representing the coefficient of affine tensor matrix
[in]o0float parameter representing the coefficient of affine tensor matrix
[in]o1float parameter representing the coefficient of affine tensor matrix
[in]dest_heightoutput height
[in]dest_widthoutput width
[in]interpolation_typeThe type of interpolation to be used for warp affine.
[in]output_layoutthe layout of the output tensor
[in]output_datatypethe data type of the output tensor
Returns
RocalTensor