33 #if defined(ATu0v1_RECURSES)
34 #error Recursive header files inclusion detected in ATu0v1.h
35 #else // defined(ATu0v1_RECURSES)
37 #define ATu0v1_RECURSES
47 #include "DGtal/math/linalg/EigenSupport.h"
48 #include "DGtal/base/Common.h"
49 #include "DGtal/dec/DiscreteExteriorCalculus.h"
50 #include "DGtal/dec/DiscreteExteriorCalculusSolver.h"
51 #include "DGtal/dec/DiscreteExteriorCalculusFactory.h"
52 #include "DECImageHelpers.h"
72 template <
typename TKSpace,
73 typename TLinearAlgebra = EigenLinearAlgebraBackend >
136 ATu0v1(
int _verbose = 1 );
197 template <
typename Image,
typename Function >
200 bool perfect_data =
false );
341 std::vector< PrimalForm0 >
g0;
343 std::vector< PrimalForm0 >
i0;
345 std::vector< PrimalForm0 >
u0;
393 template <
typename TKSpace,
typename TLinearAlgebra>
395 operator<< ( std::ostream & out, const ATu0v1<TKSpace, TLinearAlgebra> & object );
408 #endif // !defined ATu0v1_h
410 #undef ATu0v1_RECURSES
411 #endif // else defined(ATu0v1_RECURSES)
std::vector< PrimalForm0 > u0
The u 0-forms.
void setEpsilon(Scalar _epsilon)
Calculus::PrimalHodge0 PrimalHodge0
PrimalIdentity1 l_L1
lambda * edge laplacien
DiscreteExteriorCalculusSolver< Calculus, LinearAlgebraSolver, 0, PRIMAL, 0, PRIMAL > SolverU
double alpha
Smoothness parameter alpha of AT (in 1/area unit)
std::vector< PrimalForm0 > g0
The g 0-forms.
PrimalIdentity1 left_V1
epsilon * lambda * edge laplacien + (lambda / (4*epsilon)) * Id1
std::vector< PrimalForm0 > alpha_g0
alpha g0
Calculus::DualHodge0 DualHodge0
ATu0v1 & operator=(const ATu0v1 &other)=delete
Calculus::PrimalDerivative0 PrimalDerivative0
DualDerivative0 dual_D0
dual derivative dual 0-form -> dual 1-form
Scalar computeVariation()
BOOST_STATIC_ASSERT((KSpace::dimension==2))
Calculus::DualDerivative1 DualDerivative1
Scalar getEpsilon() const
double lambda
Amount of discontinuity parameter lambda (in 1/length unit).
void setAlpha(Scalar _alpha)
Aim: This class simplifies the development of 2D image processing tools using discrete exterior calcu...
const PrimalForm0 & getG(int i) const
Calculus::PrimalHodge1 PrimalHodge1
PrimalHodge2 primal_h2
hodge star: 2-form -> dual 2-form
DualDerivative1 dual_D1
dual derivative dual 1-form -> dual 2-form
PrimalIdentity0 alpha_Id0
alpha Id0
DiscreteExteriorCalculusSolver< Calculus, LinearAlgebraSolver, 1, PRIMAL, 1, PRIMAL > SolverV
DualHodge0 dual_h0
hodge star: dual 0-form -> 0-form
TLinearAlgebra LinearAlgebra
RealVector::Component Scalar
Calculus::PrimalHodge2 PrimalHodge2
void addInput(const Image &image, const Function &f, bool perfect_data=false)
Calculus::PrimalForm2 PrimalForm2
Calculus::PrimalIdentity2 PrimalIdentity2
double epsilon
Thickness of discontinuity set (in length unit).
PrimalForm1 v1
The v 1-form.
PrimalIdentity1 L1
edge laplacien
PrimalForm1 l_1_over_4e
lambda 1/(4*epsilon) 1
Space::RealVector RealVector
Calculus::PrimalForm1 PrimalForm1
Scalar delta_v_loo
The Linfinity-norm of variation of v.
DiscreteExteriorCalculus< 2, 2, LinearAlgebra > Calculus
unsigned int size0() const
unsigned int size1() const
void selfDisplay(std::ostream &out) const
DualHodge1 dual_h1
hodge star: dual 1-form -> 1-form
Calculus::DualHodge2 DualHodge2
LinearAlgebra::SolverSimplicialLLT LinearAlgebraSolver
Calculus::PrimalIdentity1 PrimalIdentity1
void setLambda(Scalar _lambda)
Calculus::PrimalDerivative1 PrimalDerivative1
SolverU solver_u
The solver for every 0-form u[i].
Calculus::DualHodge1 DualHodge1
PrimalForm1 former_v1
The v 1-form at the previous iteration.
int verbose
The verbose level (0: silent).
DECImage2D< TKSpace, TLinearAlgebra > Base
Calculus::PrimalIdentity0 PrimalIdentity0
PrimalForm1 l_1_over_4
lambda 1/4 1
Calculus calculus
The discrete exterior calculus instance.
const PrimalForm1 & getV() const
std::vector< PrimalForm0 > i0
The ideal input 0-forms (for snr computation).
PrimalHodge0 primal_h0
hodge star: 0-form -> dual 0-form
Calculus::DualDerivative0 DualDerivative0
Aim: This class solves Ambrosio-Tortorelli functional in a plane for u a (vector of) 0-form(s) and v ...
DualHodge2 dual_h2
hodge star: dual 2-form -> 2-form
Scalar delta_v_l1
The L1-norm of variation of v.
PrimalDerivative0 D0
primal derivative: 0-form -> 1-form
const PrimalForm0 & getU(int i) const
Scalar delta_v_l2
The L2-norm of variation of v.
SolverV solver_v
The solver for 1-form v.
static const constexpr Dimension dimension
PrimalDerivative1 D1
primal derivative: 1-form -> 2-form
void init(Clone< KSpace > K)
PrimalHodge1 primal_h1
hodge star: 1-form -> dual 1-form
Scalar computeSNR() const
Computes the SNR of u wrt ideal input (should have been given.
Calculus::PrimalForm0 PrimalForm0
HyperRectDomain< Space > Domain
RealVector::Component Scalar