derived directly from the pseudo-code of the paper: Fast Guided Filter by Kaiming He, Jian Sun available at https://arxiv.org/abs/1505.00996