auxiliary
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Macros
Classes | Enumerations | Functions
auxiliary Namespace Reference

An auxiliary interface functions for armadillo library. More...

Classes

class  circular_buffer
 A minimal implementation of circular buffer class. More...
 
class  fetch_error
 defines fetch error exception More...
 
class  image_fetcher
 An implementation of image fetcher. More...
 
class  Size
 Template class for size type. More...
 
class  Image
 A template image class. More...
 

Enumerations

enum  border_type {
  constant, reflect, replicate, warp,
  reflect101, transparent
}
 Various border types, image boundaries are denoted with '|'. More...
 

Functions

char PathSeparator ()
 
template<typename pixel_type >
Image< pixel_type > blur (const Image< pixel_type > &img, const mat &h)
 Gaussian blur with given blur kernel. More...
 
template<typename T1 , typename T2 >
void integral (const arma::Mat< T1 > &A, arma::Mat< T2 > &I)
 Compute integral. More...
 
template<typename T1 , typename T2 , typename T3 >
void integral (const Image< T1 > &img, Image< T2 > &sum, Image< T3 > &sqsum)
 Compute integral images. More...
 
arma::uword borderInterpolate (int p, int n, border_type type=reflect101)
 Computes the location of an extrapolated pixel. More...
 
template<typename T1 , typename T2 >
void pyrDown (const T1 &in, T2 &out)
 Blurs an image and downsamples it.
This function performs the downsampling step of the Gaussian pyramid construction.
First, it convolves the source image with the kernel:

\[ \frac{1}{256} \begin{bmatrix} 1 & 4 & 6 & 4 & 1 \\ 4 & 16 & 24 & 16 & 4 \\ 6 & 24 & 36 & 24 & 6 \\ 4 & 16 & 24 & 16 & 4 \\ 1 & 4 & 6 & 4 & 1 \end{bmatrix} \]

Then, it downsamples the image by rejecting even rows and columns. More...

 

Detailed Description

An auxiliary interface functions for armadillo library.

Enumeration Type Documentation

Various border types, image boundaries are denoted with '|'.

Enumerator
constant 

iii | abcde | iii with some specified 'i'

reflect 

cba | abcde | edc

replicate 

aaa | abcde | eee

warp 

cde | abcde | abc

reflect101 

dcb | abcde | dcb

transparent 

not specified

Function Documentation

template<typename pixel_type >
Image<pixel_type> auxiliary::blur ( const Image< pixel_type > &  img,
const mat &  h 
)
inline

Gaussian blur with given blur kernel.

Parameters
imgAn input image.
hThe blur kernel.
Returns
The blurred image.
arma::uword auxiliary::borderInterpolate ( int  p,
int  n,
border_type  type = reflect101 
)
inline

Computes the location of an extrapolated pixel.

Parameters
p0-based coordinate of the extrapolated pixel along one of the axes.
nLength of the array along the corresponding axis.
typeBorder type, one of the border_type.
template<typename T1 , typename T2 >
void auxiliary::integral ( const arma::Mat< T1 > &  A,
arma::Mat< T2 > &  I 
)

Compute integral.

template<typename T1 , typename T2 , typename T3 >
void auxiliary::integral ( const Image< T1 > &  img,
Image< T2 > &  sum,
Image< T3 > &  sqsum 
)

Compute integral images.

Parameters
[in]imginput image
[out]sumintegral image
[out]sqsumsquared integral image
char auxiliary::PathSeparator ( )
inline
template<typename T1 , typename T2 >
void auxiliary::pyrDown ( const T1 &  in,
T2 &  out 
)

Blurs an image and downsamples it.
This function performs the downsampling step of the Gaussian pyramid construction.
First, it convolves the source image with the kernel:

\[ \frac{1}{256} \begin{bmatrix} 1 & 4 & 6 & 4 & 1 \\ 4 & 16 & 24 & 16 & 4 \\ 6 & 24 & 36 & 24 & 6 \\ 4 & 16 & 24 & 16 & 4 \\ 1 & 4 & 6 & 4 & 1 \end{bmatrix} \]

Then, it downsamples the image by rejecting even rows and columns.

Parameters
in
out
Note
This function is preliminary; it is not yet fully optimized.
See Also
PyrDownVec_32s8u in pyramid.cpp of OpenCV