heightmap_interpolation.inpainting.tv_inpainter module
- class heightmap_interpolation.inpainting.tv_inpainter.TVInpainter(**kwargs)
Bases:
FDPDEInpainterInpainter minimizing Total Variation
- amplitude(g)
- get_config()
- neps(g)
- step_fun(f, mask=None)
- supports_direct_solver = False
Abstract base class for Finite-Differences Partial Differential Equation (FDPDE) Inpainters
Common interphase for PDE-based inpainting methods. Solves the problem using finite differences in a gradient-descent manner.
- dt
Gradient descent step size.
- Type:
float
- term_check_iters
Check the relative change between iterations of the optimizer every this number of iterations.
- Type:
int
- term_thres
Stop the optimization when the energy descent between iterations is less than
- Type:
float
- max_iters
Maximum number of iterations for the optimizer.
- Type:
int
- relaxation
Over-relaxation parameter. It is still under testing, use with care.
- Type:
float
- mgs_levels
Number of levels of detail to use in the Mult-Grid Solver (MGS). Setting it to 1 deactivates the MGS.
- Type:
int
- mgs_min_res
minimum resolution (width or height) allowed for a level in the MGS. If the level of detail in the pyramid gets to a value lower than this, the pyramid construction will stop.
- Type:
int
- print_progress
Print information about the progress of the optimization on screen.
- Type:
bool
- print_progress_iters
If print_progress==True, the information will be printed every this number of iterations.
- Type:
int
- init_with
initializer for the unknown data before applying the optimization.
- Type:
str
- convolver_type
the convolver used for all the convolutions required by the solver.
- Type:
str
- debug_dir
a debug directory where the intermediate steps will be rendered. Useful to create a video of the evolution of the solver.
- Type:
str
- use_direct_solver
if True, solve as a sparse linear system instead of time-stepping (only valid for linear PDEs).
- Type:
bool
- direct_solver
sparse solver to use when use_direct_solver=True. Either ‘cg’ (conjugate gradient, for SPD systems) or ‘minres’ (for symmetric indefinite). Default: ‘cg’.
- Type:
str