3.4 Fundamentals of Spatial Filtering: Filter
3.4 Fundamentals of Spatial Filtering: Filter
3.4 Fundamentals of Spatial Filtering: Filter
• Coef cients
• Linear Filtering vs
Nonlinear Filtering
(e.g., median ltering)
fi
fi
• Coef cients
• Linear Filtering vs
Nonlinear Filtering
(e.g., median ltering)
fi
fi
3.4 Fundamentals of Spatial Filtering
- Spatial Filtering at the Edges
At the edges of an image we are missing pixels to
form a neighbourhood
Replicate Padding
Mirror Padding
Convolution
3.4 Fundamentals of Spatial Filtering
- Spatial Correlation and Convolution
discrete impulse of
strength (amplitude) A
3.4 Fundamentals of Spatial Filtering
- Spatial Correlation and Convolution
Correlation Convolution
rotated version exactly copy
of the kernel at of the kernel at
the location of the location of
the impulse the impulse
3.4 Fundamentals of Spatial Filtering
- Spatial Correlation and Convolution
δ(x − 2, y − 2)
Correlation Convolution
rotated version exactly copy
of the kernel at of the kernel at
the location of the location of
the impulse the impulse
3.4 Fundamentals of Spatial Filtering
- Spatial Correlation and Convolution
Correlation Convolution
rotated version exactly copy
of the kernel at of the kernel at
the location of the location of
the impulse the impulse
fi
fi
m x n kernel 1 x n vector
m x 1 vector
3x3
11x11 21x21
fi
fi