latest version v1.9 - last update 10 Apr 2010 |
The hessianFunctor calculates three channels from an input channel L:. More...
#include <ltiHessianFunctor.h>
Classes | |
class | parameters |
The parameters for the class hessianFunctor. More... | |
Public Member Functions | |
hessianFunctor () | |
hessianFunctor (const parameters &par) | |
hessianFunctor (const hessianFunctor &other) | |
virtual | ~hessianFunctor () |
virtual const char * | getTypeName () const |
bool | apply (const channel &src, channel &xx, channel &xy, channel &yy) const |
bool | apply (const channel8 &src, channel &xx, channel &xy, channel &yy) const |
hessianFunctor & | copy (const hessianFunctor &other) |
hessianFunctor & | operator= (const hessianFunctor &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
virtual bool | updateParameters () |
Protected Member Functions | |
bool | classicHessian (const channel &src, channel &xx, channel &xy, channel &yy) const |
bool | classicXY (const channel &src, channel &xy) const |
Protected Attributes | |
convolution | convXX |
convolution | convYY |
convolution | convXY |
The hessianFunctor calculates three channels from an input channel L:.
Lxx, Lxy and Lyy which are the second derivative channels.
The make up the Hessian of each pixel of L like this:
/ Lxx(i,j) Lxy(i,j) \ H(i,j)= | | \ Lxy(i,j) Lyy(i,j) /
See parameters::eKernelType for available kernels.
Corresponding gradient kernels can be found in ltiGradientKernels.h
lti::hessianFunctor::hessianFunctor | ( | ) |
Default constructor.
lti::hessianFunctor::hessianFunctor | ( | const parameters & | par | ) |
Construct a functor using the given parameters.
lti::hessianFunctor::hessianFunctor | ( | const hessianFunctor & | other | ) |
Copy constructor.
other | the object to be copied |
virtual lti::hessianFunctor::~hessianFunctor | ( | ) | [virtual] |
Destructor.
bool lti::hessianFunctor::apply | ( | const channel8 & | src, | |
channel & | xx, | |||
channel & | xy, | |||
channel & | yy | |||
) | const |
Calculated the second derivatives of the given channel8 which together form the components of the Hessian matrix of each pixel.
Note that the channel8 is converted to a channel before calculation.
src | channel8 with the source data. | |
xx | second derivative in xx direction. | |
xy | second derivative in xy direction. | |
yy | second derivative in yy direction. |
bool lti::hessianFunctor::apply | ( | const channel & | src, | |
channel & | xx, | |||
channel & | xy, | |||
channel & | yy | |||
) | const |
Calculated the second derivatives of the given channel which together form the components of the Hessian matrix of each pixel.
src | channel with the source data. | |
xx | second derivative in xx direction. | |
xy | second derivative in xy direction. | |
yy | second derivative in yy direction. |
bool lti::hessianFunctor::classicHessian | ( | const channel & | src, | |
channel & | xx, | |||
channel & | xy, | |||
channel & | yy | |||
) | const [protected] |
Fast calculation of the Hessian with classic kernels [1 -2 1] for XX and YY and [1 0 -1; 0 0 0; -1 0 1] for XY.
Fast computation of the second derivative in XY direction using the kernel:.
1 0 -1 0 0 0 -1 0 1
This is used for parameters::Hessian since it is much faster than convolution with a very sparse kernel.
virtual functor* lti::hessianFunctor::clone | ( | ) | const [virtual] |
Returns a pointer to a clone of this functor.
Implements lti::functor.
hessianFunctor& lti::hessianFunctor::copy | ( | const hessianFunctor & | other | ) |
Copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::functor.
const parameters& lti::hessianFunctor::getParameters | ( | ) | const |
Returns used parameters.
Reimplemented from lti::transform.
virtual const char* lti::hessianFunctor::getTypeName | ( | ) | const [virtual] |
Returns the name of this type ("hessianFunctor").
Reimplemented from lti::transform.
hessianFunctor& lti::hessianFunctor::operator= | ( | const hessianFunctor & | other | ) |
virtual bool lti::hessianFunctor::updateParameters | ( | ) | [virtual] |
convolution lti::hessianFunctor::convXX [protected] |
Used for convolution in x or xx direction.
convolution lti::hessianFunctor::convXY [protected] |
Used for convolution in xy direction.
convolution lti::hessianFunctor::convYY [protected] |
Used for convolution in y or yy direction.