1. Spatial filtering
A spatial filter consists of a small neighborhood window (odd edge length) that performs a predefined operation on pixels within a neighborhood (the linear case is the point multiplication sum), and the final result is assigned to the pixel at the center of the neighborhood.
The spatial filter can be divided into two kinds of smoothing spatial filter and sharpening space filter.
1) Smoothing Spatial filter has mean filter, median filter and so on, median filter is non-linear method, and has good effect on salt and pepper noise.
2) Sharpening the spatial filter has the First order differential, second derivative (see "Image local invariance characteristic and description" reading notes (3)--point and Edge detection), non-sharpening masking
The basic formula of one or two-order differential
Non-sharpening masking: Blur original image minus Blur image from original (result becomes template) add template to original
-
a case of mixing two methods :
Need to enhance the detail of an image with a large noise and dark overall
Considering that the 1-order operator has better edge response than 2, and the 2-order operator has better response to detail than the 1-order (but it also brings a lot of noise), the original image is smoothed by 1-order (Sobel) sharpening, as a template (strong response to the edge, weak response to the flat area), and a 2-order (Laplace It is then multiplied with the template to enhance the detail, and finally the result is added to the original image and a power-law transform to get the enhanced images.
2. Using fuzzy sets to do gray-scale transformation and spatial filtering
Fuzzy set will not say, very basic, online a search a lot of
1) Grayscale Transformation
As an example of contrast enhancement, you first need to make a fuzzy rule :
IF a pixel is dark, then make it darker
IF One pixel is gray, then it is still gray
IF One pixel is bright, then make it lighter
Then you need to specify the membership function for the fuzzy variable within the fuzzy rule
Specify a standard output value for each fuzzy variable
such as VD = 0, vg = 127, VB = 255
This allows for a pixel to use the following formula to derive the fuzzy output
2) Spatial filtering
Take an example of a 3*3 neighborhood, where the neighborhood is shown in Figure 2-1
Figure 2-1. neighborhood, di = Zi-z5
Develop fuzzy rules :
IF D2 is 0 and D6 is 0 then Z5 is white
IF d6 is 0 and d8 is 0 then Z5 is white
IF D8 is 0 and D4 is 0 then Z5 is white
IF d4 is 0 and D2 is 0 then Z5 is white
ELSE Z5 is black
The membership function of fuzzy variable 0, white and black by ze, WH and BL respectively
standard output values of white and black are 255, 0
Output formulas similar to those introduced in grayscale transforms are calculated to get results