`gimp-plugin-interpolate' is an interpolation plugin for the GIMP. It works by doing plane/curve fitting and calculating weighted averages. It takes samples from a grid of pixels from 'known' image areas, trying to fit a plane or a curve to each, and then uses those samples to estimate the 'unknown' image areas.
Here is an example image:
From left to right, top to bottom, you can see: the original image, the final image, the selection, and the input mask. The selection contains all the white spots because we want to paint on them. The input mask contains everything except the duck, because we don't want the duck's dark colors to affect what we paint on the spots.