#include "Image/Image.H"
#include "Image/ImageSet.H"
#include "Image/FilterOps.H"
#include "Util/Promotions.H"
#include <vector>
Go to the source code of this file.
Classes | |
struct | EigenSpace |
struct | TensorField |
Here we represent tensors as an image set with 4 images indexed as: More... | |
Functions | |
template<class T > | |
TensorField | getTensor (const Image< T > &img, int kernelSize=5) |
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=1.5) |
Perform non maximal surpression. |
Mathematical Tensor operations
Definition in file TensorOps.H.
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 = 5 | |||
) | [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 = 1.5 | |||
) |
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().