F(x, y)
G(x, y)
Correlation filtering – uniform weights
2k + 1 * 2k + 1;
G[i, j] = 1/(2k + 1)^2 ΣΣF[i + u, j + v]
Loop over all pixels in neighborhood around image pixel F[i,j]
nonuniform weights
Now generalize to allow different wieghts depending on neighboring pixel’s relative position:
G[i, j] = ΣΣH[u, v]F[i+u, j+v]
This is called cross-correlation, denoted G = HF
averaging filter -> box filter
Blurry spot as a function
To blur a single pixel into a “blurry” spot, we would need to filter the spot with something that looks like a blurry spot – higher value in the middle, falling off to the edges.