Compute Library
18.05
|
Go to the source code of this file.
Functions | |
__kernel void | remap_nearest_neighbour (__global uchar *in_ptr, uint in_stride_x, uint in_step_x, uint in_stride_y, uint in_step_y, uint in_offset_first_element_in_bytes, __global uchar *out_ptr, uint out_stride_x, uint out_step_x, uint out_stride_y, uint out_step_y, uint out_offset_first_element_in_bytes, __global uchar *mapx_ptr, uint mapx_stride_x, uint mapx_step_x, uint mapx_stride_y, uint mapx_step_y, uint mapx_offset_first_element_in_bytes, __global uchar *mapy_ptr, uint mapy_stride_x, uint mapy_step_x, uint mapy_stride_y, uint mapy_step_y, uint mapy_offset_first_element_in_bytes, const float width, const float height) |
Performs a remapping of an input image to an output given two remapping image using nearest neighbor as interpolation. More... | |
__kernel void | remap_bilinear (__global uchar *in_ptr, uint in_stride_x, uint in_step_x, uint in_stride_y, uint in_step_y, uint in_offset_first_element_in_bytes, __global uchar *out_ptr, uint out_stride_x, uint out_step_x, uint out_stride_y, uint out_step_y, uint out_offset_first_element_in_bytes, __global uchar *mapx_ptr, uint mapx_stride_x, uint mapx_step_x, uint mapx_stride_y, uint mapx_step_y, uint mapx_offset_first_element_in_bytes, __global uchar *mapy_ptr, uint mapy_stride_x, uint mapy_step_x, uint mapy_stride_y, uint mapy_step_y, uint mapy_offset_first_element_in_bytes, const float width, const float height) |
Performs a remapping of an input image to an output given two remapping image using bilinear as interpolation. More... | |
__kernel void remap_bilinear | ( | __global uchar * | in_ptr, |
uint | in_stride_x, | ||
uint | in_step_x, | ||
uint | in_stride_y, | ||
uint | in_step_y, | ||
uint | in_offset_first_element_in_bytes, | ||
__global uchar * | out_ptr, | ||
uint | out_stride_x, | ||
uint | out_step_x, | ||
uint | out_stride_y, | ||
uint | out_step_y, | ||
uint | out_offset_first_element_in_bytes, | ||
__global uchar * | mapx_ptr, | ||
uint | mapx_stride_x, | ||
uint | mapx_step_x, | ||
uint | mapx_stride_y, | ||
uint | mapx_step_y, | ||
uint | mapx_offset_first_element_in_bytes, | ||
__global uchar * | mapy_ptr, | ||
uint | mapy_stride_x, | ||
uint | mapy_step_x, | ||
uint | mapy_stride_y, | ||
uint | mapy_step_y, | ||
uint | mapy_offset_first_element_in_bytes, | ||
const float | width, | ||
const float | height | ||
) |
Performs a remapping of an input image to an output given two remapping image using bilinear as interpolation.
This kernel performs remapping with this method of pixel coordinate translation: out(x,y) = in(mapx(x,y), mapy(x,y));
[in] | in_ptr | Pointer to the source image. Supported data types: U8. |
[in] | in_stride_x | Stride of the source image in X dimension (in bytes) |
[in] | in_step_x | in_stride_x * number of elements along X processed per work item (in bytes) |
[in] | in_stride_y | Stride of the source image in Y dimension (in bytes) |
[in] | in_step_y | in_stride_y * number of elements along Y processed per work item (in bytes) |
[in] | in_offset_first_element_in_bytes | Offset of the first element in the source image |
[out] | out_ptr | Pointer to the destination image. Supported data types: U8. |
[in] | out_stride_x | Stride of the destination image in X dimension (in bytes) |
[in] | out_step_x | out_stride_x * number of elements along X processed per work item (in bytes) |
[in] | out_stride_y | Stride of the destination image in Y dimension (in bytes) |
[in] | out_step_y | out_stride_y * number of elements along Y processed per work item (in bytes) |
[in] | out_offset_first_element_in_bytes | Offset of the first element in the destination image |
[in] | mapx_ptr | Pointer to the x remapping image. Supported data types: F32. |
[in] | mapx_stride_x | Stride of the remapping image in X dimension (in bytes) |
[in] | mapx_step_x | mapx_stride_x * number of elements along X processed per work item (in bytes) |
[in] | mapx_stride_y | Stride of the remapping image in Y dimension (in bytes) |
[in] | mapx_step_y | mapy_stride_y * number of elements along Y processed per work item (in bytes) |
[in] | mapx_offset_first_element_in_bytes | Offset of the first element in the remapping image |
[in] | mapy_ptr | Pointer to the x remapping image. Supported data types: F32. |
[in] | mapy_stride_x | Stride of the remapping image in X dimension (in bytes) |
[in] | mapy_step_x | mapy_stride_x * number of elements along X processed per work item (in bytes) |
[in] | mapy_stride_y | Stride of the remapping image in Y dimension (in bytes) |
[in] | mapy_step_y | mapy_stride_y * number of elements along Y processed per work item (in bytes) |
[in] | mapy_offset_first_element_in_bytes | Offset of the first element in the remapping image |
[in] | width | Width of the input image |
[in] | height | Height of the input image |
Definition at line 113 of file remap.cl.
References bilinear_interpolate(), clamp_to_border(), CONVERT_TO_IMAGE_STRUCT, CONVERT_TO_IMAGE_STRUCT_NO_STEP, and Image::ptr.
__kernel void remap_nearest_neighbour | ( | __global uchar * | in_ptr, |
uint | in_stride_x, | ||
uint | in_step_x, | ||
uint | in_stride_y, | ||
uint | in_step_y, | ||
uint | in_offset_first_element_in_bytes, | ||
__global uchar * | out_ptr, | ||
uint | out_stride_x, | ||
uint | out_step_x, | ||
uint | out_stride_y, | ||
uint | out_step_y, | ||
uint | out_offset_first_element_in_bytes, | ||
__global uchar * | mapx_ptr, | ||
uint | mapx_stride_x, | ||
uint | mapx_step_x, | ||
uint | mapx_stride_y, | ||
uint | mapx_step_y, | ||
uint | mapx_offset_first_element_in_bytes, | ||
__global uchar * | mapy_ptr, | ||
uint | mapy_stride_x, | ||
uint | mapy_step_x, | ||
uint | mapy_stride_y, | ||
uint | mapy_step_y, | ||
uint | mapy_offset_first_element_in_bytes, | ||
const float | width, | ||
const float | height | ||
) |
Performs a remapping of an input image to an output given two remapping image using nearest neighbor as interpolation.
This kernel performs remapping with this method of pixel coordinate translation: out(x,y) = in(mapx(x,y), mapy(x,y));
[in] | in_ptr | Pointer to the source image. Supported data types: U8. |
[in] | in_stride_x | Stride of the source image in X dimension (in bytes) |
[in] | in_step_x | in_stride_x * number of elements along X processed per work item (in bytes) |
[in] | in_stride_y | Stride of the source image in Y dimension (in bytes) |
[in] | in_step_y | in_stride_y * number of elements along Y processed per work item (in bytes) |
[in] | in_offset_first_element_in_bytes | Offset of the first element in the source image |
[out] | out_ptr | Pointer to the destination image. Supported data types: U8. |
[in] | out_stride_x | Stride of the destination image in X dimension (in bytes) |
[in] | out_step_x | out_stride_x * number of elements along X processed per work item (in bytes) |
[in] | out_stride_y | Stride of the destination image in Y dimension (in bytes) |
[in] | out_step_y | out_stride_y * number of elements along Y processed per work item (in bytes) |
[in] | out_offset_first_element_in_bytes | Offset of the first element in the destination image |
[in] | mapx_ptr | Pointer to the x remapping image. Supported data types: F32. |
[in] | mapx_stride_x | Stride of the remapping image in X dimension (in bytes) |
[in] | mapx_step_x | mapx_stride_x * number of elements along X processed per work item (in bytes) |
[in] | mapx_stride_y | Stride of the remapping image in Y dimension (in bytes) |
[in] | mapx_step_y | mapy_stride_y * number of elements along Y processed per work item (in bytes) |
[in] | mapx_offset_first_element_in_bytes | Offset of the first element in the remapping image |
[in] | mapy_ptr | Pointer to the x remapping image. Supported data types: F32. |
[in] | mapy_stride_x | Stride of the remapping image in X dimension (in bytes) |
[in] | mapy_step_x | mapy_stride_x * number of elements along X processed per work item (in bytes) |
[in] | mapy_stride_y | Stride of the remapping image in Y dimension (in bytes) |
[in] | mapy_step_y | mapy_stride_y * number of elements along Y processed per work item (in bytes) |
[in] | mapy_offset_first_element_in_bytes | Offset of the first element in the remapping image |
[in] | width | Width of the input image |
[in] | height | Height of the input image |
Definition at line 59 of file remap.cl.
References clamp_to_border(), CONVERT_TO_IMAGE_STRUCT, CONVERT_TO_IMAGE_STRUCT_NO_STEP, Image::ptr, and read_texels4().