270 likes | 406 Views
Chapter 9. Spatial Filters Blurring Median Filtering Hi-pass filtering SpatialFilterFrame and JAI. Blurring=Low-pass Filters. Why Blur an Image?. Remove Noise Other ideas?. Average=low-pass. Want Unity Gain. Many variations on LP filters. Gaussian Blur. Why use Gaussian Blur?.
E N D
Chapter 9 • Spatial Filters • Blurring • Median Filtering • Hi-pass filtering • SpatialFilterFrame and JAI
Why Blur an Image? • Remove Noise • Other ideas?
Why use Gaussian Blur? • How the eye works • Symmetric • Differentiable • Smooth
Median Filtering • Middle of a list of samples listed in ascending order. • Sort samples, return n/2
Why use median filtering? • Discard outliers • 0, 85, 90, 87 and 100. The mean is 72 • Median is 87. • {0, 85, 87, 90, and 100}=87
Median Filtering is not FREE! • Image degradation • Selective median filtering. • How do you know when to apply it?
Coefficient of variation public static boolean outlierHere(int a[]) { return ( coefficientOfVariation(a) > .4); }
Before and After 3x3 Median Filtering with Outlier Detection
Defining HP Kernels public void hp1() { float k[][] = { { 0, -1, 0}, {-1, 10, -1}, { 0, -1, 0} }; Mat.normalize(k); convolve(k); }
Project ideas Integrate the Kernels of math.Mat2.Kernels into the MDI interface. Use j2d.ImageUtils.convolution to implement your operations