SLAMflex SE  0.1.0
SLAMflex provides detection and tracking of dominant planes for smartphone devices. This plane can then be used to show AR content relative to the plane orientation. The detection of plane is performed in the field of view of the smartphone camera. In subsequent frames it is tracked. The interface returns the plane position and orientation.
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
CVD Namespace Reference

Namespaces

 Exceptions
 
 gl
 
 ImageError
 
 ImageUtil
 
 Internal
 
 Interpolate
 
 median
 
 Pixel
 

Classes

struct  AlignedMem
 
class  BasicImage
 
struct  CastCopy
 
struct  CastCopy< T, T >
 
struct  collect_pos
 
struct  collect_score
 
class  ConstSubImageIterator
 
struct  ConvolveMiddle
 
struct  ConvolveMiddle< T, 0, 1 >
 
struct  ConvolveMiddle< T, N, 1 >
 
struct  ConvolveMiddle< T,-1, 1 >
 
struct  ConvolveMiddle< T,-1, C >
 
struct  CornerNegative
 
struct  CornerPositive
 
class  cvd_timer
 
struct  GetPixelRowTyped
 
struct  GetPixelRowTyped< T, T >
 
struct  Gradient
 
struct  Gradient< S, T, 1, 2 >
 
struct  Greater
 
struct  GreaterEqual
 
class  Image
 
class  image_interpolate
 
class  image_interpolate< Interpolate::Bicubic, T >
 
class  image_interpolate< Interpolate::Bilinear, T >
 
class  image_interpolate< Interpolate::NearestNeighbour, C >
 
class  ImageCreationIterator
 
class  ImageRef
 
class  La
 
struct  La_ops
 
struct  Lock
 
struct  multiplyBy
 
class  Rgb
 
struct  Rgb8
 
struct  Rgb_ops
 
class  Rgba
 
struct  Rgba_ops
 
class  Runnable
 This is an abstract base class for anything with a run() method. More...
 
class  SimpleTimer
 
class  SubImage
 
class  SubImageIterator
 
struct  SumSquaredDifferences
 
class  Synchronized
 
class  Thread
 
struct  ZeroPixel
 
struct  ZeroPixel< T, true >
 
struct  ZeroPixels
 
struct  ZeroPixels< T, true >
 

Typedefs

typedef unsigned char byte
 

Enumerations

enum  TEXT_STYLE { FILL = 0, OUTLINE = 1, NICE = 2 }
 different style for font rendering More...
 

Functions

template<class T >
abs (T t)
 
unsigned char abs (unsigned char b)
 
unsigned short abs (unsigned short u)
 
unsigned int abs (unsigned int u)
 
unsigned long abs (unsigned long u)
 
void convolveGaussian5_1 (Image< byte > &I)
 
double compute_van_vliet_variance (const double d[])
 
double compute_van_vliet_variance (const double d[], double J[3])
 
void compute_scaling_jacobian (const double d[], double J[])
 
void scale_d (double d[], double p)
 
void compute_van_vliet_scaled_d (double sigma, double d[])
 
void build_van_vliet_b (const double d[], double b[])
 
void compute_van_vliet_b (double sigma, double b[])
 
void compute_triggs_M (const double b[], double M[][3])
 
void forward_to_backward (const double M[][3], const double i_plus, const double inv_alpha, double &y1, double &y2, double &y3)
 
template<class T >
clamp01 (T x)
 
void van_vliet_blur (const double b[], const CVD::SubImage< float > in, CVD::SubImage< float > out)
 
template<class T >
gaussianKernel (std::vector< T > &k, T maxval, double stddev)
 
template<class S , class T >
scaleKernel (const std::vector< S > &k, std::vector< T > &scaled, T maxval)
 
template<class T >
void convolveGaussian5_1 (BasicImage< T > &I)
 
template<class T >
void convolveWithBox (const BasicImage< T > &I, BasicImage< T > &J, ImageRef hwin)
 
template<class T >
void convolveWithBox (const BasicImage< T > &I, BasicImage< T > &J, int hwin)
 
template<class T >
void convolveWithBox (BasicImage< T > &I, int hwin)
 
template<class T >
void convolveWithBox (BasicImage< T > &I, ImageRef hwin)
 
template<class T , int A, int B, int C>
void convolveSymmetric (Image< T > &I)
 
template<class T , int A, int B, int C, int D>
void convolveSymmetric (Image< T > &I)
 
template<class T , class K >
void convolveSeparableSymmetric (Image< T > &I, const std::vector< K > &kernel, K divisor)
 
template<class A , class B >
const B * getPixelRowTyped (const A *row, int n, B *rowbuf)
 
template<class T , class S >
void cast_copy (const T *from, S *to, int count)
 
template<class T , class S >
const T * convolveMiddle (const T *input, const S &factor, const S *kernel, int ksize, int n, T *output)
 
template<class T >
void convolveGaussian (BasicImage< T > &I, double sigma, double sigmas=3.0)
 
template<class T >
void convolveGaussian (const BasicImage< T > &I, BasicImage< T > &out, double sigma, double sigmas=3.0)
 
void convolveGaussian (const BasicImage< float > &I, BasicImage< float > &out, double sigma, double sigmas=3.0)
 
void convolveGaussian_fir (const BasicImage< float > &I, BasicImage< float > &out, double sigma, double sigmas=3.0)
 
template<class T , class O , class K >
void convolve_gaussian_3 (const BasicImage< T > &I, BasicImage< O > &out, K k1, K k2)
 
unsigned long long get_time_of_day_us ()
 
double get_time_of_day ()
 
void fast_corner_detect_plain_10 (const SubImage< byte > &i, vector< ImageRef > &corners, int b)
 
static bool test_gt_set (int a, int b, int &min_diff)
 
int fast_corner_score_10 (const byte *cache_0, const int offset[], int b)
 
void fast_corner_score_10 (const SubImage< byte > &i, const vector< ImageRef > &corners, int b, vector< int > &scores)
 
void fast_corner_detect_plain_9 (const SubImage< byte > &i, vector< ImageRef > &corners, int b)
 
static bool test_gt_set (int a, int b, int &min_diff)
 
int fast_corner_score_9 (const byte *cache_0, const int offset[], int b)
 
void fast_corner_score_9 (const SubImage< byte > &i, const vector< ImageRef > &corners, int b, vector< int > &scores)
 
int old_style_corner_score (const BasicImage< byte > &im, ImageRef c, const int *pointer_dir, int barrier)
 
void compute_fast_score_old (const BasicImage< byte > &im, const vector< ImageRef > &corners, int barrier, vector< int > &scores)
 
void fast_nonmax (const BasicImage< byte > &im, const vector< ImageRef > &corners, int barrier, vector< ImageRef > &max_corners)
 
void fast_nonmax_with_scores (const BasicImage< byte > &im, const vector< ImageRef > &corners, int barrier, vector< pair< ImageRef, int > > &max_corners)
 
void fast_nonmax (const BasicImage< byte > &im, const std::vector< ImageRef > &corners, int barrier, std::vector< ImageRef > &max_corners)
 
void fast_nonmax_with_scores (const BasicImage< byte > &im, const std::vector< ImageRef > &corners, int barrier, std::vector< std::pair< ImageRef, int > > &max_corners)
 
void fast_corner_detect_9 (const BasicImage< byte > &im, std::vector< ImageRef > &corners, int barrier)
 
void fast_corner_score_9 (const SubImage< byte > &i, const std::vector< ImageRef > &corners, int b, std::vector< int > &scores)
 
void fast_corner_detect_9_nonmax (const BasicImage< byte > &im, std::vector< ImageRef > &max_corners, int barrier)
 
void fast_corner_detect_10 (const BasicImage< byte > &im, std::vector< ImageRef > &corners, int barrier)
 
void fast_corner_score_10 (const SubImage< byte > &i, const std::vector< ImageRef > &corners, int b, std::vector< int > &scores)
 
void glVertex (const ImageRef &i)
 
void glTexCoord (const ImageRef &i)
 
void glRasterPos (const ImageRef &i)
 
void glRect (const ImageRef &p, const ImageRef &q)
 
void glVertex (const TooN::Vector< 2 > &v)
 
void glVertex (const TooN::Vector< 3 > &v)
 
void glVertex (const TooN::Vector< 4 > &v)
 
void glTexCoord (const TooN::Vector< 2 > &v)
 
void glTexCoord (const TooN::Vector< 3 > &v)
 
void glTexCoord (const TooN::Vector< 4 > &v)
 
void glRect (const TooN::Vector< 2 > &p, const TooN::Vector< 2 > &q)
 
void glRasterPos (const TooN::Vector< 2 > &v)
 
void glRasterPos (const TooN::Vector< 3 > &v)
 
void glRasterPos (const TooN::Vector< 4 > &v)
 
void glNormal (const TooN::Vector< 3 > &n)
 
void glTranslate (const ImageRef &v)
 
template<int N>
void glTranslate (const TooN::Vector< N > &v)
 
template<>
void glTranslate (const TooN::Vector< 2 > &v)
 
template<>
void glTranslate (const TooN::Vector< 1 > &v)
 
template<int N, class P , class A >
void glMultMatrix (const TooN::Matrix< N, N, P, A > &m)
 
template<class P , class A >
void glMultMatrix (const TooN::Matrix< 3, 3, P, A > &m)
 
template<class P , class A >
void glMultMatrix (const TooN::Matrix< 2, 2, P, A > &m)
 
template<typename P >
void glMultMatrix (const TooN::SO3< P > &so3)
 
template<typename P >
void glMultMatrix (const TooN::SE3< P > &se3)
 
template<typename P >
void glMultMatrix (const TooN::SO2< P > &so2)
 
template<typename P >
void glMultMatrix (const TooN::SE2< P > &se2)
 
void glOrtho (const CVD::ImageRef &size, const double nearPlane=-1.0, const double farPlane=1.0)
 
void glOrtho (const TooN::Vector< 6 > &param)
 
template<typename P , typename A >
void glFrustum (const TooN::Vector< 4, P, A > &params, double width, double height, double nearPlane=0.1, double farPlane=100)
 
template<class CAMERA >
void glFrustum (const CAMERA &camera, double width, double height, double nearPlane=0.1, double farPlane=100)
 
void glFrustum (const TooN::Vector< 6 > &param)
 
void glColor (const TooN::Vector< 3 > &v)
 
void glColor (const TooN::Vector< 4 > &v)
 
void glClearColor (const TooN::Vector< 4 > &v)
 
void glClearColor (const TooN::Vector< 3 > &v)
 
void glColor (const TooN::Vector<-1 > &v)
 
template<class P1 , class P2 >
void glLine (const P1 &x1, const P2 &x2)
 
template<class C >
void glVertex (const C &list)
 
void glColor (const CVD::Rgb< byte > &c)
 
void glColor (const CVD::Rgb< float > &c)
 
void glColor3 (const CVD::Rgb8 &c)
 
void glColor4 (const CVD::Rgb8 &c)
 
void glColor (const CVD::Rgba< unsigned char > &c)
 
void glColor (const CVD::Rgba< float > &c)
 
template<class C >
void glDrawPixels (const SubImage< C > &i)
 
template<class C >
void glReadPixels (BasicImage< C > &i, ImageRef origin=ImageRef(0, 0))
 
template<class C >
Image< C > glReadPixels (ImageRef size, ImageRef origin=ImageRef(0, 0))
 
template<class C >
void glTexSubImage2D (const SubImage< C > &i, GLint xoffset=0, GLint yoffset=0, GLenum target=GL_TEXTURE_2D, GLint level=0)
 
template<class C >
void glTexImage2D (const SubImage< C > &i, GLint border=0, GLenum target=GL_TEXTURE_2D, GLint level=0)
 
void glPrintErrors (void)
 
void glSetFont (const std::string &fontname)
 
const std::string & glGetFont ()
 returns the name of the currently active font More...
 
std::pair< double, double > glDrawText (const std::string &text, enum TEXT_STYLE style=NICE, double spacing=1.5, double kerning=0.1)
 
std::pair< double, double > glGetExtends (const std::string &text, double spacing=1.5, double kerning=0.1)
 returns the size of the bounding box of a text to be rendered, similar to glDrawText but without any visual output More...
 
template<class C >
ImageCreationIterator< C > CreateImagesBegin (const C &from_me)
 
template<class C >
ImageCreationIterator< C > CreateImagesEnd (const C &, int i)
 
template<class C >
ImageCreationIterator< C > CreateImagesEnd (int i)
 
ImageRef operator* (const int scale, const ImageRef &ref)
 
template<class Score , class ReturnType , class Collector , class Test >
void nonmax_suppression_t (const vector< ImageRef > &corners, const vector< Score > &scores, vector< ReturnType > &nonmax_corners)
 
void nonmax_suppression_strict (const vector< ImageRef > &corners, const vector< int > &scores, vector< ImageRef > &nonmax_corners)
 
void nonmax_suppression (const vector< ImageRef > &corners, const vector< int > &scores, vector< ImageRef > &nonmax_corners)
 
void nonmax_suppression_with_scores (const vector< ImageRef > &corners, const vector< int > &scores, vector< pair< ImageRef, int > > &nonmax_corners)
 
void nonmax_suppression_strict (const std::vector< ImageRef > &corners, const std::vector< int > &scores, std::vector< ImageRef > &nmax_corners)
 
void nonmax_suppression (const std::vector< ImageRef > &corners, const std::vector< int > &scores, std::vector< ImageRef > &nmax_corners)
 
void nonmax_suppression_with_scores (const std::vector< ImageRef > &corners, const std::vector< int > &socres, std::vector< std::pair< ImageRef, int > > &max_corners)
 
void fast_corner_detect_plain_9 (const SubImage< byte > &i, std::vector< ImageRef > &corners, int b)
 
void fast_corner_detect_plain_10 (const SubImage< byte > &i, std::vector< ImageRef > &corners, int b)
 
template<class T , class S >
Rgb< T > operator+ (const Rgb< T > &a, const Rgb< S > &b)
 
template<class T , class S >
Rgb< T > & operator+= (Rgb< T > &a, const Rgb< S > &b)
 
template<class T , class S >
Rgb< T > operator- (const Rgb< T > &a, const Rgb< S > &b)
 
template<class T , class S >
Rgb< T > & operator-= (Rgb< T > &a, const Rgb< S > &b)
 
template<class T , class S >
Rgb< T > operator* (const Rgb< T > &a, const S &b)
 
template<class T , class S >
Rgb< T > operator* (const S &b, const Rgb< T > &a)
 
template<class T , class S >
Rgb< T > & operator*= (Rgb< T > &a, const S &b)
 
template<class T , class S >
Rgb< T > operator/ (const Rgb< T > &a, const S &b)
 
template<class T , class S >
Rgb< T > operator/ (const S &b, const Rgb< T > &a)
 
template<class T , class S >
Rgb< T > & operator/= (Rgb< T > &a, const S &b)
 
template<class T , class S >
Rgba< T > operator+ (const Rgba< T > &a, const Rgba< S > &b)
 
template<class T , class S >
Rgba< T > & operator+= (Rgba< T > &a, const Rgba< S > &b)
 
template<class T , class S >
Rgba< T > operator- (const Rgba< T > &a, const Rgba< S > &b)
 
template<class T , class S >
Rgba< T > & operator-= (Rgba< T > &a, const Rgba< S > &b)
 
template<class T , class S >
Rgba< T > operator* (const Rgba< T > &a, const S &b)
 
template<class T , class S >
Rgba< T > operator* (const S &b, const Rgba< T > &a)
 
template<class T , class S >
Rgba< T > & operator*= (Rgba< T > &a, const S &b)
 
template<class T , class S >
Rgba< T > operator/ (const Rgba< T > &a, const S &b)
 
template<class T , class S >
Rgba< T > operator/ (const S &b, const Rgba< T > &a)
 
template<class T , class S >
Rgba< T > & operator/= (Rgba< T > &a, const S &b)
 
template<class T , class S >
La< T > operator+ (const La< T > &a, const La< S > &b)
 
template<class T , class S >
La< T > & operator+= (La< T > &a, const La< S > &b)
 
template<class T , class S >
La< T > operator- (const La< T > &a, const La< S > &b)
 
template<class T , class S >
La< T > & operator-= (La< T > &a, const La< S > &b)
 
template<class T , class S >
La< T > operator* (const La< T > &a, const S &b)
 
template<class T , class S >
La< T > operator* (const S &b, const La< T > &a)
 
template<class T , class S >
La< T > & operator*= (La< T > &a, const S &b)
 
template<class T , class S >
La< T > operator/ (const La< T > &a, const S &b)
 
template<class T , class S >
La< T > operator/ (const S &b, const La< T > &a)
 
template<class T , class S >
La< T > & operator/= (La< T > &a, const S &b)
 
template<class S , class T >
void copy (const BasicImage< S > &in, BasicImage< T > &out, ImageRef size=ImageRef(-1,-1), ImageRef begin=ImageRef(), ImageRef dst=ImageRef())
 
template<class T >
void zeroPixel (T &pixel)
 
template<class T >
void zeroPixels (T *pixels, int count)
 
template<class T >
void zeroBorders (BasicImage< T > &I)
 Set the one-pixel border (top, bottom, sides) of an image to zero values. More...
 
template<class T >
void fillBorders (SubImage< T > &im, const T pix, int w=1)
 
template<class A , class B >
void differences (const A *a, const A *b, B *diff, size_t count)
 
template<class A , class B , class C >
void add_multiple_of_sum (const A *a, const A *b, const C &c, B *out, size_t count)
 
template<class A , class B , class C >
void assign_multiple (const A *a, const B &c, C *out, size_t count)
 
template<class T >
double inner_product (const T *a, const T *b, size_t count)
 
template<class T1 , class T2 >
void square (const T1 *in, T2 *out, size_t count)
 
template<class T1 , class T2 >
void subtract_square (const T1 *in, T2 *out, size_t count)
 
template<class T >
double sum_squared_differences (const T *a, const T *b, size_t count)
 
template<int bytes>
bool is_aligned (const void *ptr)
 Check if the pointer is aligned to the specified byte granularity. More...
 
template<>
bool is_aligned< 8 > (const void *ptr)
 
template<>
bool is_aligned< 16 > (const void *ptr)
 
template<int A, class T >
size_t steps_to_align (const T *ptr)
 Compute the number of pointer increments necessary to yield alignment of A bytes. More...
 
void differences (const byte *a, const byte *b, short *diff, unsigned int size)
 
void differences (const short *a, const short *b, short *diff, unsigned int size)
 
void differences (const float *a, const float *b, float *diff, size_t size)
 
void add_multiple_of_sum (const float *a, const float *b, const float &c, float *out, size_t count)
 
void assign_multiple (const float *a, const float &c, float *out, size_t count)
 
double inner_product (const float *a, const float *b, size_t count)
 
double sum_squared_differences (const float *a, const float *b, size_t count)
 
void square (const float *in, float *out, size_t count)
 
void subtract_square (const float *in, float *out, size_t count)
 
void differences (const int32_t *a, const int32_t *b, int32_t *diff, size_t size)
 
void differences (const double *a, const double *b, double *diff, size_t size)
 
void add_multiple_of_sum (const double *a, const double *b, const double &c, double *out, size_t count)
 
void assign_multiple (const double *a, const double &c, double *out, size_t count)
 
double inner_product (const double *a, const double *b, size_t count)
 
double sum_squared_differences (const double *a, const double *b, size_t count)
 
long long sum_squared_differences (const byte *a, const byte *b, size_t count)
 
void differences (const int32_t *a, const int32_t *b, int32_t *diff, unsigned int size)
 
void differences (const double *a, const double *b, double *diff, unsigned int size)
 
void add_multiple_of_sum (const double *a, const double *b, const double &c, double *out, unsigned int count)
 
void assign_multiple (const double *a, const double &c, double *out, unsigned int count)
 
double inner_product (const double *a, const double *b, unsigned int count)
 
void differences (const float *a, const float *b, float *diff, unsigned int size)
 
void assign_multiple (const float *a, const float &c, float *out, unsigned int count)
 
double inner_product (const float *a, const float *b, unsigned int count)
 
TooN::Vector< 2 > vec (const ImageRef &ir)
 
ImageRef ir (const TooN::Vector< 2 > &v)
 
ImageRef ir_rounded (const TooN::Vector< 2 > &v)
 
template<class C >
void twoThirdsSample (const SubImage< C > &in, SubImage< C > &out)
 
void twoThirdsSample (const SubImage< byte > &in, SubImage< byte > &out)
 
template<class C >
Internal::ImagePromise< Internal::twoThirdsSampler< C > > twoThirdsSample (const SubImage< C > &c)
 
template<class T >
void halfSample (const BasicImage< T > &in, BasicImage< T > &out)
 
template<class T >
Image< T > halfSample (const BasicImage< T > &in)
 
template<class T >
Image< T > halfSample (Image< T > in, unsigned int octaves)
 
template<class T >
void threshold (BasicImage< T > &im, const T &minimum, const T &hi)
 
template<class T >
void stats (const BasicImage< T > &im, T &mean, T &stddev)
 
template<class S , class T >
void gradient (const BasicImage< S > &im, BasicImage< T > &out)
 
void gradient (const BasicImage< byte > &im, BasicImage< short[2]> &out)
 
template<class T , class S >
void sample (const BasicImage< S > &im, double x, double y, T &result)
 
template<class T , class S >
sample (const BasicImage< S > &im, double x, double y)
 
void sample (const BasicImage< float > &im, double x, double y, float &result)
 
template<class T , class S >
int transform (const BasicImage< S > &in, BasicImage< T > &out, const TooN::Matrix< 2 > &M, const TooN::Vector< 2 > &inOrig, const TooN::Vector< 2 > &outOrig, const T defaultValue=T())
 
template<class T >
void transform (const BasicImage< T > &in, BasicImage< T > &out, const TooN::Matrix< 3 > &Minv)
 
template<class T >
void flipVertical (Image< T > &in)
 flips an image vertically in place. More...
 
template<class T >
void flipHorizontal (Image< T > &in)
 flips an image horizontally in place. More...
 
template<class T >
void median_filter_3x3 (const SubImage< T > &I, SubImage< T > out)
 
void median_filter_3x3 (const SubImage< byte > &I, SubImage< byte > out)
 

Variables

cvd_timer timer
 
const ImageRef fast_pixel_ring [16]
 

Typedef Documentation

typedef unsigned char CVD::byte

An 8-bit datatype

Definition at line 28 of file byte.h.

Function Documentation

template<class T >
T CVD::abs ( t)
inline

Local templated version of abs. Returns the absolute value of a variable.

Parameters
tThe input parameter

Definition at line 30 of file abs.h.

unsigned char CVD::abs ( unsigned char  b)
inline

Fast instantiation for unsigned datatype which avoids a comparison

Parameters
bThe input parameter

Definition at line 34 of file abs.h.

unsigned short CVD::abs ( unsigned short  u)
inline

Fast instantiation for unsigned datatype which avoids a comparison

Parameters
uThe input parameter

Definition at line 38 of file abs.h.

unsigned int CVD::abs ( unsigned int  u)
inline

Fast instantiation for unsigned datatype which avoids a comparison

Parameters
uThe input parameter

Definition at line 42 of file abs.h.

unsigned long CVD::abs ( unsigned long  u)
inline

Fast instantiation for unsigned datatype which avoids a comparison

Parameters
uThe input parameter

Definition at line 46 of file abs.h.

void CVD::add_multiple_of_sum ( const double *  a,
const double *  b,
const double &  c,
double *  out,
unsigned int  count 
)

Definition at line 15 of file utility_double_int.cpp.

template<class A , class B , class C >
void CVD::add_multiple_of_sum ( const A *  a,
const A *  b,
const C &  c,
B *  out,
size_t  count 
)
inline

Compute pointwise (a_i + b_i) * c and add to out_i This is accelerated using SIMD for some platforms and data types (alignment is checked at runtime) Do not specify template parameters explicitly so that overloading can choose the right implementation

Definition at line 137 of file utility.h.

void CVD::add_multiple_of_sum ( const float *  a,
const float *  b,
const float &  c,
float *  out,
size_t  count 
)

Definition at line 10 of file utility_float.cpp.

void CVD::add_multiple_of_sum ( const double *  a,
const double *  b,
const double &  c,
double *  out,
size_t  count 
)
void CVD::assign_multiple ( const float *  a,
const float &  c,
float *  out,
unsigned int  count 
)

Definition at line 16 of file utility_float.cpp.

void CVD::assign_multiple ( const double *  a,
const double &  c,
double *  out,
unsigned int  count 
)

Definition at line 20 of file utility_double_int.cpp.

template<class A , class B , class C >
void CVD::assign_multiple ( const A *  a,
const B &  c,
C *  out,
size_t  count 
)
inline

Compute pointwise a_i * c and store in out_i This is accelerated using SIMD for some platforms and data types (alignment is checked at runtime) Do not specify template parameters explicitly so that overloading can choose the right implementation

Definition at line 146 of file utility.h.

void CVD::assign_multiple ( const float *  a,
const float &  c,
float *  out,
size_t  count 
)
void CVD::assign_multiple ( const double *  a,
const double &  c,
double *  out,
size_t  count 
)
void CVD::build_van_vliet_b ( const double  d[],
double  b[] 
)

Definition at line 163 of file convolution.cpp.

template<class T , class S >
void CVD::cast_copy ( const T *  from,
S *  to,
int  count 
)
inline

Definition at line 363 of file convolution.h.

template<class T >
T CVD::clamp01 ( x)
inline

Definition at line 208 of file convolution.cpp.

void CVD::compute_fast_score_old ( const BasicImage< byte > &  im,
const vector< ImageRef > &  corners,
int  barrier,
vector< int > &  scores 
)

Definition at line 69 of file fast_corner.cpp.

void CVD::compute_scaling_jacobian ( const double  d[],
double  J[] 
)

Definition at line 104 of file convolution.cpp.

void CVD::compute_triggs_M ( const double  b[],
double  M[][3] 
)

Definition at line 178 of file convolution.cpp.

void CVD::compute_van_vliet_b ( double  sigma,
double  b[] 
)

Definition at line 171 of file convolution.cpp.

void CVD::compute_van_vliet_scaled_d ( double  sigma,
double  d[] 
)

Definition at line 125 of file convolution.cpp.

double CVD::compute_van_vliet_variance ( const double  d[])

Definition at line 72 of file convolution.cpp.

double CVD::compute_van_vliet_variance ( const double  d[],
double  J[3] 
)

Definition at line 86 of file convolution.cpp.

template<class T , class O , class K >
void CVD::convolve_gaussian_3 ( const BasicImage< T > &  I,
BasicImage< O > &  out,
k1,
k2 
)

Definition at line 527 of file convolution.h.

template<class T >
void CVD::convolveGaussian ( BasicImage< T > &  I,
double  sigma,
double  sigmas = 3.0 
)
inline

Definition at line 415 of file convolution.h.

template<class T >
void CVD::convolveGaussian ( const BasicImage< T > &  I,
BasicImage< T > &  out,
double  sigma,
double  sigmas = 3.0 
)

Definition at line 420 of file convolution.h.

void CVD::convolveGaussian ( const BasicImage< float > &  I,
BasicImage< float > &  out,
double  sigma,
double  sigmas = 3.0 
)

Definition at line 8 of file convolve_gaussian.cpp.

void CVD::convolveGaussian5_1 ( Image< byte > &  I)

Definition at line 43 of file convolution.cpp.

template<class T >
void CVD::convolveGaussian5_1 ( BasicImage< T > &  I)

Definition at line 86 of file convolution.h.

void CVD::convolveGaussian_fir ( const BasicImage< float > &  I,
BasicImage< float > &  out,
double  sigma,
double  sigmas = 3.0 
)

Definition at line 19 of file convolve_gaussian.cpp.

template<class T , class S >
const T* CVD::convolveMiddle ( const T *  input,
const S &  factor,
const S *  kernel,
int  ksize,
int  n,
T *  output 
)
inline

Definition at line 395 of file convolution.h.

template<class T , class K >
void CVD::convolveSeparableSymmetric ( Image< T > &  I,
const std::vector< K > &  kernel,
divisor 
)

Definition at line 302 of file convolution.h.

template<class T , int A, int B, int C>
void CVD::convolveSymmetric ( Image< T > &  I)

Definition at line 209 of file convolution.h.

template<class T , int A, int B, int C, int D>
void CVD::convolveSymmetric ( Image< T > &  I)

Definition at line 251 of file convolution.h.

template<class T >
void CVD::convolveWithBox ( const BasicImage< T > &  I,
BasicImage< T > &  J,
ImageRef  hwin 
)

convolves an image with a box of given size.

Parameters
Iinput image, modified in place
hwinwindow size, this is half of the box size

Definition at line 150 of file convolution.h.

template<class T >
void CVD::convolveWithBox ( const BasicImage< T > &  I,
BasicImage< T > &  J,
int  hwin 
)
inline

Definition at line 195 of file convolution.h.

template<class T >
void CVD::convolveWithBox ( BasicImage< T > &  I,
int  hwin 
)
inline

Definition at line 200 of file convolution.h.

template<class T >
void CVD::convolveWithBox ( BasicImage< T > &  I,
ImageRef  hwin 
)
inline

Definition at line 204 of file convolution.h.

template<class S , class T >
void CVD::copy ( const BasicImage< S > &  in,
BasicImage< T > &  out,
ImageRef  size = ImageRef(-1,-1),
ImageRef  begin = ImageRef(),
ImageRef  dst = ImageRef() 
)

Generic image copy function for copying sub rectangles of images into other images. This performs pixel type conversion if the input and output images are different pixel types.

Parameters
ininput image to copy from
outoutput image to copy into
sizesize of the area to copy. By default this is the entirty of the input image
beginupper left corner of the area to copy, by default the upper left corner of the input image
dstupper left corner of the destination in the output image, by default the upper left corner of the output image
Exceptions
ImageRefNotInImageif either begin is not in the input image or dst not in the output image

Definition at line 26 of file utility.h.

template<class C >
ImageCreationIterator<C> CVD::CreateImagesBegin ( const C &  from_me)
inline

Shortcut function for creating an iterator from a bit of data..

Parameters
from_meData to construct from

Definition at line 580 of file image.h.

template<class C >
ImageCreationIterator<C> CVD::CreateImagesEnd ( const C &  ,
int  i 
)
inline

Shortcut to create an end iterator. The first parameter is used to get the type correct.

Parameters
iNumber of copies to make

Definition at line 587 of file image.h.

template<class C >
ImageCreationIterator<C> CVD::CreateImagesEnd ( int  i)
inline

Shortcut to create an end iterator.

Parameters
iNumber of copies to make

Definition at line 594 of file image.h.

void CVD::differences ( const int32_t *  a,
const int32_t *  b,
int32_t *  diff,
unsigned int  size 
)

Definition at line 5 of file utility_double_int.cpp.

void CVD::differences ( const float *  a,
const float *  b,
float *  diff,
unsigned int  size 
)

Definition at line 5 of file utility_float.cpp.

void CVD::differences ( const double *  a,
const double *  b,
double *  diff,
unsigned int  size 
)

Definition at line 10 of file utility_double_int.cpp.

template<class A , class B >
void CVD::differences ( const A *  a,
const A *  b,
B *  diff,
size_t  count 
)
inline

Compute pointwise differences (a_i - b_i) and store in diff_i This is accelerated using SIMD for some platforms and data types (alignment is checked at runtime) Do not specify template parameters explicitly so that overloading can choose the right implementation

Definition at line 128 of file utility.h.

void CVD::differences ( const byte a,
const byte b,
short *  diff,
unsigned int  size 
)

Definition at line 5 of file utility_byte_differences.cpp.

void CVD::differences ( const short *  a,
const short *  b,
short *  diff,
unsigned int  size 
)

Definition at line 9 of file utility_byte_differences.cpp.

void CVD::differences ( const float *  a,
const float *  b,
float *  diff,
size_t  size 
)
void CVD::differences ( const int32_t *  a,
const int32_t *  b,
int32_t *  diff,
size_t  size 
)
void CVD::differences ( const double *  a,
const double *  b,
double *  diff,
size_t  size 
)
void CVD::fast_corner_detect_10 ( const BasicImage< byte > &  im,
std::vector< ImageRef > &  corners,
int  barrier 
)

Perform tree based 10 point FAST feature detection If you use this, please cite the paper given in fast_corner_detect

Parameters
imThe input image
cornersThe resulting container of corner locations
barrierCorner detection threshold

Definition at line 6 of file slower_corner_10.cpp.

void CVD::fast_corner_detect_9 ( const BasicImage< byte > &  im,
std::vector< ImageRef > &  corners,
int  barrier 
)

Perform tree based 9 point FAST feature detection as described in: Machine Learning for High Speed Corner Detection, E. Rosten and T. Drummond. Results show that this is both the fastest and the best of the detectors. If you use this in published work, please cite:

@inproceedings{rosten2006machine,
    title       =    "Machine Learning for High Speed Corner Detection",
    author      =    "Edward Rosten and Tom Drummond",
    year        =    "2006",     
    month       =    "May",     
    booktitle   =    "9th European Conference on Computer Vision",
}
    @param im       The input image
    @param corners  The resulting container of corner locations
    @param barrier  Corner detection threshold

Definition at line 6 of file slower_corner_9.cpp.

void CVD::fast_corner_detect_9_nonmax ( const BasicImage< byte > &  im,
std::vector< ImageRef > &  max_corners,
int  barrier 
)

Perform FAST-9 corner detection (see fast_corner_detect_9), with nonmaximal suppression (see fast_corner_score_9 and nonmax_suppression)

Parameters
imThe input image
cornersThe resulting container of locally maximal corner locations
barrierCorner detection threshold

Definition at line 11 of file fast_corner_9_nonmax.cpp.

void CVD::fast_corner_detect_plain_10 ( const SubImage< byte > &  i,
std::vector< ImageRef > &  corners,
int  b 
)
void CVD::fast_corner_detect_plain_10 ( const SubImage< byte > &  i,
vector< ImageRef > &  corners,
int  b 
)

Definition at line 10 of file fast_10_detect.cpp.

void CVD::fast_corner_detect_plain_9 ( const SubImage< byte > &  i,
std::vector< ImageRef > &  corners,
int  b 
)
void CVD::fast_corner_detect_plain_9 ( const SubImage< byte > &  i,
vector< ImageRef > &  corners,
int  b 
)

Definition at line 11 of file fast_9_detect.cpp.

int CVD::fast_corner_score_10 ( const byte cache_0,
const int  offset[],
int  b 
)
inline

Definition at line 25 of file fast_10_score.cpp.

void CVD::fast_corner_score_10 ( const SubImage< byte > &  i,
const std::vector< ImageRef > &  corners,
int  b,
std::vector< int > &  scores 
)

Compute the 10 point score (as the maximum threshold at which the point will still be detected) for a std::vector of features.

Parameters
imThe input image
cornersThe resulting container of corner locations
barrierInitial corner detection threshold. Using the same threshold as for corner detection will produce the quickest results, but any lower value (e.g. 0) will produce correct results.
void CVD::fast_corner_score_10 ( const SubImage< byte > &  i,
const vector< ImageRef > &  corners,
int  b,
vector< int > &  scores 
)

Definition at line 3154 of file fast_10_score.cpp.

int CVD::fast_corner_score_9 ( const byte cache_0,
const int  offset[],
int  b 
)
inline

Definition at line 25 of file fast_9_score.cpp.

void CVD::fast_corner_score_9 ( const SubImage< byte > &  i,
const std::vector< ImageRef > &  corners,
int  b,
std::vector< int > &  scores 
)

Compute the 9 point score (as the maximum threshold at which the point will still be detected) for a std::vector of features.

Parameters
imThe input image
cornersThe resulting container of corner locations
barrierInitial corner detection threshold. Using the same threshold as for corner detection will produce the quickest results, but any lower value (e.g. 0) will produce correct results.
void CVD::fast_corner_score_9 ( const SubImage< byte > &  i,
const vector< ImageRef > &  corners,
int  b,
vector< int > &  scores 
)

Definition at line 4656 of file fast_9_score.cpp.

void CVD::fast_nonmax ( const BasicImage< byte > &  im,
const std::vector< ImageRef > &  corners,
int  barrier,
std::vector< ImageRef > &  max_corners 
)

Perform non-maximal suppression on a set of FAST features. This cleans up areas where there are multiple adjacent features, using a computed score function to leave only the 'best' features. This function is typically called immediately after a call to fast_corner_detect() (or one of its variants). This uses the scoring function given in the paper given in fast_corner_detect_9:

Parameters
imThe image used to generate the FAST features
cornersThe FAST features previously detected (e.g. by calling fast_corner_detect())
barrierThe barrier used to calculate the score, which should be the same as that passed to fast_corner_detect()
max_cornersVector to be filled with the new list of locally maximal corners.
void CVD::fast_nonmax ( const BasicImage< byte > &  im,
const vector< ImageRef > &  corners,
int  barrier,
vector< ImageRef > &  max_corners 
)

Definition at line 83 of file fast_corner.cpp.

void CVD::fast_nonmax_with_scores ( const BasicImage< byte > &  im,
const std::vector< ImageRef > &  corners,
int  barrier,
std::vector< std::pair< ImageRef, int > > &  max_corners 
)

Perform non-maximal suppression on a set of FAST features, also returning the score for each remaining corner. This function cleans up areas where there are multiple adjacent features, using a computed score function to leave only the 'best' features. This function is typically called immediately after a call to fast_corner_detect() (or one of its variants).

Parameters
imThe image used to generate the FAST features
cornersThe FAST features previously detected (e.g. by calling fast_corner_detect())
barrierThe barrier used to calculate the score, which should be the same as that passed to fast_corner_detect()
max_cornersVector to be filled with the new list of locally maximal corners, and their scores. non_maxcorners[i].first gives the location and non_maxcorners[i].second gives the score (higher is better).
void CVD::fast_nonmax_with_scores ( const BasicImage< byte > &  im,
const vector< ImageRef > &  corners,
int  barrier,
vector< pair< ImageRef, int > > &  max_corners 
)

Definition at line 90 of file fast_corner.cpp.

template<class T >
void CVD::fillBorders ( SubImage< T > &  im,
const T  pix,
int  w = 1 
)

Fill image borders

Parameters
imImage fo fill borders in
pixFill value
wborder width

Definition at line 103 of file utility.h.

template<class T >
void CVD::flipHorizontal ( Image< T > &  in)

flips an image horizontally in place.

Definition at line 420 of file vision.h.

template<class T >
void CVD::flipVertical ( Image< T > &  in)

flips an image vertically in place.

Definition at line 402 of file vision.h.

void CVD::forward_to_backward ( const double  M[][3],
const double  i_plus,
const double  inv_alpha,
double &  y1,
double &  y2,
double &  y3 
)
inline

Definition at line 198 of file convolution.cpp.

template<class T >
T CVD::gaussianKernel ( std::vector< T > &  k,
maxval,
double  stddev 
)

creates a Gaussian kernel with given maximum value and standard deviation. All elements of the passed vector are filled up, therefore the vector defines the size of the computed kernel. The normalizing value is returned.

Parameters
kvector of T's holds the kernel values
maxvalthe maximum value to be used
stddevstandard deviation of the kernel
Returns
the sum of the kernel elements for normalization

Definition at line 47 of file convolution.h.

double CVD::get_time_of_day ( )

Same as the system call gettimeofday, but returns time since the epoch as a double.

Definition at line 76 of file cvd_timer.cpp.

unsigned long long CVD::get_time_of_day_us ( )

Definition at line 34 of file cvd_timer.cpp.

template<class A , class B >
const B* CVD::getPixelRowTyped ( const A *  row,
int  n,
B *  rowbuf 
)

Definition at line 346 of file convolution.h.

void CVD::glClearColor ( const TooN::Vector< 4 > &  v)
inline

Set the new clear colour to the red, green, blue and alpha components given in the Vector (where 0.0 represents zero intensity and 1.0 full intensity)

Parameters
vThe new colour

Definition at line 405 of file gl_helpers.h.

void CVD::glClearColor ( const TooN::Vector< 3 > &  v)
inline

Set the new clear colour to the red, green, blue components given in the Vector alpha is set to 0

Parameters
vThe new colour

Definition at line 414 of file gl_helpers.h.

void CVD::glColor ( const TooN::Vector< 3 > &  v)
inline

Set the new colour to the red, green and blue components given in the Vector (where 0.0 represents zero intensity and 1.0 full intensity)

Parameters
vThe new colour

Definition at line 387 of file gl_helpers.h.

void CVD::glColor ( const TooN::Vector< 4 > &  v)
inline

Set the new colour to the red, green, blue and alpha components given in the Vector (where 0.0 represents zero intensity and 1.0 full intensity)

Parameters
vThe new colour

Definition at line 396 of file gl_helpers.h.

void CVD::glColor ( const TooN::Vector<-1 > &  v)
inline

glColor version for dynamic TooN::Vector, will test for 3 or 4 components

Parameters
vThe new colour

Definition at line 424 of file gl_helpers.h.

void CVD::glColor ( const CVD::Rgb< byte > &  c)
inline

Set the new colour to the red, green, blue components given (where 0 represents zero intensity and 255 full intensity)

Parameters
cThe new colour

Definition at line 459 of file gl_helpers.h.

void CVD::glColor ( const CVD::Rgb< float > &  c)
inline

Set the new colour to the red, green and blue components given (where 0.0 represents zero intensity and 1.0 full intensity)

Parameters
cThe new colour

Definition at line 468 of file gl_helpers.h.

void CVD::glColor ( const CVD::Rgba< unsigned char > &  c)
inline

Set the new colour to the red, green, blue and alpha components given (where 0 represents zero intensity and 255 full intensity)

Parameters
cThe new colour

Definition at line 495 of file gl_helpers.h.

void CVD::glColor ( const CVD::Rgba< float > &  c)
inline

Set the new colour to the red, green, blue and alpha components given (where 0.0 represents zero intensity and 1.0 full intensity)

Parameters
cThe new colour

Definition at line 504 of file gl_helpers.h.

void CVD::glColor3 ( const CVD::Rgb8 c)
inline

Set the new colour to the red, green and blue components given (where 0.0 represents zero intensity and 1.0 full intensity). The Rgb8::dummy member is ignored

Parameters
cThe new colour

Definition at line 477 of file gl_helpers.h.

void CVD::glColor4 ( const CVD::Rgb8 c)
inline

Set the new colour to the red, green, blue and alpha components given (where 0.0 represents zero intensity and 1.0 full intensity)

Parameters
cThe new colour

Definition at line 486 of file gl_helpers.h.

template<class C >
void CVD::glDrawPixels ( const SubImage< C > &  i)
inline

Draw an image to the frame buffer at the current raster position. Use glRasterPos to set the current raster position

Parameters
iThe image to draw

Definition at line 513 of file gl_helpers.h.

template<typename P , typename A >
void CVD::glFrustum ( const TooN::Vector< 4, P, A > &  params,
double  width,
double  height,
double  nearPlane = 0.1,
double  farPlane = 100 
)
inline

sets a gl frustum from the linear camera parameters, image size and near and far plane. The camera will be in OpenGL style with camera center in the origin and the viewing direction down the negative z axis, with y pointing upwards and x pointing to the left and the image plane at z=-1. Images coordinates need to be rotated around the x axis to make sense here, because typically the camera is described as y going down (pixel lines) and image plane at z=1.

Parameters
paramsvector containing fu, fv, pu, pv as in the linear part of camera parameters
widthwidth of the image plane in pixels, here the viewport for example
heightheight of the image plane in pixels, here the viewport for example
nearnear clipping plane
farfar clipping plane

Definition at line 351 of file gl_helpers.h.

template<class CAMERA >
void CVD::glFrustum ( const CAMERA &  camera,
double  width,
double  height,
double  nearPlane = 0.1,
double  farPlane = 100 
)
inline

sets a gl frustum taking the first 4 parameters from the camera model. see

See also
glFrustum for details on the created frustum.
Parameters
cameracamera supplying the parameters for the frustum
widthwidth of the image plane in pixels, here the viewport for example
heightheight of the image plane in pixels, here the viewport for example
nearnear clipping plane
farfar clipping plane

Definition at line 369 of file gl_helpers.h.

void CVD::glFrustum ( const TooN::Vector< 6 > &  param)
inline

Sets up an ortho projection from a simple Vector<6> n.b. You first need to set up the matrix environment yourself, e.g. glMatrixMode(GL_PROJECTION); glLoadIdentity();

Parameters
param6-vector containing the parameters of the projection

Definition at line 378 of file gl_helpers.h.

template<class P1 , class P2 >
void CVD::glLine ( const P1 &  x1,
const P2 &  x2 
)
inline

draws a line from x1 to x2 any type that is accepted by glVertex is possible

Definition at line 438 of file gl_helpers.h.

template<int N, class P , class A >
void CVD::glMultMatrix ( const TooN::Matrix< N, N, P, A > &  m)
inline

multiply a TooN matrix onto the current matrix stack. Works for matrizes of size n >= 4 and uses the upper left 4x4 submatrix. The matrix is also transposed to account for GL's column major format.

Parameters
mthe transformation matrix

Definition at line 237 of file gl_helpers.h.

template<class P , class A >
void CVD::glMultMatrix ( const TooN::Matrix< 3, 3, P, A > &  m)
inline

multiply a TooN 3x3 matrix onto the current matrix stack. The GL matrix last column and row are set to 0 with the lower right element to 1. The matrix is also transposed to account for GL's column major format.

Parameters
mthe transformation matrix

Definition at line 252 of file gl_helpers.h.

template<class P , class A >
void CVD::glMultMatrix ( const TooN::Matrix< 2, 2, P, A > &  m)
inline

multiply a TooN 2x2 matrix onto the current matrix stack. The TooN matrix will only occupy the upper left hand block, the remainder will be from the identity matrix. The matrix is also transposed to account for GL's column major format.

Parameters
mthe transformation matrix

Definition at line 267 of file gl_helpers.h.

template<typename P >
void CVD::glMultMatrix ( const TooN::SO3< P > &  so3)
inline

multiplies a SO3 onto the current matrix stack

Parameters
so3the SO3

Definition at line 281 of file gl_helpers.h.

template<typename P >
void CVD::glMultMatrix ( const TooN::SE3< P > &  se3)
inline

multiplies a SE3 onto the current matrix stack. This multiplies the SO3 and the translation in order.

Parameters
se3the SE3

Definition at line 291 of file gl_helpers.h.

template<typename P >
void CVD::glMultMatrix ( const TooN::SO2< P > &  so2)
inline

multiplies a SO2 onto the current matrix stack

Parameters
so2the SO2

Definition at line 301 of file gl_helpers.h.

template<typename P >
void CVD::glMultMatrix ( const TooN::SE2< P > &  se2)
inline

multiplies a SE2 onto the current matrix stack. This multiplies the SO2 and the translation in order.

Parameters
se3the SE2

Definition at line 311 of file gl_helpers.h.

void CVD::glNormal ( const TooN::Vector< 3 > &  n)
inline

Specify the current vertex normal

Parameters
nThe normal vector

Definition at line 193 of file gl_helpers.h.

void CVD::glOrtho ( const CVD::ImageRef size,
const double  nearPlane = -1.0,
const double  farPlane = 1.0 
)
inline

Sets up an ortho projection suitable for drawing onto individual pixels of a gl window (or video image.) glVertex2f(0.0,0.0) will be the top left pixel and glVertex2f(xsize-1.0, ysize-1.0) will be the bottom right pixel. Depth is set from -1 to 1. n.b. You first need to set up the matrix environment yourself, e.g. glMatrixMode(GL_PROJECTION); glLoadIdentity();

Parameters
sizeImageRef containing the size of the GL window.

Definition at line 324 of file gl_helpers.h.

void CVD::glOrtho ( const TooN::Vector< 6 > &  param)
inline

Sets up an ortho projection from a simple Vector<6> n.b. You first need to set up the matrix environment yourself, e.g. glMatrixMode(GL_PROJECTION); glLoadIdentity();

Parameters
param6-vector containing the parameters of the projection

Definition at line 333 of file gl_helpers.h.

void CVD::glPrintErrors ( void  )
inline

Prints the current errors on the gl error stack

Definition at line 567 of file gl_helpers.h.

void CVD::glRasterPos ( const ImageRef i)
inline

Specify the (x,y) co-ordinates of the current raster position

Parameters
iThe raster position

Definition at line 66 of file gl_helpers.h.

void CVD::glRasterPos ( const TooN::Vector< 2 > &  v)
inline

Specify the (x,y) co-ordinates of the current raster position

Parameters
vThe raster position

Definition at line 169 of file gl_helpers.h.

void CVD::glRasterPos ( const TooN::Vector< 3 > &  v)
inline

Specify the (x,y,z) co-ordinates of the current raster position

Parameters
vThe raster position

Definition at line 177 of file gl_helpers.h.

void CVD::glRasterPos ( const TooN::Vector< 4 > &  v)
inline

Specify the (x,y,z,w) co-ordinates of the current raster position

Parameters
vThe raster position

Definition at line 185 of file gl_helpers.h.

template<class C >
void CVD::glReadPixels ( BasicImage< C > &  i,
ImageRef  origin = ImageRef(0,0) 
)
inline

Read the current image from the colour buffer specified by glReadBuffer

Parameters
iThe image to write the image data into. This must already be initialised to be an BasicImage (or Image) of the right size.
originThe window co-ordinate of the first pixel to be read from the frame buffer

Definition at line 525 of file gl_helpers.h.

template<class C >
Image<C> CVD::glReadPixels ( ImageRef  size,
ImageRef  origin = ImageRef(0,0) 
)
inline

Read the current image from the colour buffer specified by glReadBuffer

Parameters
sizeThe size of the area to read.
originThe window co-ordinate of the first pixel to be read from the frame buffer

Definition at line 534 of file gl_helpers.h.

void CVD::glRect ( const ImageRef p,
const ImageRef q 
)
inline

Draws a rectangle by specifing two opposing vertices

Parameters
pthe first vertex
qthe second vertex

Definition at line 75 of file gl_helpers.h.

void CVD::glRect ( const TooN::Vector< 2 > &  p,
const TooN::Vector< 2 > &  q 
)
inline

Draws a rectangle by specifing two opposing vertices

Parameters
pthe first vertex
qthe second vertex

Definition at line 132 of file gl_helpers.h.

void CVD::glTexCoord ( const ImageRef i)
inline

Specify the (s,t) texture co-ordinates

Parameters
iThe texture coordinates

Definition at line 58 of file gl_helpers.h.

void CVD::glTexCoord ( const TooN::Vector< 2 > &  v)
inline

Specify the (s,t) texture coordinates

Parameters
vThe texture coordinates

Definition at line 107 of file gl_helpers.h.

void CVD::glTexCoord ( const TooN::Vector< 3 > &  v)
inline

Specify the (s,t,r) texture coordinates

Parameters
vThe texture coordinates

Definition at line 115 of file gl_helpers.h.

void CVD::glTexCoord ( const TooN::Vector< 4 > &  v)
inline

Specify the (s,t,r,q) texture coordinates

Parameters
vThe texture coordinates

Definition at line 123 of file gl_helpers.h.

template<class C >
void CVD::glTexImage2D ( const SubImage< C > &  i,
GLint  border = 0,
GLenum  target = GL_TEXTURE_2D,
GLint  level = 0 
)
inline

Sets an image as a texture. note the reordering of the various parameters to make better use of default parameters

Parameters
ithe image to set as texture

Definition at line 557 of file gl_helpers.h.

template<class C >
void CVD::glTexSubImage2D ( const SubImage< C > &  i,
GLint  xoffset = 0,
GLint  yoffset = 0,
GLenum  target = GL_TEXTURE_2D,
GLint  level = 0 
)
inline

Sets an image as a texture sub region. note the reordering of the various parameters to make better use of default parameters

Parameters
ithe image to set as texture

Definition at line 545 of file gl_helpers.h.

void CVD::glTranslate ( const ImageRef v)
inline

add a translation specified by an ImageRef

Parameters
vthe translation ImageRef

Definition at line 201 of file gl_helpers.h.

template<int N>
void CVD::glTranslate ( const TooN::Vector< N > &  v)
inline

add a translation specified from the first three coordinates of a vector

Parameters
vthe translation vector

Definition at line 209 of file gl_helpers.h.

template<>
void CVD::glTranslate ( const TooN::Vector< 2 > &  v)
inline

add a translation specified from the first two coordinates of a 2-vector z is set to zero here

Parameters
vthe translation vector

Definition at line 218 of file gl_helpers.h.

template<>
void CVD::glTranslate ( const TooN::Vector< 1 > &  v)
inline

add a translation specified from the first coordinate of a 1-vector Y and Z are zero here

Parameters
vthe translation vector

Definition at line 227 of file gl_helpers.h.

void CVD::glVertex ( const ImageRef i)
inline

Specify the (x,y) co-ordinates of a vertex

Parameters
iThe vertex location

Definition at line 50 of file gl_helpers.h.

void CVD::glVertex ( const TooN::Vector< 2 > &  v)
inline

Specify the (x,y) co-ordinates of a vertex

Parameters
vThe vertex location

Definition at line 83 of file gl_helpers.h.

void CVD::glVertex ( const TooN::Vector< 3 > &  v)
inline

Specify the (x,y,z) co-ordinates of a vertex

Parameters
vThe vertex location

Definition at line 91 of file gl_helpers.h.

void CVD::glVertex ( const TooN::Vector< 4 > &  v)
inline

Specify the (x,y,z,w) co-ordinates of a vertex

Parameters
vThe vertex location

Definition at line 99 of file gl_helpers.h.

template<class C >
void CVD::glVertex ( const C &  list)
inline

sets a whole list of vertices stored in a std::vector. It uses the various glVertex helpers defined in this header file.

Parameters
listthe list of vertices

Definition at line 449 of file gl_helpers.h.

template<class S , class T >
void CVD::gradient ( const BasicImage< S > &  im,
BasicImage< T > &  out 
)

computes the gradient image from an image. The gradient image contains two components per pixel holding the x and y components of the gradient.

Parameters
iminput image
outoutput image, must have the same dimensions as input image
Exceptions
IncompatibleImageSizesif out does not have same dimensions as im

Definition at line 245 of file vision.h.

void CVD::gradient ( const BasicImage< byte > &  im,
BasicImage< short[2]> &  out 
)
template<class T >
void CVD::halfSample ( const BasicImage< T > &  in,
BasicImage< T > &  out 
)

subsamples an image to half its size by averaging 2x2 pixel blocks

Parameters
ininput image
outoutput image, must have the right dimensions versus input image
Exceptions
IncompatibleImageSizesif out does not have half the dimensions of in

Definition at line 103 of file vision.h.

template<class T >
Image<T> CVD::halfSample ( const BasicImage< T > &  in)
inline

subsamples an image to half its size by averaging 2x2 pixel blocks

Parameters
ininput image
Returns
The output image
Exceptions
IncompatibleImageSizesif out does not have half the dimensions of in

Definition at line 134 of file vision.h.

template<class T >
Image<T> CVD::halfSample ( Image< T >  in,
unsigned int  octaves 
)
inline

subsamples an image repeatedly by half its size by averaging 2x2 pixel blocks. This version will not create a copy for 0 octaves because it receives already an Image and will reuse the data.

Parameters
ininput image
octavesnumber of halfsamplings
Returns
The output image
Exceptions
IncompatibleImageSizesif out does not have half the dimensions of in

Definition at line 150 of file vision.h.

double CVD::inner_product ( const float *  a,
const float *  b,
unsigned int  count 
)

Definition at line 21 of file utility_float.cpp.

double CVD::inner_product ( const double *  a,
const double *  b,
unsigned int  count 
)

Definition at line 25 of file utility_double_int.cpp.

template<class T >
double CVD::inner_product ( const T *  a,
const T *  b,
size_t  count 
)

Compute sum(a_i*b_i) This is accelerated using SIMD for some platforms and data types (alignment is checked at runtime) Do not specify template parameters explicitly so that overloading can choose the right implementation

Definition at line 155 of file utility.h.

double CVD::inner_product ( const float *  a,
const float *  b,
size_t  count 
)
double CVD::inner_product ( const double *  a,
const double *  b,
size_t  count 
)
ImageRef CVD::ir ( const TooN::Vector< 2 > &  v)
inline

Convert a Vector into an image co-ordinate. Numbers are truncated, not rounded

Parameters
vThe Vector to convert

Definition at line 43 of file vector_image_ref.h.

ImageRef CVD::ir_rounded ( const TooN::Vector< 2 > &  v)
inline

Convert a Vector into an image co-ordinate. Numbers are rounded

Parameters
vThe Vector to convert

Definition at line 51 of file vector_image_ref.h.

template<int bytes>
bool CVD::is_aligned ( const void *  ptr)

Check if the pointer is aligned to the specified byte granularity.

template<>
bool CVD::is_aligned< 16 > ( const void *  ptr)
inline

Definition at line 199 of file utility.h.

template<>
bool CVD::is_aligned< 8 > ( const void *  ptr)
inline

Definition at line 198 of file utility.h.

template<class T >
void CVD::median_filter_3x3 ( const SubImage< T > &  I,
SubImage< T >  out 
)

Definition at line 482 of file vision.h.

void CVD::median_filter_3x3 ( const SubImage< byte > &  I,
SubImage< byte out 
)
void CVD::nonmax_suppression ( const std::vector< ImageRef > &  corners,
const std::vector< int > &  scores,
std::vector< ImageRef > &  nmax_corners 
)

Perform nonmaximal suppression on a set of features, in a 3 by 3 window. The test is non-strict: a point must be at least as large as its neighbours.

Parameters
cornersThe corner locations
scoresThe corners' scores
max_cornersThe locally maximal corners.
void CVD::nonmax_suppression ( const vector< ImageRef > &  corners,
const vector< int > &  scores,
vector< ImageRef > &  nonmax_corners 
)

Definition at line 150 of file nonmax_suppression.cpp.

void CVD::nonmax_suppression_strict ( const std::vector< ImageRef > &  corners,
const std::vector< int > &  scores,
std::vector< ImageRef > &  nmax_corners 
)

Perform nonmaximal suppression on a set of features, in a 3 by 3 window. The test is strict: a point must be greater than its neighbours.

Parameters
cornersThe corner locations
scoresThe corners' scores
max_cornersThe locally maximal corners.
void CVD::nonmax_suppression_strict ( const vector< ImageRef > &  corners,
const vector< int > &  scores,
vector< ImageRef > &  nonmax_corners 
)

Definition at line 145 of file nonmax_suppression.cpp.

template<class Score , class ReturnType , class Collector , class Test >
void CVD::nonmax_suppression_t ( const vector< ImageRef > &  corners,
const vector< Score > &  scores,
vector< ReturnType > &  nonmax_corners 
)
inline

Definition at line 21 of file nonmax_suppression.cpp.

void CVD::nonmax_suppression_with_scores ( const std::vector< ImageRef > &  corners,
const std::vector< int > &  socres,
std::vector< std::pair< ImageRef, int > > &  max_corners 
)

Perform nonmaximal suppression on a set of features, in a 3 by 3 window. Non strict.

Parameters
cornersThe corner locations
scoresThe corners' scores
max_cornersThe locally maximal corners, and their scores.
void CVD::nonmax_suppression_with_scores ( const vector< ImageRef > &  corners,
const vector< int > &  scores,
vector< pair< ImageRef, int > > &  nonmax_corners 
)

Definition at line 155 of file nonmax_suppression.cpp.

int CVD::old_style_corner_score ( const BasicImage< byte > &  im,
ImageRef  c,
const int *  pointer_dir,
int  barrier 
)

Definition at line 35 of file fast_corner.cpp.

template<class T , class S >
Rgb<T> CVD::operator* ( const Rgb< T > &  a,
const S &  b 
)
inline

Definition at line 157 of file rgb_components.h.

template<class T , class S >
Rgb<T> CVD::operator* ( const S &  b,
const Rgb< T > &  a 
)
inline

Definition at line 158 of file rgb_components.h.

template<class T , class S >
Rgba<T> CVD::operator* ( const Rgba< T > &  a,
const S &  b 
)
inline

Definition at line 181 of file rgb_components.h.

template<class T , class S >
Rgba<T> CVD::operator* ( const S &  b,
const Rgba< T > &  a 
)
inline

Definition at line 182 of file rgb_components.h.

template<class T , class S >
La<T> CVD::operator* ( const La< T > &  a,
const S &  b 
)
inline

Definition at line 204 of file rgb_components.h.

template<class T , class S >
La<T> CVD::operator* ( const S &  b,
const La< T > &  a 
)
inline

Definition at line 205 of file rgb_components.h.

ImageRef CVD::operator* ( const int  scale,
const ImageRef ref 
)
related

Definition at line 367 of file image_ref.h.

template<class T , class S >
Rgb<T>& CVD::operator*= ( Rgb< T > &  a,
const S &  b 
)
inline

Definition at line 159 of file rgb_components.h.

template<class T , class S >
Rgba<T>& CVD::operator*= ( Rgba< T > &  a,
const S &  b 
)
inline

Definition at line 183 of file rgb_components.h.

template<class T , class S >
La<T>& CVD::operator*= ( La< T > &  a,
const S &  b 
)
inline

Definition at line 206 of file rgb_components.h.

template<class T , class S >
Rgb<T> CVD::operator+ ( const Rgb< T > &  a,
const Rgb< S > &  b 
)
inline

Definition at line 153 of file rgb_components.h.

template<class T , class S >
Rgba<T> CVD::operator+ ( const Rgba< T > &  a,
const Rgba< S > &  b 
)
inline

Definition at line 177 of file rgb_components.h.

template<class T , class S >
La<T> CVD::operator+ ( const La< T > &  a,
const La< S > &  b 
)
inline

Definition at line 200 of file rgb_components.h.

template<class T , class S >
Rgb<T>& CVD::operator+= ( Rgb< T > &  a,
const Rgb< S > &  b 
)
inline

Definition at line 154 of file rgb_components.h.

template<class T , class S >
Rgba<T>& CVD::operator+= ( Rgba< T > &  a,
const Rgba< S > &  b 
)
inline

Definition at line 178 of file rgb_components.h.

template<class T , class S >
La<T>& CVD::operator+= ( La< T > &  a,
const La< S > &  b 
)
inline

Definition at line 201 of file rgb_components.h.

template<class T , class S >
Rgb<T> CVD::operator- ( const Rgb< T > &  a,
const Rgb< S > &  b 
)
inline

Definition at line 155 of file rgb_components.h.

template<class T , class S >
Rgba<T> CVD::operator- ( const Rgba< T > &  a,
const Rgba< S > &  b 
)
inline

Definition at line 179 of file rgb_components.h.

template<class T , class S >
La<T> CVD::operator- ( const La< T > &  a,
const La< S > &  b 
)
inline

Definition at line 202 of file rgb_components.h.

template<class T , class S >
Rgb<T>& CVD::operator-= ( Rgb< T > &  a,
const Rgb< S > &  b 
)
inline

Definition at line 156 of file rgb_components.h.

template<class T , class S >
Rgba<T>& CVD::operator-= ( Rgba< T > &  a,
const Rgba< S > &  b 
)
inline

Definition at line 180 of file rgb_components.h.

template<class T , class S >
La<T>& CVD::operator-= ( La< T > &  a,
const La< S > &  b 
)
inline

Definition at line 203 of file rgb_components.h.

template<class T , class S >
Rgb<T> CVD::operator/ ( const Rgb< T > &  a,
const S &  b 
)
inline

Definition at line 160 of file rgb_components.h.

template<class T , class S >
Rgb<T> CVD::operator/ ( const S &  b,
const Rgb< T > &  a 
)
inline

Definition at line 161 of file rgb_components.h.

template<class T , class S >
Rgba<T> CVD::operator/ ( const Rgba< T > &  a,
const S &  b 
)
inline

Definition at line 184 of file rgb_components.h.

template<class T , class S >
Rgba<T> CVD::operator/ ( const S &  b,
const Rgba< T > &  a 
)
inline

Definition at line 185 of file rgb_components.h.

template<class T , class S >
La<T> CVD::operator/ ( const La< T > &  a,
const S &  b 
)
inline

Definition at line 207 of file rgb_components.h.

template<class T , class S >
La<T> CVD::operator/ ( const S &  b,
const La< T > &  a 
)
inline

Definition at line 208 of file rgb_components.h.

template<class T , class S >
Rgb<T>& CVD::operator/= ( Rgb< T > &  a,
const S &  b 
)
inline

Definition at line 162 of file rgb_components.h.

template<class T , class S >
Rgba<T>& CVD::operator/= ( Rgba< T > &  a,
const S &  b 
)
inline

Definition at line 186 of file rgb_components.h.

template<class T , class S >
La<T>& CVD::operator/= ( La< T > &  a,
const S &  b 
)
inline

Definition at line 209 of file rgb_components.h.

template<class T , class S >
void CVD::sample ( const BasicImage< S > &  im,
double  x,
double  y,
T &  result 
)
inline

Definition at line 256 of file vision.h.

template<class T , class S >
T CVD::sample ( const BasicImage< S > &  im,
double  x,
double  y 
)
inline

Definition at line 271 of file vision.h.

void CVD::sample ( const BasicImage< float > &  im,
double  x,
double  y,
float &  result 
)
inline

Definition at line 277 of file vision.h.

void CVD::scale_d ( double  d[],
double  p 
)

Definition at line 114 of file convolution.cpp.

template<class S , class T >
T CVD::scaleKernel ( const std::vector< S > &  k,
std::vector< T > &  scaled,
maxval 
)

scales a GaussianKernel to a different maximum value. The new kernel is returned in scaled. The new normalizing value is returned.

Parameters
kinput kernel
scaledoutput vector to hold the resulting kernel
maxvalthe new maximum value
Returns
sum of the new kernel elements for normalization

Definition at line 72 of file convolution.h.

template<class T1 , class T2 >
void CVD::square ( const T1 *  in,
T2 *  out,
size_t  count 
)
inline

Definition at line 173 of file utility.h.

void CVD::square ( const float *  in,
float *  out,
size_t  count 
)

Definition at line 31 of file utility_float.cpp.

template<class T >
void CVD::stats ( const BasicImage< T > &  im,
T &  mean,
T &  stddev 
)

computes mean and stddev of intensities in an image. These are computed for each component of the pixel type, therefore the output are two pixels with mean and stddev for each component.

Parameters
iminput image
meanpixel element containing the mean of intensities in the image for each component
stddevpixel element containing the standard deviation for each component

Definition at line 183 of file vision.h.

template<int A, class T >
size_t CVD::steps_to_align ( const T *  ptr)
inline

Compute the number of pointer increments necessary to yield alignment of A bytes.

Definition at line 202 of file utility.h.

template<class T1 , class T2 >
void CVD::subtract_square ( const T1 *  in,
T2 *  out,
size_t  count 
)
inline

Definition at line 181 of file utility.h.

void CVD::subtract_square ( const float *  in,
float *  out,
size_t  count 
)

Definition at line 36 of file utility_float.cpp.

template<class T >
double CVD::sum_squared_differences ( const T *  a,
const T *  b,
size_t  count 
)
inline

Compute sum of (a_i - b_i)^2 (the SSD) This is accelerated using SIMD for some platforms and data types (alignment is checked at runtime) Do not specify template parameters explicitly so that overloading can choose the right implementation

Definition at line 192 of file utility.h.

double CVD::sum_squared_differences ( const float *  a,
const float *  b,
size_t  count 
)

Definition at line 26 of file utility_float.cpp.

double CVD::sum_squared_differences ( const double *  a,
const double *  b,
size_t  count 
)

Definition at line 30 of file utility_double_int.cpp.

long long CVD::sum_squared_differences ( const byte a,
const byte b,
size_t  count 
)

Definition at line 35 of file utility_double_int.cpp.

static bool CVD::test_gt_set ( int  a,
int  b,
int &  min_diff 
)
inlinestatic

Definition at line 13 of file fast_10_score.cpp.

static bool CVD::test_gt_set ( int  a,
int  b,
int &  min_diff 
)
inlinestatic

Definition at line 13 of file fast_9_score.cpp.

template<class T >
void CVD::threshold ( BasicImage< T > &  im,
const T &  minimum,
const T &  hi 
)

thresholds an image by setting all pixel values below a minimum to 0 and all values above to a given maximum

Parameters
iminput image changed in place
minimumthreshold value
himaximum value for values above the threshold

Definition at line 163 of file vision.h.

template<class T , class S >
int CVD::transform ( const BasicImage< S > &  in,
BasicImage< T > &  out,
const TooN::Matrix< 2 > &  M,
const TooN::Vector< 2 > &  inOrig,
const TooN::Vector< 2 > &  outOrig,
const T  defaultValue = T() 
)

a normal member taking two arguments and returning an integer value.

Parameters
ina image containing the information to be extracted.
outthe image to be filled. The whole image out image is filled by the in image.
Mthe matrix used to map point in the out matrix to those in the in matrix
inOrigorigin in the in image
outOrigorigin in the out image
Returns
the number of pixels not in the in image : this will collide with transform in the std namespace

Definition at line 304 of file vision.h.

template<class T >
void CVD::transform ( const BasicImage< T > &  in,
BasicImage< T > &  out,
const TooN::Matrix< 3 > &  Minv 
)

Definition at line 375 of file vision.h.

template<class C >
void CVD::twoThirdsSample ( const SubImage< C > &  in,
SubImage< C > &  out 
)

Subsamples an image to 2/3 of its size by averaging 3x3 blocks in to 2x2 blocks.

Parameters
ininput image
outoutput image (muze be out.size() == in.size()/2*3 )
Exceptions
IncompatibleImageSizesif out does not have the correct dimensions.

Definition at line 44 of file vision.h.

void CVD::twoThirdsSample ( const SubImage< byte > &  in,
SubImage< byte > &  out 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<class C >
Internal::ImagePromise<Internal::twoThirdsSampler<C> > CVD::twoThirdsSample ( const SubImage< C > &  c)

Definition at line 92 of file vision.h.

void CVD::van_vliet_blur ( const double  b[],
const CVD::SubImage< float >  in,
CVD::SubImage< float >  out 
)

Definition at line 215 of file convolution.cpp.

TooN::Vector<2> CVD::vec ( const ImageRef ir)
inline

Convert an image co-ordinate into a Vector

Parameters
irThe ImageRef to convert

Definition at line 32 of file vector_image_ref.h.

template<class T >
void CVD::zeroBorders ( BasicImage< T > &  I)

Set the one-pixel border (top, bottom, sides) of an image to zero values.

Definition at line 88 of file utility.h.

template<class T >
void CVD::zeroPixel ( T &  pixel)
inline

Set a pixel to the default value (typically 0) For multi-component pixels, this zeros all components (sets them to defaults)

Definition at line 81 of file utility.h.

template<class T >
void CVD::zeroPixels ( T *  pixels,
int  count 
)
inline

Set many pixels to the default value (typically 0) For multi-component pixels, this zeros all components (sets them to defaults)

Definition at line 85 of file utility.h.

Variable Documentation

const ImageRef CVD::fast_pixel_ring
Initial value:
=
{
ImageRef(0,3),
ImageRef(1,3),
ImageRef(2,2),
ImageRef(3,1),
ImageRef(3,0),
ImageRef(3,-1),
ImageRef(2,-2),
ImageRef(1,-3),
ImageRef(0,-3),
ImageRef(-1,-3),
ImageRef(-2,-2),
ImageRef(-3,-1),
ImageRef(-3,0),
ImageRef(-3,1),
ImageRef(-2,2),
ImageRef(-1,3),
}

The 16 offsets from the centre pixel used in FAST feature detection.

Definition at line 11 of file fast_corner.cpp.

cvd_timer CVD::timer

A instance of a cvd_timer for general use

Definition at line 82 of file cvd_timer.cpp.