SIFT
Functions
sift::alg Namespace Reference

Functions

const vigra::MultiArray< 2, f32_tconvolveWithGauss (const vigra::MultiArray< 2, f32_t > &img, f32_t sigma)
 
const vigra::MultiArray< 2, f32_treduceToNextLevel (const vigra::MultiArray< 2, f32_t > &img, f32_t sigma)
 
const vigra::MultiArray< 2, f32_tincreaseToNextLevel (const vigra::MultiArray< 2, f32_t > &img, f32_t sigma)
 
const vigra::MultiArray< 2, f32_tdog (const vigra::MultiArray< 2, f32_t > &lower, const vigra::MultiArray< 2, f32_t > &higher)
 
const vigra::Matrix< f32_tfoDerivative (const std::array< vigra::MultiArray< 2, f32_t >, 3 > &img, const Point< u16_t, u16_t > &p)
 
const vigra::Matrix< f32_tsoDerivative (const std::array< vigra::MultiArray< 2, f32_t >, 3 > &img, const Point< u16_t, u16_t > &p)
 
f32_t gradientMagnitude (const vigra::MultiArray< 2, f32_t > &img, const Point< u16_t, u16_t > &p)
 
f32_t gradientOrientation (const vigra::MultiArray< 2, f32_t > &img, const Point< u16_t, u16_t > &p)
 
const std::array< f32_t, 36 > orientationHistogram36 (const vigra::MultiArray< 2, f32_t > &orientations, const vigra::MultiArray< 2, f32_t > &magnitudes, const vigra::MultiArray< 2, f32_t > &current_gauss)
 
const std::vector< f32_torientationHistogram8 (const vigra::MultiArray< 2, f32_t > &orientations, const vigra::MultiArray< 2, f32_t > &magnitudes, const vigra::MultiArray< 2, f32_t > &current_gauss)
 
f32_t vertexParabola (const Point< u16_t, f32_t > &ln, const Point< u16_t, f32_t > &peak, const Point< u16_t, f32_t > &rn)
 
std::array< Point< f32_t, f32_t >, 4 > rotateShape (const Point< u16_t, u16_t > &center, f32_t angle, const u16_t width, const u16_t height)
 
void normalizeVector (std::vector< f32_t > &vec)
 

Function Documentation

const vigra::MultiArray< 2, f32_t > sift::alg::convolveWithGauss ( const vigra::MultiArray< 2, f32_t > &  ,
f32_t   
)

Convolves a given image with gaussian with a given sigma

Parameters
inputthe input image which will be convolved
sigmathe standard deviation for the gaussian
Returns
blured image
const vigra::MultiArray< 2, f32_t > sift::alg::dog ( const vigra::MultiArray< 2, f32_t > &  ,
const vigra::MultiArray< 2, f32_t > &   
)

Calculates the Difference of Gaussian, which is the differnce between 2 images which were convolved with gaussian under usage of a constant K

Parameters
lowerthe image which lies lower in an octave
higherthe image which lies higher in an octave
Returns
the difference of gaussian image, which contains our interest points
const vigra::Matrix< f32_t > sift::alg::foDerivative ( const std::array< vigra::MultiArray< 2, f32_t >, 3 > &  ,
const Point< u16_t, u16_t > &   
)

Calculates the first order derivative of the image, at the coordinates

Parameters
imgthe image of which the first derivative is taken.
pthe point at which the derivative is taken
Returns
the derivative as a vector (dx, dy, ds)
f32_t sift::alg::gradientMagnitude ( const vigra::MultiArray< 2, f32_t > &  ,
const Point< u16_t, u16_t > &   
)

Calculates the gradient magnitude of the given image at the given position

Parameters
imgthe given img
pthe current point
Returns
the gradient magnitude value
f32_t sift::alg::gradientOrientation ( const vigra::MultiArray< 2, f32_t > &  ,
const Point< u16_t, u16_t > &   
)

Calculates the gradient orientation of the given image at the given position

Parameters
imgthe given img
pthe current point
Returns
the gradient orientation value
const vigra::MultiArray< 2, f32_t > sift::alg::increaseToNextLevel ( const vigra::MultiArray< 2, f32_t > &  ,
f32_t   
)

Resamples an image by 2

Parameters
inthe input image
Returns
the output image
void sift::alg::normalizeVector ( std::vector< f32_t > &  )

Normalizes a vector

Parameters
vecthe vector to be normalized
const std::array< f32_t, 36 > sift::alg::orientationHistogram36 ( const vigra::MultiArray< 2, f32_t > &  ,
const vigra::MultiArray< 2, f32_t > &  ,
const vigra::MultiArray< 2, f32_t > &   
)

Creates an orientation Histogram of a given img and his corresponding orientations and magnitudes. Places values in bins of size 10. So the resulting histogram has 36 elements.

Parameters
orientationsThe img of which the histogram is taken from. Needs to be computed by gradient orientations before
magnitudesThe img of which the bins of the histogram will be weighted. Need to be precomputed by gradient magnitude
imgthe given img
Returns
histogram with 36 bins which are weighted by magnitudes and gaussian
const std::vector< f32_t > sift::alg::orientationHistogram8 ( const vigra::MultiArray< 2, f32_t > &  ,
const vigra::MultiArray< 2, f32_t > &  ,
const vigra::MultiArray< 2, f32_t > &   
)

Creates an orientation Histogram of a given img and his corresponding orientations and magnitudes. Places values in bins of size 45. So the resulting histogram has 8 elements.

Parameters
orientationsThe img of which the histogram is taken from. Needs to be computed by gradient orientations before
magnitudesThe img of which the bins of the histogram will be weighted. Need to be precomputed by gradient magnitude
imgthe given img
Returns
histogram with 8 bins which are weighted by magnitudes and gaussian
const vigra::MultiArray< 2, f32_t > sift::alg::reduceToNextLevel ( const vigra::MultiArray< 2, f32_t > &  ,
f32_t   
)

Resamples an image by 0.5

Parameters
imgthe input image
Returns
the output image
std::array< Point< f32_t, f32_t >, 4 > sift::alg::rotateShape ( const Point< u16_t, u16_t > &  ,
f32_t  ,
const u16_t  ,
const u16_t   
)

Rotates a given shape by a given degree clockwise

Parameters
centerthe center point of the shape
angleby which angle the shape should be rotated
widththe width of the shape
heightthe height of the shape
Returns
array with 2 elements. First element represents upper left corner of the shape and bottom right is represented by the second argument
const vigra::Matrix< f32_t > sift::alg::soDerivative ( const std::array< vigra::MultiArray< 2, f32_t >, 3 > &  ,
const Point< u16_t, u16_t > &   
)

Calculates the second order derivative of the image, at the coordinates

Parameters
imgthe image of which the second derivative is taken.
pthe point at which the derivative is taken
Returns
the derivative as a matrix (dxx, dxy, dxs) (dyx, dyy, dys) (dsx, dsy, dss)
f32_t sift::alg::vertexParabola ( const Point< u16_t, f32_t > &  ,
const Point< u16_t, f32_t > &  ,
const Point< u16_t, f32_t > &   
)

Calculates the vertex of a parabola, by taking a max value and its 2 neigbours

Parameters
lnthe left neighbor of the peak
peakthe peak value
rnthe right neighbor of the peak
Returns
the vertex value