9th Lecture - Image Filters CPT 450 Computer Graphics 9th Lecture - Image Filters
Area Processes Spatial Filtering – a pixel’s new value depends on its old value and it’s neighbors old values. New value = weighted average of pixels in the neighboring area, (3x3, 5x5, … pixels) The weights are can be arranged in a matrix 3 x 3, 5 x 5, … This matrix is called the kernel. The process of computing this weighted average is called a convolution integral. Important: Use a copy of the bitmap to avoid mixing new and old values in the weighted average. Edge rows and columns are special cases.
Types of Filters Low Pass High Pass Edge Detection
Low Pass Analogous to low pass filter in electronics. Constant regions unchanged Changing regions (edges) are smoothed or blurred. Sum of kernel coefficients = 1 Symmetrical about center point
High Pass Analogous to high pass filter in electronics. Constant regions unchanged Changing regions (edges) are enhanced or emphasized. Sum of kernel coefficients = 1 Symmetrical about center point
Edge Detection Constant regions become black Changing regions (edges) become white. Sum of kernel coefficients = 0 Laplacian - symmetrical about center point. detects edges in any orientation Prewitt Gradient – detects edges in specific directions