33 #if defined(ATu2v0_RECURSES)
34 #error Recursive header files inclusion detected in ATu2v0.h
35 #else // defined(ATu2v0_RECURSES)
37 #define ATu2v0_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 >
140 ATu2v0(
int _verbose = 1 );
201 template <
typename Image,
typename Function>
204 bool perfect_data =
false );
359 std::vector< PrimalForm2 >
g2;
361 std::vector< PrimalForm2 >
i2;
363 std::vector< PrimalForm2 >
u2;
414 template <
typename TKSpace,
typename TLinearAlgebra>
416 operator<< ( std::ostream & out, const ATu2v0<TKSpace, TLinearAlgebra> & object );
429 #endif // !defined ATu2v0_h
431 #undef ATu2v0_RECURSES
432 #endif // else defined(ATu2v0_RECURSES)
double epsilon
Thickness of discontinuity set (in length unit).
Calculus::PrimalHodge0 PrimalHodge0
PrimalDerivative1 M12
edge_to_face average operator
const PrimalForm2 & getG(int i) const
void selfDisplay(std::ostream &out) const
void setEpsilon(Scalar _epsilon)
PrimalAntiderivative2 primal_AD2
Antiderivative 2-form -> to 1-form.
PrimalForm0 v0
The v 0-form.
DECImage2D< TKSpace, TLinearAlgebra > Base
std::vector< PrimalForm2 > i2
The ideal input 2-forms (for snr computation).
Calculus::DualHodge0 DualHodge0
std::vector< PrimalForm2 > u2
The u 2-forms.
Scalar delta_v_loo
The Linfinity-norm of variation of v.
ATu2v0 & operator=(const ATu2v0 &other)=delete
Calculus::PrimalDerivative0 PrimalDerivative0
DualDerivative0 dual_D0
dual derivative dual 0-form -> dual 1-form
Aim: This class solves Ambrosio-Tortorelli functional in a plane for u a (vector of) 2-form(s) and v ...
Scalar delta_v_l1
The L1-norm of variation of v.
PrimalIdentity0 left_V0
(lambda / (4*epsilon)) * Id0 + lambda epsilon D0^t D0
Calculus::DualDerivative1 DualDerivative1
void addInput(const Image &image, const Function &f, bool perfect_data=false)
PrimalDerivative0 M01
point_to_edge average operator
double lambda
Amount of discontinuity parameter lambda (in 1/length unit).
Calculus::PrimalAntiderivative1 PrimalAntiderivative1
SolverU solver_u
The solver for every 2-form u[i].
PrimalIdentity2 alpha_Id2
alpha Id2
Aim: This class simplifies the development of 2D image processing tools using discrete exterior calcu...
Calculus::PrimalHodge1 PrimalHodge1
PrimalHodge2 primal_h2
hodge star: 2-form -> dual 2-form
void setMetricAverage(bool average)
Use metric average to smooth L1-metric effects.
DualDerivative1 dual_D1
dual derivative dual 1-form -> dual 2-form
SolverV solver_v
The solver for 0-form v.
RealVector::Component Scalar
DualHodge0 dual_h0
hodge star: dual 0-form -> 0-form
PrimalForm0 l_1_over_4
lambda 1/4 1
TLinearAlgebra LinearAlgebra
std::vector< PrimalForm2 > alpha_g2
alpha g2
Calculus::PrimalHodge2 PrimalHodge2
Scalar getEpsilon() const
Calculus::DualAntiderivative2 DualAntiderivative2
Calculus::PrimalForm2 PrimalForm2
const PrimalForm0 & getV() const
Calculus::PrimalIdentity2 PrimalIdentity2
void setLambda(Scalar _lambda)
Calculus::DualAntiderivative1 DualAntiderivative1
void init(Clone< KSpace > K)
Scalar computeVariation()
unsigned int size0() const
Space::RealVector RealVector
Calculus::PrimalForm1 PrimalForm1
DiscreteExteriorCalculus< 2, 2, LinearAlgebra > Calculus
PrimalForm0 l_1_over_4e
lambda 1/(4*epsilon) 1
DualHodge1 dual_h1
hodge star: dual 1-form -> 1-form
std::vector< PrimalForm2 > g2
The g 2-forms.
Calculus::DualHodge2 DualHodge2
DiscreteExteriorCalculusSolver< Calculus, LinearAlgebraSolver, 2, PRIMAL, 2, PRIMAL > SolverU
Calculus::PrimalIdentity1 PrimalIdentity1
Calculus::PrimalDerivative1 PrimalDerivative1
Calculus::DualHodge1 DualHodge1
void setUFromInputAndMask()
DiscreteExteriorCalculusSolver< Calculus, LinearAlgebraSolver, 0, PRIMAL, 0, PRIMAL > SolverV
BOOST_STATIC_ASSERT((KSpace::dimension==2))
LinearAlgebra::SolverSimplicialLLT LinearAlgebraSolver
int verbose
The verbose level (0: silent).
PrimalForm0 former_v0
The v 0-form at the previous iteration.
Calculus::PrimalIdentity0 PrimalIdentity0
Calculus calculus
The discrete exterior calculus instance.
double alpha
Smoothness parameter alpha of AT (in 1/area unit)
const PrimalForm2 & getU(int i) const
PrimalIdentity0 l_1_over_4e_Id0
lambda 1/(4_epsilon) Id0
PrimalHodge0 primal_h0
hodge star: 0-form -> dual 0-form
Calculus::DualDerivative0 DualDerivative0
Calculus::PrimalAntiderivative2 PrimalAntiderivative2
DualHodge2 dual_h2
hodge star: dual 2-form -> 2-form
PrimalDerivative0 D0
primal derivative: 0-form -> 1-form
static const constexpr Dimension dimension
PrimalDerivative1 D1
primal derivative: 1-form -> 2-form
void setAlpha(Scalar _alpha)
PrimalHodge1 primal_h1
hodge star: 1-form -> dual 1-form
bool metric_average
When 'true', use metric average, otherwise use identity.
Scalar delta_v_l2
The L2-norm of variation of v.
Calculus::PrimalForm0 PrimalForm0
HyperRectDomain< Space > Domain
RealVector::Component Scalar
Scalar computeSNR() const
Computes the SNR of u wrt ideal input (should have been given.