Debian Codegraph @

tests/inputs/Mathematica_2.wlt

raw
1 (*
2 http://spot.colorado.edu/~sitelic/samplecode/mathematica/imagesfile.html
3 *)
4
5 image = Import["denise.png","PNG"] (* or *)
6
7 image = Import["denise.gif","GIF"]
8
9 A = image[[1,1]]/255.;
10 ListDensityPlot[A,Mesh->False, AspectRatio->Automatic]
11
12 (*
13 -- or --
14 *)
15
16 Show[Graphics[Raster[A]], AspectRatio->Automatic]
17
18
19 blurA = ListConvolve[Table[1/25,{5},{5}],A];
20
21 Show[Graphics[Raster[blurA]], AspectRatio->Automatic]
22 B = Fourier[A];
23
24 (*
25 delete
26 higher frequencies *)
27
28 B[[Range[30,278],All]]=0;
29
30 B[[All,Range[30,202]]]=0;
31
32 Show[Graphics[Raster[ Re[InverseFourier[B]] ]], AspectRatio->Automatic]