DGtalTools  1.5.beta
Public Types | Public Member Functions | Data Fields | Protected Attributes
DGtal::ATVu2v0< TKSpace, TLinearAlgebra > Struct Template Reference

#include <imageProcessing/ATVu2v0.h>

Inheritance diagram for DGtal::ATVu2v0< TKSpace, TLinearAlgebra >:
Inheritance graph
[legend]
Collaboration diagram for DGtal::ATVu2v0< 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, 2, PRIMAL, 2, PRIMALSolverU
 
typedef DiscreteExteriorCalculusSolver< Calculus, LinearAlgebraSolver, 0, PRIMAL, 0, 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::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
 
- Public Types inherited from DGtal::DECImage2D< TKSpace, EigenLinearAlgebraBackend >
typedef TKSpace KSpace
 
typedef EigenLinearAlgebraBackend 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, PRIMAL > SolverU
 
typedef DiscreteExteriorCalculusSolver< Calculus, LinearAlgebraSolver, 1, PRIMAL, 1, PRIMAL > SolverV
 

Public Member Functions

 BOOST_STATIC_ASSERT ((KSpace::dimension==2))
 
 ~ATVu2v0 ()=default
 
 ATVu2v0 (int _verbose=1)
 
void init (Clone< KSpace > K)
 
 ATVu2v0 (const ATVu2v0 &other)=delete
 
 ATVu2v0 (ATVu2v0 &&other)=delete
 
ATVu2v0operator= (const ATVu2v0 &other)=delete
 
ATVu2v0operator= (ATVu2v0 &&other)=delete
 
template<typename Image , typename Function >
void addInput (const Image &image, const Function &f, bool perfect_data=false)
 
void setMetricAverage (bool average)
 
void setUFromInput ()
 
void setUFromInputAndMask ()
 
void setAlpha (Scalar _alpha)
 
void setAlpha (Scalar _alpha, const PrimalForm2 &m)
 
void setLambda (Scalar _lambda)
 
void setEpsilon (Scalar _epsilon)
 
Scalar computeSNR () const
 
Scalar getAlpha () const
 
Scalar getLambda () const
 
Scalar getEpsilon () const
 
const PrimalForm2getG (int i) const
 
const PrimalForm2getU (int i) const
 
const PrimalForm0getV () const
 
unsigned int size0 () 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, EigenLinearAlgebraBackend >
 BOOST_CONCEPT_ASSERT ((concepts::CCellularGridSpaceND< KSpace >))
 
 BOOST_STATIC_ASSERT ((KSpace::dimension==2))
 
 ~DECImage2D ()=default
 
 DECImage2D (int _verbose=1)
 
 DECImage2D (const DECImage2D &other)=delete
 
 DECImage2D (DECImage2D &&other)=delete
 
void init (Clone< KSpace > aKSpace)
 
DECImage2Doperator= (const DECImage2D &other)=delete
 
DECImage2Doperator= (DECImage2D &&other)=delete
 

Data Fields

Scalar delta_v_l1
 
Scalar delta_v_l2
 
Scalar delta_v_loo
 
PrimalDerivative0 M01
 
PrimalDerivative1 M12
 
PrimalAntiderivative2 primal_AD2
 
PrimalIdentity0 primal_L0
 
Calculus calculus
 
int verbose
 
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
 
- Data Fields inherited from DGtal::DECImage2D< TKSpace, EigenLinearAlgebraBackend >
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< PrimalForm2g2
 
std::vector< PrimalForm2i2
 
std::vector< PrimalForm2u2
 
PrimalForm0 v0
 
PrimalForm0 former_v0
 
double alpha
 
double lambda
 
double epsilon
 
SolverU solver_u
 
SolverV solver_v
 
PrimalIdentity2 alpha_Id2
 
std::vector< PrimalForm2alpha_g2
 
PrimalIdentity0 left_V0
 
PrimalForm0 l_1
 
PrimalForm0 l_over_e_1
 
PrimalIdentity0 l_over_e_Id0
 
bool metric_average
 

Detailed Description

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

Aim: This class solves a variant of Ambrosio-Tortorelli functional in a plane for u a (vector of) 2-form(s) and v a 0-form. u is a regularized approximation of an input image data g (grey-level or color image), while v represents the set of discontinuities of u. Instead of using \( \epsilon \| \nabla v \|^2 + \frac{1}{4\epsilon}(1-v)^2\) as a penalizer, it uses \( \epsilon^3 \| \Delta v \|^2 + \frac{1}{\epsilon}(1-v)^2\).

Description of template class 'ATVu2v0'

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

Definition at line 77 of file ATVu2v0.h.

Member Typedef Documentation

◆ Base

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

Definition at line 81 of file ATVu2v0.h.

◆ Calculus

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

Definition at line 753 of file DECImageHelpers.h.

◆ Domain

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

Definition at line 752 of file DECImageHelpers.h.

◆ DualAntiderivative1

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

Definition at line 768 of file DECImageHelpers.h.

◆ DualAntiderivative2

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

Definition at line 769 of file DECImageHelpers.h.

◆ DualDerivative0

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

Definition at line 764 of file DECImageHelpers.h.

◆ DualDerivative1

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

Definition at line 765 of file DECImageHelpers.h.

◆ DualHodge0

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

Definition at line 773 of file DECImageHelpers.h.

◆ DualHodge1

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

Definition at line 774 of file DECImageHelpers.h.

◆ DualHodge2

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

Definition at line 775 of file DECImageHelpers.h.

◆ Index

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

Definition at line 755 of file DECImageHelpers.h.

◆ KSpace

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

Definition at line 79 of file ATVu2v0.h.

◆ LinearAlgebra

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

Definition at line 80 of file ATVu2v0.h.

◆ LinearAlgebraSolver

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

Definition at line 123 of file ATVu2v0.h.

◆ Point

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

Definition at line 746 of file DECImageHelpers.h.

◆ PrimalAntiderivative1

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

Definition at line 766 of file DECImageHelpers.h.

◆ PrimalAntiderivative2

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

Definition at line 767 of file DECImageHelpers.h.

◆ PrimalDerivative0

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

Definition at line 762 of file DECImageHelpers.h.

◆ PrimalDerivative1

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

Definition at line 763 of file DECImageHelpers.h.

◆ PrimalForm0

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

Definition at line 756 of file DECImageHelpers.h.

◆ PrimalForm1

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

Definition at line 757 of file DECImageHelpers.h.

◆ PrimalForm2

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

Definition at line 758 of file DECImageHelpers.h.

◆ PrimalHodge0

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

Definition at line 770 of file DECImageHelpers.h.

◆ PrimalHodge1

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

Definition at line 771 of file DECImageHelpers.h.

◆ PrimalHodge2

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

Definition at line 772 of file DECImageHelpers.h.

◆ PrimalIdentity0

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

Definition at line 759 of file DECImageHelpers.h.

◆ PrimalIdentity1

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

Definition at line 760 of file DECImageHelpers.h.

◆ PrimalIdentity2

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

Definition at line 761 of file DECImageHelpers.h.

◆ RealVector

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

Definition at line 747 of file DECImageHelpers.h.

◆ Scalar

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

Definition at line 748 of file DECImageHelpers.h.

◆ SCell

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

Definition at line 749 of file DECImageHelpers.h.

◆ SolverU

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

Definition at line 125 of file ATVu2v0.h.

◆ SolverV

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

Definition at line 127 of file ATVu2v0.h.

◆ Space

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

◆ ~ATVu2v0()

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

Destructor.

◆ ATVu2v0() [1/3]

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

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

Parameters
_verbosespecifies the verbose level (0: silent, 1: more info ... ).

◆ ATVu2v0() [2/3]

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::ATVu2v0 ( const ATVu2v0< TKSpace, TLinearAlgebra > &  other)
delete

Copy constructor.

Parameters
otherthe object to clone.

◆ ATVu2v0() [3/3]

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::ATVu2v0 ( ATVu2v0< TKSpace, TLinearAlgebra > &&  other)
delete

Move constructor.

Parameters
otherthe object to move.

Member Function Documentation

◆ addInput()

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

Adds an input 2-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 associated 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.

◆ BOOST_STATIC_ASSERT()

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::BOOST_STATIC_ASSERT ( (KSpace::dimension==2)  )

◆ checkV()

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
Scalar DGtal::ATVu2v0< 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.

◆ computeSNR()

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
Scalar DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::computeSNR ( ) const

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

See also
addInput).

◆ computeVariation()

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
Scalar DGtal::ATVu2v0< 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).

◆ getAlpha()

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
Scalar DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::getAlpha ( ) const
inline
Returns
the (global) alpha parameter.

Definition at line 279 of file ATVu2v0.h.

279 { return alpha; }
double alpha
Smoothness parameter alpha of AT (in 1/area unit)
Definition: ATVu2v0.h:374

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

◆ getEpsilon()

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
Scalar DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::getEpsilon ( ) const
inline
Returns
the epsilon parameter.

Definition at line 285 of file ATVu2v0.h.

285 { return epsilon; }
double epsilon
Thickness of discontinuity set (in length unit).
Definition: ATVu2v0.h:378

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

◆ getG()

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
const PrimalForm2& DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::getG ( int  i) const
inline
Parameters
ian integer (between 0 and the number of input forms).
Returns
the i-th input g 2-form.

Definition at line 289 of file ATVu2v0.h.

289 { return g2.at( i ); }
std::vector< PrimalForm2 > g2
The g 2-forms.
Definition: ATVu2v0.h:364

References DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::g2.

◆ getLambda()

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
Scalar DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::getLambda ( ) const
inline
Returns
the lambda parameter.

Definition at line 282 of file ATVu2v0.h.

282 { return lambda; }
double lambda
Amount of discontinuity parameter lambda (in 1/length unit).
Definition: ATVu2v0.h:376

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

◆ getU()

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
const PrimalForm2& DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::getU ( int  i) const
inline
Parameters
ian integer (between 0 and the number of input forms).
Returns
the i-th u 2-form.

Definition at line 293 of file ATVu2v0.h.

293 { return u2.at( i ); }
std::vector< PrimalForm2 > u2
The u 2-forms.
Definition: ATVu2v0.h:368

References DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::u2.

◆ getV()

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
const PrimalForm0& DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::getV ( ) const
inline
Returns
the v 0-form.

Definition at line 296 of file ATVu2v0.h.

296 { return v0; }
PrimalForm0 v0
The v 0-form.
Definition: ATVu2v0.h:370

References DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::v0.

◆ init()

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
void DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::init ( Clone< KSpace K)

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

◆ isValid()

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

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.

◆ operator=() [1/2]

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
ATVu2v0& DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::operator= ( ATVu2v0< TKSpace, TLinearAlgebra > &&  other)
delete

Move assignment operator.

Parameters
otherthe object to move.
Returns
a reference on 'this'.

◆ operator=() [2/2]

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
ATVu2v0& DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::operator= ( const ATVu2v0< TKSpace, TLinearAlgebra > &  other)
delete

Copy assignment operator.

Parameters
otherthe object to copy.
Returns
a reference on 'this'.

◆ selfDisplay()

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
void DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

◆ setAlpha() [1/2]

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
void DGtal::ATVu2v0< 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.

◆ setAlpha() [2/2]

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
void DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::setAlpha ( Scalar  _alpha,
const PrimalForm2 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).

◆ setEpsilon()

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
void DGtal::ATVu2v0< 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.

◆ setLambda()

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
void DGtal::ATVu2v0< 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.

◆ setMetricAverage()

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
void DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::setMetricAverage ( bool  average)

Use metric average to smooth L1-metric effects.

◆ setUFromInput()

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
void DGtal::ATVu2v0< 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.

◆ setUFromInputAndMask()

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
void DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::setUFromInputAndMask ( )

Sets approximation u to be equal to the input. Used for initializating u. Should be called once all addInput have been called. Note that it initializes u with random values wherever an inpainting mask was applied.

See also
setAlpha( Scalar _alpha, const PrimalForm2& m )

◆ size0()

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

Definition at line 299 of file ATVu2v0.h.

299 { return v0.myContainer.rows(); }
Container myContainer

References DGtal::KForm< TCalculus, order, duality >::myContainer, and DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::v0.

◆ solveU()

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
bool DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::solveU ( )

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

Returns
'true' iff the solver worked.

◆ solveV()

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
bool DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::solveV ( )

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

Returns
'true' iff the solver worked.

Field Documentation

◆ alpha

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

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

Definition at line 374 of file ATVu2v0.h.

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

◆ alpha_g2

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
std::vector< PrimalForm2 > DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::alpha_g2
protected

alpha g2

Definition at line 388 of file ATVu2v0.h.

◆ alpha_Id2

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
PrimalIdentity2 DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::alpha_Id2
protected

alpha Id2

Definition at line 386 of file ATVu2v0.h.

◆ calculus

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

The discrete exterior calculus instance.

Definition at line 884 of file DECImageHelpers.h.

◆ D0

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

primal derivative: 0-form -> 1-form

Definition at line 890 of file DECImageHelpers.h.

◆ D1

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

primal derivative: 1-form -> 2-form

Definition at line 892 of file DECImageHelpers.h.

◆ delta_v_l1

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

The L1-norm of variation of v.

Definition at line 345 of file ATVu2v0.h.

◆ delta_v_l2

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

The L2-norm of variation of v.

Definition at line 347 of file ATVu2v0.h.

◆ delta_v_loo

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

The Linfinity-norm of variation of v.

Definition at line 349 of file ATVu2v0.h.

◆ dual_D0

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

dual derivative dual 0-form -> dual 1-form

Definition at line 894 of file DECImageHelpers.h.

◆ dual_D1

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

dual derivative dual 1-form -> dual 2-form

Definition at line 896 of file DECImageHelpers.h.

◆ dual_h0

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

hodge star: dual 0-form -> 0-form

Definition at line 904 of file DECImageHelpers.h.

◆ dual_h1

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

hodge star: dual 1-form -> 1-form

Definition at line 906 of file DECImageHelpers.h.

◆ dual_h2

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

hodge star: dual 2-form -> 2-form

Definition at line 908 of file DECImageHelpers.h.

◆ epsilon

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

Thickness of discontinuity set (in length unit).

Definition at line 378 of file ATVu2v0.h.

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

◆ former_v0

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
PrimalForm0 DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::former_v0
protected

The v 0-form at the previous iteration.

Definition at line 372 of file ATVu2v0.h.

◆ g2

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
std::vector< PrimalForm2 > DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::g2
protected

The g 2-forms.

Definition at line 364 of file ATVu2v0.h.

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

◆ i2

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
std::vector< PrimalForm2 > DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::i2
protected

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

Definition at line 366 of file ATVu2v0.h.

◆ l_1

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
PrimalForm0 DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::l_1
protected

lambda 1

Definition at line 392 of file ATVu2v0.h.

◆ l_over_e_1

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
PrimalForm0 DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::l_over_e_1
protected

lambda/epsilon 1

Definition at line 394 of file ATVu2v0.h.

◆ l_over_e_Id0

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
PrimalIdentity0 DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::l_over_e_Id0
protected

lambda/epsilon Id0

Definition at line 396 of file ATVu2v0.h.

◆ lambda

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

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

Definition at line 376 of file ATVu2v0.h.

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

◆ left_V0

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
PrimalIdentity0 DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::left_V0
protected

(lambda / (4*epsilon)) * Id0 + lambda epsilon D0^t D0

Definition at line 390 of file ATVu2v0.h.

◆ M01

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
PrimalDerivative0 DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::M01

point_to_edge average operator

Definition at line 352 of file ATVu2v0.h.

◆ M12

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
PrimalDerivative1 DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::M12

edge_to_face average operator

Definition at line 354 of file ATVu2v0.h.

◆ metric_average

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
bool DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::metric_average
protected

When 'true', use metric average, otherwise use identity.

Definition at line 399 of file ATVu2v0.h.

◆ primal_AD2

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
PrimalAntiderivative2 DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::primal_AD2

Antiderivative 2-form -> to 1-form.

Definition at line 356 of file ATVu2v0.h.

◆ primal_h0

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

hodge star: 0-form -> dual 0-form

Definition at line 898 of file DECImageHelpers.h.

◆ primal_h1

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

hodge star: 1-form -> dual 1-form

Definition at line 900 of file DECImageHelpers.h.

◆ primal_h2

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

hodge star: 2-form -> dual 2-form

Definition at line 902 of file DECImageHelpers.h.

◆ primal_L0

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
PrimalIdentity0 DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::primal_L0

primal laplace operator on 0-forms

Definition at line 358 of file ATVu2v0.h.

◆ solver_u

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

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

Definition at line 381 of file ATVu2v0.h.

◆ solver_v

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

The solver for 0-form v.

Definition at line 383 of file ATVu2v0.h.

◆ u2

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
std::vector< PrimalForm2 > DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::u2
protected

The u 2-forms.

Definition at line 368 of file ATVu2v0.h.

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

◆ v0

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
PrimalForm0 DGtal::ATVu2v0< TKSpace, TLinearAlgebra >::v0
protected

◆ verbose

template<typename TKSpace , typename TLinearAlgebra = EigenLinearAlgebraBackend>
int DGtal::DECImage2D< TKSpace, TLinearAlgebra >::verbose

The verbose level (0: silent).

Definition at line 882 of file DECImageHelpers.h.


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