Image cleaning - How to remove line art from a colored image? I have a set of line art drawings, which I have cleaned and colored (flood fill). I want to remove the original line art from the images and to leave only the colors.

This image illustrates pretty much what I want:

All of my line art is of a solid black, without anti-aliasing, and at high resolution. The resulting image has all black pixels replaced by nearby colored pixels. Colored pixels from the original image are left untouched.

I made a rough Python program to generate the "after" image. Notice that the colors are offset to the right and bottom of the original black areas (which causes distortion of my shapes when the line art has varying width). Also, my program is very slow; hence, I'm looking for a smarter solution to this problem.

Edit: An algorithm similar to those used to compute the morphological skeleton of the image's black pixels will greatly improve this operation.
I have a couple of solutions, but I have not test either of them for you image.

I. Use simple neighrest neighber interpolation, i.e.


sweep through whole pixels,
Check if the ith pixel is black (threshold it, or get its HSV transform,
whatever)
if it's black, substitute colour values of its nearest non-black
neighborer, in the pixel.


II. Using Medial filter,

Simple apply a medial filter on the image, but do not count black pixels when applying on each window of image.