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... | |
An auxiliary interface functions for armadillo library.
|
inline |
Gaussian blur with given blur kernel.
img | An input image. |
h | The blur kernel. |
|
inline |
Computes the location of an extrapolated pixel.
p | 0-based coordinate of the extrapolated pixel along one of the axes. |
n | Length of the array along the corresponding axis. |
type | Border type, one of the border_type. |
void auxiliary::integral | ( | const arma::Mat< T1 > & | A, |
arma::Mat< T2 > & | I | ||
) |
Compute integral.
void auxiliary::integral | ( | const Image< T1 > & | img, |
Image< T2 > & | sum, | ||
Image< T3 > & | sqsum | ||
) |
Compute integral images.
[in] | img | input image |
[out] | sum | integral image |
[out] | sqsum | squared integral image |
|
inline |
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.
in | |
out |