# Anti-aliasing a fractal-like bitmap image

I have a .bmp image 9600x5400 that shows a lot of points at various intensities. There are no lines inside this picture - only a lot of points. I would like to apply anti-aliasing on the image to make it smoother (and more beautiful).

Can Mathematica help me on that?

-
For such a large image, you might want to try "out-of-core" functions such as ImageFileFilter. – Silvia Mar 31 '14 at 22:42
Thank you @Silvia. Could you post an answer on this? – tchronis Mar 31 '14 at 22:44
I would love to, but I'm not sure how to realize an anti-aliasing effect.. – Silvia Mar 31 '14 at 22:49
Here is a poorman's anti-aliasing. For your dots image, I might also want to try CurvatureFlowFilter. – Silvia Mar 31 '14 at 23:10
Yes @DeusDeceit it is a map of Greece + Turkey + Balkans! The rest to 9600x5400 is the whole world. – tchronis Apr 3 '14 at 18:07

You know noisy financial stocks behaviour can be modeled with fractals? Meaning one is the other ;-) So how do you filter one from the other?..

Wavelets can sometimes pick up just the right sort of noise to smooth so it leaves meaningful information mostly untouched.

i = Import["http://i.stack.imgur.com/FzHKm.jpg"];

• Perform DiscreteWaveletTransform - play with choice of wavelet - we pick CDFWavelet
• Threshold wavelet coefficients - play how - we do "SmoothGarrote"
• Synthesize smoothed image using InverseWaveletTransform and compare with original:

Here it is:

dwd = DiscreteWaveletTransform[i, CDFWavelet[]];
thr = WaveletThreshold[dwd, "SmoothGarrote"]
{Image[InverseWaveletTransform[thr], ImageSize -> All], Image[i, ImageSize -> All]}


In this specific case we got lucky and got an impressive result I think. Note - execute on your machine - images you see are a screenshot - it's like listening music through the wall, - but in this case pretty thin wall I guess.

If result would be not that good play with the bold play parts ;-)

Don't ask how it works "exactly" - we both would need read up on wavelets ;-)

Example is taken from Documentation.

-
Thank you for your answer this seems very interesting. I will try to apply it in my Huge picture using also Silvia's hint on ImageFileFilter. – tchronis Apr 1 '14 at 6:50
@tchronis if the meaningful feature scales are much less than image size then you can also just cut the image - ImagePartition, filter pieces via say ParallelMap, and then ImageAssemble. – Vitaliy Kaurov Apr 1 '14 at 7:07