Approximate 1D (1ch) or 2D (1ch, 3ch) signals by L0 gradient minimization.
This is a Python implementation of a paper:
"Image Smoothing via L0 Gradient Minimization" Li Xu, Cewu Lu, Yi Xu, Jiaya Jia ACM Transactions on Graphics, Vol. 30, No. 5 (SIGGRAPH Asia 2011), Dec 2011
For further information, see the author's project page: http://www.cse.cuhk.edu.hk/leojia/projects/L0smoothing/index.html
Public Domain.