#include "Image/TensorOps.H"
#include "Image/Image.H"
#include "Image/Pixels.H"
#include "Image/Range.H"
#include "Image/MatrixOps.H"
#include "Util/Assert.H"
#include "Util/MathFunctions.H"
#include "Util/safecopy.H"
#include "rutz/trace.h"
#include "GUI/DebugWin.H"
#include <algorithm>
#include <cmath>
#include <climits>
#include <cfloat>
#include <numeric>
#include "inst/Image/TensorOps.I"
Go to the source code of this file.
Functions | |
template<class T > | |
TensorField | getTensor (const Image< T > &img, int kernelSize) |
Get the tensor of an image by measuring the gradient. | |
Image< float > | getTensorMag (const TensorField &tf) |
Get the tensor magnitude value. | |
TensorField | getTensor (const EigenSpace &eigen) |
Get the tensor of an image from eigenvectors and eigenvalues. | |
EigenSpace | getTensorEigen (const TensorField &tf) |
Get the eigenvectors and values from a tensor. | |
void | nonMaxSurp (TensorField &tf, float radius) |
Perform non maximal surpression. |
Mathematical Tensor operations
Definition in file TensorOps.C.
TensorField getTensor | ( | const EigenSpace & | eigen | ) |
Get the tensor of an image from eigenvectors and eigenvalues.
Definition at line 247 of file TensorOps.C.
References Image< T >::getDims(), Image< T >::getVal(), NO_INIT, and Image< T >::size().
TensorField getTensor | ( | const Image< T > & | img, | |
int | kernelSize | |||
) | [inline] |
Get the tensor of an image by measuring the gradient.
Definition at line 70 of file TensorOps.C.
References ASSERT, Image< T >::begin(), Image< T >::getDims(), Image< T >::getHeight(), Image< T >::getWidth(), and NO_INIT.
EigenSpace getTensorEigen | ( | const TensorField & | tf | ) |
Get the eigenvectors and values from a tensor.
Definition at line 273 of file TensorOps.C.
References Image< T >::getDims(), Image< T >::getVal(), NO_INIT, Image< T >::setVal(), Image< T >::size(), sqrt(), and trace().
Referenced by nonMaxSurp().
Image<float> getTensorMag | ( | const TensorField & | tf | ) |
Get the tensor magnitude value.
Definition at line 221 of file TensorOps.C.
References Image< T >::begin(), Image< T >::end(), Image< T >::getDims(), NO_INIT, and sqrt().
void nonMaxSurp | ( | TensorField & | tf, | |
float | radius | |||
) |
Perform non maximal surpression.
Definition at line 310 of file TensorOps.C.
References Image< T >::coordsOk(), Image< T >::getHeight(), getTensorEigen(), Image< T >::getVal(), and Image< T >::getWidth().