function d = TV(x) d = .5 * sum(abs(x(:))); return