ARM Compute Library
17.03.1
|
#include "helpers.h"
Go to the source code of this file.
Macros | |
#define | DATA_TYPE short |
#define | DATA_TYPE_OUT uchar |
Functions | |
short8 | convolution1x3 (__global const uchar *left_pixel, const short left_coeff, const short middle_coeff, const short right_coeff) |
Compute a 1D horizontal convolution of size 3 for 8 bytes assuming the input is made of 1 channel of 1 byte (i.e 8 pixels). More... | |
short8 | convolution3x3 (Image *src, const short mat0, const short mat1, const short mat2, const short mat3, const short mat4, const short mat5, const short mat6, const short mat7, const short mat8, uint scale) |
Apply a 3x3 convolution matrix to a single channel U8 input image and return the result. More... | |
__kernel void | convolution3x3_static (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes) |
Apply a 3x3 static convolution matrix to a single channel U8 input image and output a single channel image. More... | |
#define DATA_TYPE short |
Definition at line 27 of file convolution3x3.cl.
Referenced by activation_layer(), bilinear_interpolate(), col2im(), convolution1x3(), convolution3x3(), convolution3x3_static(), convolution_rectangle(), fill_image_borders_constant(), fill_image_borders_replicate(), harris_score_1x5(), harris_score_1x7(), harris_score_3x3(), im2col_generic(), im2col_reduced(), magnitude_l2(), magnitude_phase(), minmaxloc(), non_max_suppression(), normalization_layer_cross_map(), normalization_layer_in_map(), pooling_layer_2(), pooling_layer_3(), read_texels4(), reshape_to_columns(), scale_bilinear(), scale_nearest_neighbour(), and transpose().
#define DATA_TYPE_OUT uchar |
Definition at line 31 of file convolution3x3.cl.
Referenced by absdiff(), arithmetic_add(), arithmetic_sub(), combine_gradients_L1(), combine_gradients_L2(), convert_depth_down(), convert_depth_up(), convolution3x3_static(), convolution_rectangle(), pixelwise_mul_float(), pixelwise_mul_int(), and suppress_non_maximum().
|
inline |
Compute a 1D horizontal convolution of size 3 for 8 bytes assuming the input is made of 1 channel of 1 byte (i.e 8 pixels).
[in] | left_pixel | Pointer to the left pixel. |
[in] | left_coeff | Weight of the left pixel |
[in] | middle_coeff | Weight of the middle pixel |
[in] | right_coeff | Weight of the right pixel |
Definition at line 43 of file convolution3x3.cl.
References CONVERT, DATA_TYPE, and VEC_DATA_TYPE.
Referenced by convolution3x3(), and convolution_rectangle().
|
inline |
Apply a 3x3 convolution matrix to a single channel U8 input image and return the result.
Convolution matrix layout:
[ mat0, mat1, mat2 ]
[ mat3, mat4, mat5 ]
[ mat6, mat7, mat8 ]
[in] | src | A pointer to source Image structure |
[in] | mat0 | Coefficient from the convolution matrix |
[in] | mat1 | Coefficient from the convolution matrix |
[in] | mat2 | Coefficient from the convolution matrix |
[in] | mat3 | Coefficient from the convolution matrix |
[in] | mat4 | Coefficient from the convolution matrix |
[in] | mat5 | Coefficient from the convolution matrix |
[in] | mat6 | Coefficient from the convolution matrix |
[in] | mat0 | Coefficient from the convolution matrix |
[in] | mat7 | Coefficient from the convolution matrix |
[in] | mat8 | Coefficient from the convolution matrix |
[in] | scale | Convolution matrix scale (Sum of the coefficients, or 1 if the sum is 0) |
Definition at line 82 of file convolution3x3.cl.
References convolution1x3(), DATA_TYPE, offset(), and VEC_DATA_TYPE.
Referenced by convolution3x3_static().
__kernel void convolution3x3_static | ( | __global uchar * | src_ptr, |
uint | src_stride_x, | ||
uint | src_step_x, | ||
uint | src_stride_y, | ||
uint | src_step_y, | ||
uint | src_offset_first_element_in_bytes, | ||
__global uchar * | dst_ptr, | ||
uint | dst_stride_x, | ||
uint | dst_step_x, | ||
uint | dst_stride_y, | ||
uint | dst_step_y, | ||
uint | dst_offset_first_element_in_bytes | ||
) |
Apply a 3x3 static convolution matrix to a single channel U8 input image and output a single channel image.
[in] | src_ptr | Pointer to the source image |
[in] | src_stride_x | Stride of the source image in X dimension (in bytes) |
[in] | src_step_x | src_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | src_stride_y | Stride of the source image in Y dimension (in bytes) |
[in] | src_step_y | src_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | src_offset_first_element_in_bytes | The offset of the first element in the source image |
[out] | dst_ptr | Pointer to the destination image. Supported data types: U8, S16 |
[in] | dst_stride_x | Stride of the destination image in X dimension (in bytes) |
[in] | dst_step_x | dst_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | dst_stride_y | Stride of the destination image in Y dimension (in bytes) |
[in] | dst_step_y | dst_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | dst_offset_first_element_in_bytes | The offset of the first element in the destination image |
Definition at line 123 of file convolution3x3.cl.
References CONVERT_SAT, CONVERT_TO_IMAGE_STRUCT, convolution3x3(), DATA_TYPE, DATA_TYPE_OUT, Image::ptr, and VEC_DATA_TYPE.