Remove scratches with Despeckle

Having reviewed the code, I’m convinced the output difference is due to the preview being scaled down vs the original. The problem is what to do about it…

I’ve considered updating the filter to be based on percentage of image dimensions, but that could break things for other people using it (it’s a very old filter). Breaking backward compatibility is a last resort for me!

So how about a new or alternative filter? Well, looking at your examples I think there’s much more to it than at first glance - there are probably two reasons it fails on the full scale image; the image flaws are more difficult to cleanly mask as detail increases, plus the inpaint algorithm is one of the most basic available and probably won’t look good either.

We have quite a long history of attempts to solve this sort of problem, some of which can be seen in https://discuss.pixls.us/t/scanned-image-scratch-removal-with-ice/2350

This probably sounds like avoiding work (maybe some truth :slight_smile: ), but my only advice can be to try a different approach or filter - there are lots, because it’s a hard problem. Creating a good mask of the flaws is the difficult part in your example.

1 Like