|
| kernel void | separateRGBChannels_Float2Float (global float *AoS, global float *r, global float *g, global float *b, local float *data) |
| | Separates the 3 channels of an RGB image. More...
|
| |
| kernel void | separateRGBChannels_Uchar2Float (global uchar *AoS, global float *r, global float *g, global float *b, local uchar *data) |
| | Separates the 3 channels of an RGB image. More...
|
| |
| kernel void | combineRGBChannels_Float2Float (global float *r, global float *g, global float *b, global float *AoS, local float *data) |
| | Combines the 3 channels of an RGB Image. More...
|
| |
| kernel void | combineRGBChannels_Float2Uchar (global float *r, global float *g, global float *b, global uchar *AoS, local float *data) |
| | Combines the 3 channels of an RGB Image. More...
|
| |
| kernel void | depth_Ushort2Float (global ushort4 *depth, global float4 *fDepth, float scaling) |
| | Converts a buffer from type uchort to float. More...
|
| |
| kernel void | depthTo3D (global float *depth, global float4 *pCloud, float f, float scaling) |
| | Transforms a depth image to a point cloud. More...
|
| |
| kernel void | rgbNorm (global float *in, global float *out) |
| | Performs RGB color normalization. More...
|
| |
| kernel void | rgbdTo8D (global float *depth, global float *r, global float *g, global float *b, global float8 *p8D, local float *data, uint cols, float f, float scaling, int rgb_norm) |
| | Fuses 3-D space coordinates and RGB color values into 8-D feature points (homogeneous coordinates + RGBA values). More...
|
| |
| kernel void | splitPC8D (global float8 *pc8d, global float4 *pc4d, global float4 *rgba, unsigned int offset) |
| | Splits an 8-D point cloud into 4-D geometry points and RGBA color points. More...
|
| |
Kernels for manipulating images.
- Author
- Nick Lamprianidis
- Version
- 1.1
- Date
- 2015
- Copyright
- The MIT License (MIT)
- Copyright (c) 2015 Nick Lamprianidis
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| kernel void combineRGBChannels_Float2Float |
( |
global float * |
r, |
|
|
global float * |
g, |
|
|
global float * |
b, |
|
|
global float * |
AoS, |
|
|
local float * |
data |
|
) |
| |
Combines the 3 channels of an RGB Image.
Performs a matrix transposition on an RGB image (SoA -> AoS). For avoiding alignment restrictions, the SoA structure is broken out to the individual channels, R, G, B.
- Note
- The global workspace should be one-dimensional
(= # pixels in the input buffer). The global and local workspaces should be multiples of 3.
- Parameters
-
| [in] | r | input buffer with all the pixel values in channel R. |
| [in] | g | input buffer with all the pixel values in channel G. |
| [in] | b | input buffer with all the pixel values in channel B. |
| [out] | AoS | output buffer with the following (logical) arrangement: float[total-pixels][3]. Each row contains the RGB values of a pixel. |
| [in] | data | local buffer with size 3 x (# work-items in work-group) x sizeof (float) bytes. |
| kernel void combineRGBChannels_Float2Uchar |
( |
global float * |
r, |
|
|
global float * |
g, |
|
|
global float * |
b, |
|
|
global uchar * |
AoS, |
|
|
local float * |
data |
|
) |
| |
Combines the 3 channels of an RGB Image.
Performs a matrix transposition on an RGB image (SoA -> AoS), demotes the float type to uchar, and scales the data to 255. For avoiding alignment restrictions, the SoA structure is broken out to the individual channels, R, G, B.
- Note
- The global workspace should be one-dimensional
(= # pixels in the input buffer). The global and local workspaces should be multiples of 3.
- Parameters
-
| [in] | r | input buffer with all the pixel values in channel R. |
| [in] | g | input buffer with all the pixel values in channel G. |
| [in] | b | input buffer with all the pixel values in channel B. |
| [out] | AoS | output buffer with the following (logical) arrangement: uchar[total-pixels][3]. Each row contains the RGB values of a pixel. |
| [in] | data | local buffer with size 3 x (# work-items in work-group) x sizeof (float) bytes. |
| kernel void rgbdTo8D |
( |
global float * |
depth, |
|
|
global float * |
r, |
|
|
global float * |
g, |
|
|
global float * |
b, |
|
|
global float8 * |
p8D, |
|
|
local float * |
data, |
|
|
uint |
cols, |
|
|
float |
f, |
|
|
float |
scaling, |
|
|
int |
rgb_norm |
|
) |
| |
Fuses 3-D space coordinates and RGB color values into 8-D feature points (homogeneous coordinates + RGBA values).
Gathers the R, G, B channel values and assembles them into a pixel with opacity set to 1.0. It can optionally perform RGB normalization. Transforms the depth values into 4-D homogeneous coordinates, setting \( w=1 \).
- Note
- The global workspace should be one-dimensional
(= # elements in the input buffers). Both global and local workspaces should be multiples of 3.
- Parameters
-
| [in] | depth | depth array. |
| [in] | r | channel R array. |
| [in] | g | channel G array. |
| [in] | b | channel B array. |
| [out] | p8D | array of 8D elements (homogeneous coordinates + RGBA values). |
| [in] | data | local buffer with size 3 x (# work-items in work-group) x sizeof (float) bytes. |
| [in] | cols | number of columns (width) in the input images. |
| [in] | f | focal length (for Kinect: 595.f). |
| [in] | scaling | factor by which to scale the depth values before building the point cloud. |
| [in] | rgb_norm | flag to indicate whether to perform RGB normalization. |
| kernel void separateRGBChannels_Float2Float |
( |
global float * |
AoS, |
|
|
global float * |
r, |
|
|
global float * |
g, |
|
|
global float * |
b, |
|
|
local float * |
data |
|
) |
| |
Separates the 3 channels of an RGB image.
Performs a matrix transposition on an RGB image (AoS -> SoA). For avoiding alignment restrictions, the SoA structure is broken out to the individual channels, R, G, B.
- Note
- The global workspace should be one-dimensional
(= # pixels in the input buffer). The global and local workspaces should be multiples of 3.
- Parameters
-
| [in] | AoS | input buffer with the following (logical) arrangement: float[total-pixels][3]. Each row contains the RGB values of a pixel. |
| [out] | r | output buffer with all the pixel values in the first channel, R. |
| [out] | g | output buffer with all the pixel values in the second channel, G. |
| [out] | b | output buffer with all the pixel values in the third channel, B. |
| [in] | data | local buffer with size 3 x (# work-items in work-group) x sizeof (float) bytes. |
| kernel void separateRGBChannels_Uchar2Float |
( |
global uchar * |
AoS, |
|
|
global float * |
r, |
|
|
global float * |
g, |
|
|
global float * |
b, |
|
|
local uchar * |
data |
|
) |
| |
Separates the 3 channels of an RGB image.
Performs a matrix transposition on an RGB image (AoS -> SoA), and promotes the uchar type to float while normalizing the values to one. For avoiding alignment restrictions, the SoA structure is broken out to the individual channels, R, G, B.
- Note
- The global workspace should be one-dimensional
(= # pixels in the input buffer). The global and local workspaces should be multiples of 3.
- Parameters
-
| [in] | AoS | input buffer with the following (logical) arrangement: uchar[total-pixels][3]. Each row contains the RGB values of a pixel. |
| [out] | r | output buffer with all the pixel values in the first channel, R. |
| [out] | g | output buffer with all the pixel values in the second channel, G. |
| [out] | b | output buffer with all the pixel values in the third channel, B. |
| [in] | data | local buffer with size 3 x (# work-items in work-group) x sizeof (uchar) bytes. |