DGtalTools  0.9.4
Public Types | Public Member Functions | Data Fields | Protected Attributes
DGtal::ATu0v1< TKSpace, TLinearAlgebra > Struct Template Reference

#include <imageProcessing/ATu0v1.h>

Inheritance diagram for DGtal::ATu0v1< TKSpace, TLinearAlgebra >:
Inheritance graph
[legend]
Collaboration diagram for DGtal::ATu0v1< TKSpace, TLinearAlgebra >:
Collaboration graph
[legend]

Public Types

typedef TKSpace KSpace
 
typedef TLinearAlgebra LinearAlgebra
 
typedef DECImage2D< TKSpace, TLinearAlgebra > Base
 
typedef LinearAlgebra::SolverSimplicialLLT LinearAlgebraSolver
 
typedef DiscreteExteriorCalculusSolver< Calculus, LinearAlgebraSolver, 0, PRIMAL, 0, PRIMALSolverU
 
typedef DiscreteExteriorCalculusSolver< Calculus, LinearAlgebraSolver, 1, PRIMAL, 1, PRIMALSolverV
 
typedef KSpace::Space Space
 
typedef Space::Point Point
 
typedef Space::RealVector RealVector
 
typedef RealVector::Component Scalar
 
typedef KSpace::SCell SCell
 
typedef HyperRectDomain< SpaceDomain
 
typedef DiscreteExteriorCalculus< 2, 2, LinearAlgebraCalculus
 
typedef Calculus::Index Index
 
typedef Calculus::PrimalForm0 PrimalForm0
 
typedef Calculus::PrimalForm1 PrimalForm1
 
typedef Calculus::PrimalForm2 PrimalForm2
 
typedef Calculus::PrimalIdentity0 PrimalIdentity0
 
typedef Calculus::PrimalIdentity1 PrimalIdentity1
 
typedef Calculus::PrimalIdentity2 PrimalIdentity2
 
typedef Calculus::PrimalDerivative0 PrimalDerivative0
 
typedef Calculus::PrimalDerivative1 PrimalDerivative1
 
typedef Calculus::DualDerivative0 DualDerivative0
 
typedef Calculus::DualDerivative1 DualDerivative1
 
typedef Calculus::PrimalHodge0 PrimalHodge0
 
typedef Calculus::PrimalHodge1 PrimalHodge1
 
typedef Calculus::PrimalHodge2 PrimalHodge2
 
typedef Calculus::DualHodge0 DualHodge0
 
typedef Calculus::DualHodge1 DualHodge1
 
typedef Calculus::DualHodge2 DualHodge2
 
- Public Types inherited from DGtal::DECImage2D< TKSpace, TLinearAlgebra >
typedef TKSpace KSpace
 
typedef TLinearAlgebra LinearAlgebra
 
typedef KSpace::Space Space
 
typedef Space::Point Point
 
typedef Space::RealVector RealVector
 
typedef RealVector::Component Scalar
 
typedef KSpace::SCell SCell
 
typedef KSpace::Cell Cell
 
typedef KSpace::Surfel Surfel
 
typedef HyperRectDomain< SpaceDomain
 
typedef DiscreteExteriorCalculus< 2, 2, LinearAlgebraCalculus
 
typedef DiscreteExteriorCalculusFactory< LinearAlgebraCalculusFactory
 
typedef Calculus::Index Index
 
typedef Calculus::PrimalForm0 PrimalForm0
 
typedef Calculus::PrimalForm1 PrimalForm1
 
typedef Calculus::PrimalForm2 PrimalForm2
 
typedef Calculus::PrimalIdentity0 PrimalIdentity0
 
typedef Calculus::PrimalIdentity1 PrimalIdentity1
 
typedef Calculus::PrimalIdentity2 PrimalIdentity2
 
typedef Calculus::PrimalDerivative0 PrimalDerivative0
 
typedef Calculus::PrimalDerivative1 PrimalDerivative1
 
typedef Calculus::DualDerivative0 DualDerivative0
 
typedef Calculus::DualDerivative1 DualDerivative1
 
typedef Calculus::PrimalAntiderivative1 PrimalAntiderivative1
 
typedef Calculus::PrimalAntiderivative2 PrimalAntiderivative2
 
typedef Calculus::DualAntiderivative1 DualAntiderivative1
 
typedef Calculus::DualAntiderivative2 DualAntiderivative2
 
typedef Calculus::PrimalHodge0 PrimalHodge0
 
typedef Calculus::PrimalHodge1 PrimalHodge1
 
typedef Calculus::PrimalHodge2 PrimalHodge2
 
typedef Calculus::DualHodge0 DualHodge0
 
typedef Calculus::DualHodge1 DualHodge1
 
typedef Calculus::DualHodge2 DualHodge2
 
typedef LinearAlgebra::SolverSimplicialLLT LinearAlgebraSolver
 
typedef DiscreteExteriorCalculusSolver< Calculus, LinearAlgebraSolver, 0, PRIMAL, 0, PRIMALSolverU
 
typedef DiscreteExteriorCalculusSolver< Calculus, LinearAlgebraSolver, 1, PRIMAL, 1, PRIMALSolverV
 

Public Member Functions

 BOOST_STATIC_ASSERT ((KSpace::dimension==2))
 
 ~ATu0v1 ()=default
 
 ATu0v1 (int _verbose=1)
 
void init (Clone< KSpace > K)
 
 ATu0v1 (const ATu0v1 &other)=delete
 
 ATu0v1 (ATu0v1 &&other)=delete
 
ATu0v1operator= (const ATu0v1 &other)=delete
 
ATu0v1operator= (ATu0v1 &&other)=delete
 
template<typename Image , typename Function >
void addInput (const Image &image, const Function &f, bool perfect_data=false)
 
void setUFromInput ()
 
void setAlpha (Scalar _alpha)
 
void setAlpha (Scalar _alpha, const PrimalForm0 &m)
 
void setLambda (Scalar _lambda)
 
void setEpsilon (Scalar _epsilon)
 
Scalar computeSNR () const
 
Scalar getAlpha () const
 
Scalar getLambda () const
 
Scalar getEpsilon () const
 
const PrimalForm0getG (int i) const
 
const PrimalForm0getU (int i) const
 
const PrimalForm1getV () const
 
unsigned int size0 () const
 
unsigned int size1 () const
 
bool solveU ()
 
bool solveV ()
 
Scalar computeVariation ()
 
Scalar checkV ()
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 
- Public Member Functions inherited from DGtal::DECImage2D< TKSpace, TLinearAlgebra >
 BOOST_CONCEPT_ASSERT ((concepts::CCellularGridSpaceND< KSpace >))
 
 BOOST_STATIC_ASSERT ((KSpace::dimension==2))
 
 ~DECImage2D ()=default
 
 DECImage2D (int _verbose=1)
 
void init (Clone< KSpace > aKSpace)
 
 DECImage2D (const DECImage2D &other)=delete
 
 DECImage2D (DECImage2D &&other)=delete
 
DECImage2Doperator= (const DECImage2D &other)=delete
 
DECImage2Doperator= (DECImage2D &&other)=delete
 

Data Fields

Scalar delta_v_l1
 
Scalar delta_v_l2
 
Scalar delta_v_loo
 
PrimalIdentity1 L1
 
- Data Fields inherited from DGtal::DECImage2D< TKSpace, TLinearAlgebra >
int verbose
 
Calculus calculus
 
Domain domain
 
Domain cell_domain
 
PrimalDerivative0 D0
 
PrimalDerivative1 D1
 
DualDerivative0 dual_D0
 
DualDerivative1 dual_D1
 
PrimalHodge0 primal_h0
 
PrimalHodge1 primal_h1
 
PrimalHodge2 primal_h2
 
DualHodge0 dual_h0
 
DualHodge1 dual_h1
 
DualHodge2 dual_h2
 

Protected Attributes

std::vector< PrimalForm0g0
 
std::vector< PrimalForm0i0
 
std::vector< PrimalForm0u0
 
PrimalForm1 v1
 
PrimalForm1 former_v1
 
double alpha
 
double lambda
 
double epsilon
 
SolverU solver_u
 
SolverV solver_v
 
PrimalIdentity0 alpha_Id0
 
std::vector< PrimalForm0alpha_g0
 
PrimalIdentity1 l_L1
 
PrimalForm1 l_1_over_4
 
PrimalIdentity1 left_V1
 
PrimalForm1 l_1_over_4e
 

Detailed Description

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
struct DGtal::ATu0v1< TKSpace, TLinearAlgebra >

Aim: This class solves Ambrosio-Tortorelli functional in a plane for u a (vector of) 0-form(s) and v a 1-form. u is a regularized approximation of an input data g, while v represents the set of discontinuities of u.

Description of template class 'ATu0v1'

Template Parameters
TKSpaceany model of CCellularGridSpaceND, e.g KhalimskySpaceND
TLinearAlgebraany back-end for performing linear algebra, default is EigenLinearAlgebraBackend.

Definition at line 74 of file ATu0v1.h.

Member Typedef Documentation

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef DECImage2D<TKSpace, TLinearAlgebra> DGtal::ATu0v1< TKSpace, TLinearAlgebra >::Base

Definition at line 78 of file ATu0v1.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef DiscreteExteriorCalculus<2,2, LinearAlgebra> DGtal::DECImage2D< TKSpace, TLinearAlgebra >::Calculus

Definition at line 753 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef HyperRectDomain<Space> DGtal::DECImage2D< TKSpace, TLinearAlgebra >::Domain

Definition at line 752 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef Calculus::DualDerivative0 DGtal::DECImage2D< TKSpace, TLinearAlgebra >::DualDerivative0

Definition at line 764 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef Calculus::DualDerivative1 DGtal::DECImage2D< TKSpace, TLinearAlgebra >::DualDerivative1

Definition at line 765 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef Calculus::DualHodge0 DGtal::DECImage2D< TKSpace, TLinearAlgebra >::DualHodge0

Definition at line 773 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef Calculus::DualHodge1 DGtal::DECImage2D< TKSpace, TLinearAlgebra >::DualHodge1

Definition at line 774 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef Calculus::DualHodge2 DGtal::DECImage2D< TKSpace, TLinearAlgebra >::DualHodge2

Definition at line 775 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef Calculus::Index DGtal::DECImage2D< TKSpace, TLinearAlgebra >::Index

Definition at line 755 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef TKSpace DGtal::ATu0v1< TKSpace, TLinearAlgebra >::KSpace

Definition at line 76 of file ATu0v1.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef TLinearAlgebra DGtal::ATu0v1< TKSpace, TLinearAlgebra >::LinearAlgebra

Definition at line 77 of file ATu0v1.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef LinearAlgebra::SolverSimplicialLLT DGtal::ATu0v1< TKSpace, TLinearAlgebra >::LinearAlgebraSolver

Definition at line 116 of file ATu0v1.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef Space::Point DGtal::DECImage2D< TKSpace, TLinearAlgebra >::Point

Definition at line 746 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef Calculus::PrimalDerivative0 DGtal::DECImage2D< TKSpace, TLinearAlgebra >::PrimalDerivative0

Definition at line 762 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef Calculus::PrimalDerivative1 DGtal::DECImage2D< TKSpace, TLinearAlgebra >::PrimalDerivative1

Definition at line 763 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef Calculus::PrimalForm0 DGtal::DECImage2D< TKSpace, TLinearAlgebra >::PrimalForm0

Definition at line 756 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef Calculus::PrimalForm1 DGtal::DECImage2D< TKSpace, TLinearAlgebra >::PrimalForm1

Definition at line 757 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef Calculus::PrimalForm2 DGtal::DECImage2D< TKSpace, TLinearAlgebra >::PrimalForm2

Definition at line 758 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef Calculus::PrimalHodge0 DGtal::DECImage2D< TKSpace, TLinearAlgebra >::PrimalHodge0

Definition at line 770 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef Calculus::PrimalHodge1 DGtal::DECImage2D< TKSpace, TLinearAlgebra >::PrimalHodge1

Definition at line 771 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef Calculus::PrimalHodge2 DGtal::DECImage2D< TKSpace, TLinearAlgebra >::PrimalHodge2

Definition at line 772 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef Calculus::PrimalIdentity0 DGtal::DECImage2D< TKSpace, TLinearAlgebra >::PrimalIdentity0

Definition at line 759 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef Calculus::PrimalIdentity1 DGtal::DECImage2D< TKSpace, TLinearAlgebra >::PrimalIdentity1

Definition at line 760 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef Calculus::PrimalIdentity2 DGtal::DECImage2D< TKSpace, TLinearAlgebra >::PrimalIdentity2

Definition at line 761 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef Space::RealVector DGtal::DECImage2D< TKSpace, TLinearAlgebra >::RealVector

Definition at line 747 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef RealVector::Component DGtal::DECImage2D< TKSpace, TLinearAlgebra >::Scalar

Definition at line 748 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef KSpace::SCell DGtal::DECImage2D< TKSpace, TLinearAlgebra >::SCell

Definition at line 749 of file DECImageHelpers.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef DiscreteExteriorCalculusSolver<Calculus, LinearAlgebraSolver, 0, PRIMAL, 0, PRIMAL> DGtal::ATu0v1< TKSpace, TLinearAlgebra >::SolverU

Definition at line 118 of file ATu0v1.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef DiscreteExteriorCalculusSolver<Calculus, LinearAlgebraSolver, 1, PRIMAL, 1, PRIMAL> DGtal::ATu0v1< TKSpace, TLinearAlgebra >::SolverV

Definition at line 120 of file ATu0v1.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
typedef KSpace::Space DGtal::DECImage2D< TKSpace, TLinearAlgebra >::Space

Definition at line 745 of file DECImageHelpers.h.

Constructor & Destructor Documentation

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
DGtal::ATu0v1< TKSpace, TLinearAlgebra >::~ATu0v1 ( )
default

Destructor.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
DGtal::ATu0v1< TKSpace, TLinearAlgebra >::ATu0v1 ( int  _verbose = 1)

Default constructor. The object needs to be initialized with init.

Parameters
_verbosespecifies the verbose level (0: silent, 1: more info ... ).
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
DGtal::ATu0v1< TKSpace, TLinearAlgebra >::ATu0v1 ( const ATu0v1< TKSpace, TLinearAlgebra > &  other)
delete

Copy constructor.

Parameters
otherthe object to clone.
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
DGtal::ATu0v1< TKSpace, TLinearAlgebra >::ATu0v1 ( ATu0v1< TKSpace, TLinearAlgebra > &&  other)
delete

Move constructor.

Parameters
otherthe object to move.

Member Function Documentation

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
template<typename Image , typename Function >
void DGtal::ATu0v1< TKSpace, TLinearAlgebra >::addInput ( const Image image,
const Function &  f,
bool  perfect_data = false 
)

Adds an input 0-form by filtering an image values.

Parameters
imageany image such that the domain of this space is included in the domain of the image.
fany functor associating a scalar to an image value.
perfect_datawhen 'false', this is normal input data, otherwise this is perfect data only used for SNR computation.
Note
For a grey-level image stored with values unsigned char, should be called as
AT.addInput( image, [] (unsigned char c ) { return (double) c / 255.0; } );
Note
For a color image stored with values Color, should be called as
AT.addInput( image, [] ( Color c ) { return (double) c.red() / 255.0; } );
AT.addInput( image, [] ( Color c ) { return (double) c.green() / 255.0; } );
AT.addInput( image, [] ( Color c ) { return (double) c.blue() / 255.0; } );
Template Parameters
Imageany Image type.
Functionany function type ( typename Image::Value ) -> Scalar.
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
DGtal::ATu0v1< TKSpace, TLinearAlgebra >::BOOST_STATIC_ASSERT ( (KSpace::dimension==2)  )
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
Scalar DGtal::ATu0v1< TKSpace, TLinearAlgebra >::checkV ( )

Checks that form v is between 0 and 1 and forces v to be in-between.

Returns
the max of the deviation wrt 0 and 1.
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
Scalar DGtal::ATu0v1< TKSpace, TLinearAlgebra >::computeSNR ( ) const

Computes the SNR of u wrt ideal input (should have been given.

See also
addInput).
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
Scalar DGtal::ATu0v1< TKSpace, TLinearAlgebra >::computeVariation ( )

Computes the variation of v after a call to solveV.

See also
delta_v_l1, delta_v_l2, delta_v_loo.
Returns
the max of all variations (i.e. delta_v_loo).
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
Scalar DGtal::ATu0v1< TKSpace, TLinearAlgebra >::getAlpha ( ) const
inline
Returns
the (global) alpha parameter.

Definition at line 262 of file ATu0v1.h.

References DGtal::ATu0v1< TKSpace, TLinearAlgebra >::alpha.

262 { return alpha; }
double alpha
Smoothness parameter alpha of AT (in 1/area unit)
Definition: ATu0v1.h:351
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
Scalar DGtal::ATu0v1< TKSpace, TLinearAlgebra >::getEpsilon ( ) const
inline
Returns
the epsilon parameter.

Definition at line 268 of file ATu0v1.h.

References DGtal::ATu0v1< TKSpace, TLinearAlgebra >::epsilon.

268 { return epsilon; }
double epsilon
Thickness of discontinuity set (in length unit).
Definition: ATu0v1.h:355
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
const PrimalForm0& DGtal::ATu0v1< TKSpace, TLinearAlgebra >::getG ( int  i) const
inline
Parameters
ian integer (between 0 and the number of input forms).
Returns
the i-th input g 0-form.

Definition at line 272 of file ATu0v1.h.

References DGtal::ATu0v1< TKSpace, TLinearAlgebra >::g0.

272 { return g0.at( i ); }
std::vector< PrimalForm0 > g0
The g 0-forms.
Definition: ATu0v1.h:341
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
Scalar DGtal::ATu0v1< TKSpace, TLinearAlgebra >::getLambda ( ) const
inline
Returns
the lambda parameter.

Definition at line 265 of file ATu0v1.h.

References DGtal::ATu0v1< TKSpace, TLinearAlgebra >::lambda.

265 { return lambda; }
double lambda
Amount of discontinuity parameter lambda (in 1/length unit).
Definition: ATu0v1.h:353
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
const PrimalForm0& DGtal::ATu0v1< TKSpace, TLinearAlgebra >::getU ( int  i) const
inline
Parameters
ian integer (between 0 and the number of input forms).
Returns
the i-th u 0-form.

Definition at line 276 of file ATu0v1.h.

References DGtal::ATu0v1< TKSpace, TLinearAlgebra >::u0.

276 { return u0.at( i ); }
std::vector< PrimalForm0 > u0
The u 0-forms.
Definition: ATu0v1.h:345
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
const PrimalForm1& DGtal::ATu0v1< TKSpace, TLinearAlgebra >::getV ( ) const
inline
Returns
the v 1-form.

Definition at line 279 of file ATu0v1.h.

References DGtal::ATu0v1< TKSpace, TLinearAlgebra >::v1.

279 { return v1; }
PrimalForm1 v1
The v 1-form.
Definition: ATu0v1.h:347
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
void DGtal::ATu0v1< TKSpace, TLinearAlgebra >::init ( Clone< KSpace K)

Constructor from Khalimsky space, which specifies the domain of calculus.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
bool DGtal::ATu0v1< TKSpace, TLinearAlgebra >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
ATu0v1& DGtal::ATu0v1< TKSpace, TLinearAlgebra >::operator= ( const ATu0v1< TKSpace, TLinearAlgebra > &  other)
delete

Copy assignment operator.

Parameters
otherthe object to copy.
Returns
a reference on 'this'.
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
ATu0v1& DGtal::ATu0v1< TKSpace, TLinearAlgebra >::operator= ( ATu0v1< TKSpace, TLinearAlgebra > &&  other)
delete

Move assignment operator.

Parameters
otherthe object to move.
Returns
a reference on 'this'.
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
void DGtal::ATu0v1< TKSpace, TLinearAlgebra >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
void DGtal::ATu0v1< TKSpace, TLinearAlgebra >::setAlpha ( Scalar  _alpha)

Sets the parameter \( alpha \) as global to the image. Should be set before setLambda and setEpsilon.

Parameters
_alphathe \( \alpha \) parameter in AT functional ( in term \( \int \alpha | u - g |^2 \) ). Dimension theory tells that it is in 1/area unit, the lower the smoother will be the output.
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
void DGtal::ATu0v1< TKSpace, TLinearAlgebra >::setAlpha ( Scalar  _alpha,
const PrimalForm0 m 
)

Sets the parameter \( alpha \) of the image, as well as a weight for each input data as the primal 0-form m. Should be set before setLambda and setEpsilon.

Note
Useful for inpainting applications where you indicate with m=0 that the specified pixel data is useless.
Parameters
_alphathe \( \alpha \) parameter in AT functional ( in term \( \int \alpha | u - g |^2 \) ). Dimension theory tells that it is in 1/area unit, the lower the smoother will be the output.
ma 0-form that specifies which input data is significant (1) or not be used (0).
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
void DGtal::ATu0v1< TKSpace, TLinearAlgebra >::setEpsilon ( Scalar  _epsilon)

Sets the parameter \( \epsilon \) of AT functional. Should be set after setAlpha and setLambda.

Parameters
_epsilonthe \( \epsilon \) parameter in AT functional ( in terms \( \int \lambda \epsilon | v \grad u |^2 + \int \frac{\lambda}{4\epsilon} |1-v|^2 \) ). Dimension theory tells that it is in length unit, the lower the thinner is the set of discontinuities.
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
void DGtal::ATu0v1< TKSpace, TLinearAlgebra >::setLambda ( Scalar  _lambda)

Sets the parameter \( \lambda \) of AT functional. Should be set after setAlpha and before setEpsilon.

Parameters
_lambdathe \( \lambda \) parameter in AT functional ( in terms \( \int \lambda \epsilon | v \grad u |^2 + \int \frac{\lambda}{4\epsilon} |1-v|^2 \) ). Dimension theory tells that it is in 1/length unit, the lower the longer is the set of discontinuities.
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
void DGtal::ATu0v1< TKSpace, TLinearAlgebra >::setUFromInput ( )

Sets approximation u to be equal to the input. Used for initializating u. Should be called once all addInput have been called.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
unsigned int DGtal::ATu0v1< TKSpace, TLinearAlgebra >::size0 ( ) const
inline
Returns
the size of a 0-form vector

Definition at line 282 of file ATu0v1.h.

References DGtal::ATu0v1< TKSpace, TLinearAlgebra >::alpha_Id0, and DGtal::LinearOperator< TCalculus, order_in, duality_in, order_out, duality_out >::myContainer.

282 { return alpha_Id0.myContainer.columns(); }
PrimalIdentity0 alpha_Id0
alpha Id0
Definition: ATu0v1.h:363
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
unsigned int DGtal::ATu0v1< TKSpace, TLinearAlgebra >::size1 ( ) const
inline
Returns
the size of a 1-form vector

Definition at line 285 of file ATu0v1.h.

References DGtal::KForm< TCalculus, order, duality >::myContainer, and DGtal::ATu0v1< TKSpace, TLinearAlgebra >::v1.

285 { return v1.myContainer.rows(); }
Container myContainer
PrimalForm1 v1
The v 1-form.
Definition: ATu0v1.h:347
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
bool DGtal::ATu0v1< TKSpace, TLinearAlgebra >::solveU ( )

Computes a solution to function(s) u given the input g and current v.

Returns
'true' iff the solver worked.
template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
bool DGtal::ATu0v1< TKSpace, TLinearAlgebra >::solveV ( )

Computes a solution to function v given the input g and current u.

Returns
'true' iff the solver worked.

Field Documentation

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
double DGtal::ATu0v1< TKSpace, TLinearAlgebra >::alpha
protected

Smoothness parameter alpha of AT (in 1/area unit)

Definition at line 351 of file ATu0v1.h.

Referenced by DGtal::ATu0v1< TKSpace, TLinearAlgebra >::getAlpha().

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
std::vector< PrimalForm0 > DGtal::ATu0v1< TKSpace, TLinearAlgebra >::alpha_g0
protected

alpha g0

Definition at line 365 of file ATu0v1.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
PrimalIdentity0 DGtal::ATu0v1< TKSpace, TLinearAlgebra >::alpha_Id0
protected

alpha Id0

Definition at line 363 of file ATu0v1.h.

Referenced by DGtal::ATu0v1< TKSpace, TLinearAlgebra >::size0().

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
Scalar DGtal::ATu0v1< TKSpace, TLinearAlgebra >::delta_v_l1

The L1-norm of variation of v.

Definition at line 328 of file ATu0v1.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
Scalar DGtal::ATu0v1< TKSpace, TLinearAlgebra >::delta_v_l2

The L2-norm of variation of v.

Definition at line 330 of file ATu0v1.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
Scalar DGtal::ATu0v1< TKSpace, TLinearAlgebra >::delta_v_loo

The Linfinity-norm of variation of v.

Definition at line 332 of file ATu0v1.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
double DGtal::ATu0v1< TKSpace, TLinearAlgebra >::epsilon
protected

Thickness of discontinuity set (in length unit).

Definition at line 355 of file ATu0v1.h.

Referenced by DGtal::ATu0v1< TKSpace, TLinearAlgebra >::getEpsilon().

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
PrimalForm1 DGtal::ATu0v1< TKSpace, TLinearAlgebra >::former_v1
protected

The v 1-form at the previous iteration.

Definition at line 349 of file ATu0v1.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
std::vector< PrimalForm0 > DGtal::ATu0v1< TKSpace, TLinearAlgebra >::g0
protected

The g 0-forms.

Definition at line 341 of file ATu0v1.h.

Referenced by DGtal::ATu0v1< TKSpace, TLinearAlgebra >::getG().

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
std::vector< PrimalForm0 > DGtal::ATu0v1< TKSpace, TLinearAlgebra >::i0
protected

The ideal input 0-forms (for snr computation).

Definition at line 343 of file ATu0v1.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
PrimalIdentity1 DGtal::ATu0v1< TKSpace, TLinearAlgebra >::L1

edge laplacien

Definition at line 335 of file ATu0v1.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
PrimalForm1 DGtal::ATu0v1< TKSpace, TLinearAlgebra >::l_1_over_4
protected

lambda 1/4 1

Definition at line 369 of file ATu0v1.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
PrimalForm1 DGtal::ATu0v1< TKSpace, TLinearAlgebra >::l_1_over_4e
protected

lambda 1/(4*epsilon) 1

Definition at line 373 of file ATu0v1.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
PrimalIdentity1 DGtal::ATu0v1< TKSpace, TLinearAlgebra >::l_L1
protected

lambda * edge laplacien

Definition at line 367 of file ATu0v1.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
double DGtal::ATu0v1< TKSpace, TLinearAlgebra >::lambda
protected

Amount of discontinuity parameter lambda (in 1/length unit).

Definition at line 353 of file ATu0v1.h.

Referenced by DGtal::ATu0v1< TKSpace, TLinearAlgebra >::getLambda().

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
PrimalIdentity1 DGtal::ATu0v1< TKSpace, TLinearAlgebra >::left_V1
protected

epsilon * lambda * edge laplacien + (lambda / (4*epsilon)) * Id1

Definition at line 371 of file ATu0v1.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
SolverU DGtal::ATu0v1< TKSpace, TLinearAlgebra >::solver_u
protected

The solver for every 0-form u[i].

Definition at line 358 of file ATu0v1.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
SolverV DGtal::ATu0v1< TKSpace, TLinearAlgebra >::solver_v
protected

The solver for 1-form v.

Definition at line 360 of file ATu0v1.h.

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
std::vector< PrimalForm0 > DGtal::ATu0v1< TKSpace, TLinearAlgebra >::u0
protected

The u 0-forms.

Definition at line 345 of file ATu0v1.h.

Referenced by DGtal::ATu0v1< TKSpace, TLinearAlgebra >::getU().

template<typename TKSpace, typename TLinearAlgebra = EigenLinearAlgebraBackend>
PrimalForm1 DGtal::ATu0v1< TKSpace, TLinearAlgebra >::v1
protected

The documentation for this struct was generated from the following file: