A method of filtering a digital image is described. A filter kernel is applied to a respective pixel in a set of pixels to smooth noise and preserve spatial frequencies associated with image edges in the digital image in accordance with a first filtering parameter. The filter kernel is a function of the respective pixel and has a closed form for the respective pixel. The filter kernel includes contributions from a first set of neighboring pixels and has a content-dependent normalization such that a sum of elements in the filter kernel equals a substantially fixed value.