Image Processing Reference
In-Depth Information
So our smoothed picture looks like:
0
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9
10
11
12
0
0
0
0
0
0
0
0
0
0
133
141
147
150
144
135
124 124
131
0
140
145
149
150
141
130
119 123
132
0
143
148
150
150
138
125
118 125
136
0
144
148
150
147
134
125
122 130
140
0
144
147
147
141
131
127
130 138
144
smooth =
0
146
148
146
136
129
129
137 142
144
0
146
148
142
131
127
133
142 144
141
0
144
147
139
126
126
134
142 143
138
0
143
145
134
122
124
135
143 141
134
0
141
142
132
121
124
132
141 139
136
0
140
137
128
120
122
127
134 134
134
0
136
130
122
118
121
125
130 131
133
(b)
(a)
This is equivalent to convolving a template which has all elements set to unity and then
dividing the result by the sum of the template coefficients. A general form of an averaging
template operator (which can accept any template size) is
ave(pic,winsize):=
new
zero(pic)
half floor winsize
2
!
for x half..cols(pic)-half-1
for y half..rows(pic)-half-1
winsize-1
winsize-1
pic
(winsize winsize)
new
floor
y+iwin-half,x+jwin-half
iwin=0
jwin=0
y,x
new
So let's apply it: smooth:=ave(eye,3)
With result:
Search WWH ::




Custom Search