1. A method of correcting an artifact in a captured image, comprising: generating, by a computing device, a binary map corresponding to the artifact in the captured image; generating, by the computing device, a luminance mask from the binary map, the luminance mask applying a level of correction near an edge of the artifact that is different from a level of correction applied at the center of the artifact; generating, by the computing device, a chrominance mask to correct a color of the artifact, and performing, by the computing device, corrections to pixels according to the luminance and the chrominance masks.