Compute Library
18.05
|
#include "helpers.h"
Go to the source code of this file.
Functions | |
const float8 | clamp_to_border_with_size (float8 coords, const float width, const float height, const float border_size) |
Clamps the given coordinates to the borders according to the border size. More... | |
const float8 | clamp_to_border (float8 coords, const float width, const float height) |
Clamps the given coordinates to the borders. More... | |
const DATA_TYPE4 | read_texels4 (const Image *in, const int8 coords) |
Reads four texels from the input image. More... | |
const float2 | get_current_coords () |
Returns the current thread coordinates. More... | |
const float8 | get_neighbour_coords (const float2 coord) |
Given a texel coordinates this function will return the following array of coordinates: [ P, right neighbour, below neighbour, below right neighbour ]. More... | |
const DATA_TYPE4 | bilinear_interpolate_with_border (const Image *in, const float8 coords, const float width, const float height, const float border_size) |
Computes the bilinear interpolation for each set of coordinates in the vector coords and returns the values. More... | |
const DATA_TYPE4 | bilinear_interpolate (const Image *in, const float8 coords, const float width, const float height) |
Computes the bilinear interpolation for each set of coordinates in the vector coords and returns the values. More... | |
|
inline |
Computes the bilinear interpolation for each set of coordinates in the vector coords and returns the values.
[in] | in | Pointer to the source image. |
[in] | coords | Vector of four 2D coordinates. Even pos is x and odd y. |
[in] | width | Width of the image |
[in] | height | Height of the image |
Definition at line 135 of file warp_helpers.h.
References bilinear_interpolate_with_border().
Referenced by remap_bilinear(), warp_affine_bilinear(), and warp_perspective_bilinear().
|
inline |
Computes the bilinear interpolation for each set of coordinates in the vector coords and returns the values.
[in] | in | Pointer to the source image. |
[in] | coords | Vector of four 2D coordinates. Even pos is x and odd y. |
[in] | width | Width of the image |
[in] | height | Height of the image |
[in] | border_size | Border size |
Definition at line 94 of file warp_helpers.h.
References arm_compute::test::validation::a, arm_compute::test::validation::b, clamp_to_border_with_size(), CONVERT, DATA_TYPE, get_neighbour_coords(), offset(), and VEC_DATA_TYPE.
Referenced by bilinear_interpolate(), and scale_bilinear().
|
inline |
Clamps the given coordinates to the borders.
[in] | coords | Vector of 2D coordinates to clamp. Even positions are X coords, odd positions are Y coords. |
[in] | width | Width of the image |
[in] | height | Height of the image |
Definition at line 48 of file warp_helpers.h.
References clamp_to_border_with_size().
Referenced by remap_bilinear(), remap_nearest_neighbour(), warp_affine_nearest_neighbour(), and warp_perspective_nearest_neighbour().
|
inline |
Clamps the given coordinates to the borders according to the border size.
[in] | coords | Vector of 2D coordinates to clamp. Even positions are X coords, odd positions are Y coords. |
[in] | width | Width of the image |
[in] | height | Height of the image |
[in] | border_size | Border size of the image |
Definition at line 34 of file warp_helpers.h.
References arm_compute::utility::clamp().
Referenced by bilinear_interpolate_with_border(), clamp_to_border(), and scale_nearest_neighbour().
|
inline |
Returns the current thread coordinates.
Definition at line 67 of file warp_helpers.h.
Referenced by scale_bilinear(), scale_nearest_neighbour(), warp_affine_bilinear(), warp_affine_nearest_neighbour(), warp_perspective_bilinear(), and warp_perspective_nearest_neighbour().
|
inline |
Given a texel coordinates this function will return the following array of coordinates: [ P, right neighbour, below neighbour, below right neighbour ].
[in] | coord | Input coordinates |
Definition at line 81 of file warp_helpers.h.
Referenced by bilinear_interpolate_with_border().
|
inline |
Reads four texels from the input image.
The coords vector is used to determine which texels to be read.
[in] | in | Pointer to the source image. |
[in] | coords | Vector of coordinates to be read from the image. |
Definition at line 58 of file warp_helpers.h.
References DATA_TYPE, offset(), and VEC_DATA_TYPE.
Referenced by remap_nearest_neighbour(), scale_nearest_neighbour(), warp_affine_nearest_neighbour(), and warp_perspective_nearest_neighbour().