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.