Image Analysis 7 Neighborhood Operations
Image Analysis 7 Neighborhood Operations
Lecture 6
-1 0 +1 72 53 60
-1 0 1 76 56 65
+1 0 -1
-2 0 2 88 78 82
-1 0 1
Given a “kernel” of weights to be Compute the new value of the
centered on the pixel of interest center pixel by “overlaying” the
kernel and computing the
weighted sum
K
-1 0 +1 Y
Location
-1 0 1 (X,Y)
+1 0 -1
72 53 60
-2 0 2 76 56 65
-1 0 1 88 78 82
1 1
g ( x, y ) h(i, j) f ( x i, y j)
j 1i 1
g h f
Reflection of X component
Let M be the width of the image
if x < 0 then
x = -x-1
else if x >= M then
x = 2M-x-1
end
Circular indexing of X
component
Let M be the width of the
image
if x < 0 then
x = x+M
else if x >= M then
x = x-M
end