Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

enter image description here

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

1 Answer 1

up vote 11 down vote accepted

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]}

enter image description here

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.

share|improve this answer
    
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 at 6:50
1  
@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 at 7:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.