ICP  1.1.0
 Hosted by GitHub
Namespaces | Functions
helper_funcs.hpp File Reference

Declarations of helper functions for testing. More...

#include <cassert>
#include <algorithm>
#include <functional>
#include <RBC/data_types.hpp>
#include <CL/cl.hpp>
Include dependency graph for helper_funcs.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 ICP
 Offers functions that are serial CPU implementations of the relevant algorithms in the ICP pipeline.
 

Functions

bool ICP::setProfilingFlag (int argc, char **argv)
 Checks the command line arguments for the profiling flag, --profiling. More...
 
template<typename T >
uint64_t ICP::nextPow2 (T num)
 Returns the first power of 2 greater than or equal to the input. More...
 
template<typename T >
void ICP::printBuffer (const char *title, T *ptr, uint32_t width, uint32_t height)
 Prints an array of an integer type to standard output. More...
 
template<typename T >
void ICP::printBufferF (const char *title, T *ptr, uint32_t width, uint32_t height, uint32_t prec)
 Prints an array of floating-point type to standard output. More...
 
template<typename T >
void ICP::cpuReduce (T *in, T *out, uint32_t cols, uint32_t rows, std::function< bool(T, T)> func)
 Reduces each row of an array to a single element. More...
 
template<typename T >
void ICP::cpuReduceSum (T *in, T *out, uint32_t cols, uint32_t rows)
 Reduces each row of an array to a single element (sum). More...
 
template<typename T >
void ICP::cpuInScan (T *in, T *out, uint32_t width, uint32_t height)
 Performs an inclusive scan operation on the columns of an array. More...
 
template<typename T >
void ICP::cpuExScan (T *in, T *out, uint32_t width, uint32_t height)
 Performs an exclusive scan operation on the columns of an array. More...
 
template<typename T >
void ICP::cpuICPLMs (T *in, T *out)
 Samples a point cloud for 16384 (128x128) landmarks. More...
 
template<typename T >
void ICP::cpuICPReps (T *in, T *out, uint32_t nr)
 Samples a set of 16384 (128x128) landmarks for representatives. More...
 
template<typename T >
void ICP::cpuICPWeights (rbc_dist_id *D, T *W, cl_double *SW, uint32_t n)
 Computes weights for pairs of points in the fixed and moving sets, and also reduces them to get their sum. More...
 
template<typename T >
void ICP::cpuICPMean (T *F, T *M, T *mean, uint32_t n)
 Computes the mean on the xyz dimensions of the set of 8-D points. More...
 
template<typename T >
void ICP::cpuICPMeanWeighted (T *F, T *M, T *MEAN, T *W, uint32_t n)
 Computes the weighted mean on the xyz dimensions of the set of 8-D points. More...
 
template<typename T >
void ICP::cpuICPDevs (T *F, T *M, T *DF, T *DM, T *mean, uint32_t n)
 Computes the deviations of a set of points from their mean. More...
 
template<typename T >
void ICP::cpuICPS (T *DM, T *DF, T *S, uint32_t m, float c)
 Calculates the S matrix and the constituents of the scale factor s. More...
 
template<typename T >
void ICP::cpuICPSw (T *M, T *F, T *W, T *S, uint32_t m, float c)
 Calculates the S matrix and the constituents of the scale factor s. More...
 
template<typename T >
void ICP::cross_product (T *a, T *b, T *c)
 Performs a cross product. More...
 
template<typename T >
void ICP::cpuICPTransformQ (T *M, T *tM, T *D, uint32_t m)
 Performs a homogeneous transformation on a set of points using a quaternion and a translation vector. More...
 
template<typename T >
void ICP::cpuICPTransformQ2 (T *M, T *tM, T *D, uint32_t m)
 Performs a homogeneous transformation on a set of points using a quaternion and a translation vector. More...
 
template<typename T >
void ICP::cpuICPTransformM (T *M, T *tM, T *D, uint32_t m)
 Performs a homogeneous transformation on a set of points using a transformation matrix. More...
 
template<typename T >
ICP::cpuLength (T *x)
 Computes the vector length ( \(\ell_2\) norm). More...
 
template<typename T >
ICP::cpuDistance (T *x1, T *x2)
 Computes the vector distance ( \(\ell_2\) norm). More...
 
template<typename T >
void ICP::cpuNormalize (T *x)
 Normalizes a vector. More...
 
template<typename T >
void ICP::cpuProd (T *N, T *x, T *x_new)
 Computes a matrix-vector product, \( x_{new}=Nx \). More...
 
template<typename T >
ICP::cpuICPPowerMethod (T *Sij, T *means, T *Tk)
 Computes the quantities that represent the incremental development in the transformation estimation in iteration k. More...
 

Detailed Description

Declarations of helper functions for testing.

Author
Nick Lamprianidis
Version
1.1.0
Date
2015
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.