8
$\begingroup$

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

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

1 Answer 1

13
$\begingroup$

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["https://i.sstatic.net/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.

$\endgroup$
2
  • $\begingroup$ 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. $\endgroup$ Commented Apr 1, 2014 at 6:50
  • 1
    $\begingroup$ @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. $\endgroup$ Commented Apr 1, 2014 at 7:07

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.