1. A method comprising: receiving an image, the image comprising a plurality of pixels with each pixel including a pixel value; selecting a pixel to be processed; determining an edge weight and a spatial weight associated with the selected pixel, wherein at least the spatial weight is determined with a spatial kernel; and processing the image with at least the edge weight and the spatial weight.