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