this is a generic implementation of a guided filter. this version takes no shortcuts and uses both an input and a guided image.
input the input image. to blur a mask, put the actual image hereguide the guide image. to blur a mask, put the mask hereoutput the output imageradius the size of the blur, relative to the input resolutionepsilon the edge threshold