
322 Feature Extraction and Image Processing
apply(pic):= for x 0..cols(pic)Ð1 Address the whole picture
for y 0..rows(pic)Ð1
newpic
y,x
floor
(|ln(pic
y,x
+0.000001)|) Apply a function (log)
newpic Output the picture
So let’s try it out: new_pic:=apply(eye)
012345678910
55 57 10 35 35 26 26 15 55 12 24
15 10 19 35 21 26 26 55 55 15 24
19 26 26 32 32 35 57 57 57 19 24
19 24 26 35 35 26 55 54 57 19 25
19 26 26 32 30 16 57 55 15 19 33
26 26 26 35 29 10 55 17 15 25 35
27 26 22 30 16 55 12 26 26 26 26
26 21 35 32 10 55 19 19 26 26 16
16 25 40 21 55 9 19 27 26 21 57
57 26 35 10 55 55 17 29 21 19 15
12 32 30 10 55 55 22 29 21 58 15
17 29 16 10 10 54 15 19 21 19 16
17 25