ARM Compute Library
17.04
|
#include "helpers.h"
Go to the source code of this file.
Functions | |
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 (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 80 of file warp_helpers.h.
References clamp_to_border(), CONVERT, DATA_TYPE, get_neighbour_coords(), offset(), and VEC_DATA_TYPE.
Referenced by remap_bilinear(), scale_bilinear(), warp_affine_bilinear(), and warp_perspective_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 33 of file warp_helpers.h.
Referenced by bilinear_interpolate(), remap_bilinear(), remap_nearest_neighbour(), scale_bilinear(), scale_nearest_neighbour(), warp_affine_bilinear(), warp_affine_nearest_neighbour(), warp_perspective_bilinear(), and warp_perspective_nearest_neighbour().
|
inline |
Returns the current thread coordinates.
Definition at line 54 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 68 of file warp_helpers.h.
Referenced by bilinear_interpolate().
|
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 45 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().