paws function

Adaptive weigths smoothing using patches