Performing some kind of non-linear filters on images often induces aliasing, here i implemented the method described in this paper which helps to recover images damaged by some kind of non-linear filters.
It is performed as an adjustment of gradients in some regions that were potentially damaged in the filtered image.
The following images were zoomed to assess the results,
given an original image:
it is applied a non-linear filter (here a thresholding), which leads to an aliased image:
performing anti-aliasing recovery on it gives us the following: