An image without use of a flash is taken, along with an image using a flash. A
difference image is generated by subtracting the flash-less image from the flash
image. A threshold is applied to the difference image such that only large differences
in intensity remain in the difference image. This artifact image is then subtracted
from the flash image, thereby removing flash artifacts such as specular reflections
and red-eye. The threshold used may be automatically calculated or may be set by
the user. For some applications it may be desirable to set separate thresholds
for each dimension of the color space (such as red, green, and blue) used. Once
again these separate thresholds may be automatically calculated or may be set by
the user.