1. A processor-implemented method for applying a filter to an image, the method comprising: selecting a first region of the image; generating an initial histogram of pixel intensity values in the first region, wherein the histogram includes N bins; identifying a first bin as a bin having a greatest count of pixel intensity values; identifying a left bin as a closest bin to the left of the first bin in the histogram that has a count that is less than a first count percentage of the greatest count; identifying a right bin as a closest bin to the right of the first bin in the histogram that has a count that is less than a second count percentage of the greatest count; generating an updated histogram of pixel intensity values having a range between the identified left bin and identified right bin; fitting a Gaussian curve onto the updated histogram; and applying a filter to the image based on parameters of the Gaussian curve.