Remove scratches from a picture.
This program is a derivation of my previous program saltAndPepper.
I made it to improve a colored picture of mine that had some scratches.
It takes the color at the upper left corner and treats that as a key,
then it scans the entire picture replacing the key with a neighbor color.
The resulting picture is not perfect, but it is clean enough for the intended purpose.
Thanks to my friend Robert Lopes, that kindly explained to me the salt and pepper noise reduction algorithm.
Use:
cleanUpMyPortrait marked.png clean.png