Debian Codegraph @

tests/inputs/issues/296/Mathematica_1.m

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