Filter / convolution function
\ [h [x, y]
= \ sum \ limits_ {k, l} {f [k, l] I [x + k, y + l]} \] where, \ (the I \) represents a pixel corresponding to the point, \ (F (X, Y) \) is the filter function, \ (K, L \) at any point of sweep scan window (convolution) of.
In the process of convolution, the padding should be noted that, depending on the type of padding may be roughly divided into: zero-padding, replication (copying border), Reflection (mirror) and wraparound (block copy)
The different functions, the function \ (f (x, y) \) functions are not the same.
Image enhancement:
1. smoothing / denoising
filter parameters is 1, and the size of the core is an odd number \ ((2n-1) \
cdot (2n-1) \) common filter:
* Smoothing mean filter / convolution, usually \ (. 3 \ cdot3 \) , STEP =. 1, ZERO-padding
* Smoothing median filter / convolution, generally \ ((2N-. 1) \ CDOT (2N-. 1) \) , STEP =. 1, the pixels in the convolution kernel in ascending order of the value of the convolution takes as an output, the algorithm can effectively remove salt and pepper noise
* Smoothing Gaussian filter / convolution, generally \ ((2N-. 1) \ CDOT (2N-. 1) \) , an analog of the human eye, the central region of interest, effectively remove Gaussian noise
EG:
\ [{G} _ {{\ sigma}} = \ frac {1 } {2 \ pi {{\ sigma} ^ {2}}} {{e} ^ {- \ frac {{{x} ^ {2}} + {{y} ^ { 2}}} {2 {{ \ sigma} ^ {2}}}}} \]
0.003 | 0.013 | 0.022 | 0.013 | 0.003 |
0.013 | 0.059 | 0.097 | 0.059 | 0.013 |
0.022 | 0.097 | 0.159 | 0.097 | 0.022 |
0.013 | 0.059 | 0.097 | 0.059 | 0.013 |
0.003 | 0.013 | 0.022 | 0.013 | 0.003 |
Wherein, \ (\ Sigma \) smaller, more focused on the region of interest; the contrary, \ (\ Sigma \) larger, the dispersion region of interest.
$ $
Left \ (\ Sigma. 1 = \) , the right \ (\ sigma = 4 \)
For a Gaussian smoothing filter having a good symmetry can be split into a Gaussian cascade, such as 2D convolution, the convolution is divided into two separable 1D is the same, namely:
\ [{G} _ {{ \ sigma}} = \ frac { 1} {2 \ pi {{\ sigma} ^ {2}}} {{e} ^ {- \ frac {{{x} ^ {2}} + {{y} ^ {2}}} {2 { {\ sigma} ^ {2}}}}} = \ frac {1} {\ sqrt {2 \ pi} \ sigma} {{e} ^ {- \ frac {{{x } ^ {2}}} { 2 {{\ sigma} ^ {2}}}}} \ frac {1} {\ sqrt {2 \ pi} \ sigma} {{e} ^ {- \ frac {{{ y} ^ {2}}} {2 {{\ sigma} ^ {2}}}}} \]
$ $
2D Gaussian converted to the product of two Gaussian kernel 1D
2. Gradient / Sharpening
Information extraction, detection; edge, salient points, texture; mode
* Gradient Prewitt filter / convolution
1. gradient horizontal / vertical edge
2. The vertical gradient / horizontal edge
* Gradient Sobel filter / convolution
1. gradient horizontal / vertical edge
2. The vertical gradient / horizontal edge
* Gradient Laplacian filter / convolution
\ [\ Delta f = \ frac {{{\ partial} ^ {2f}}} {\ partial {{x} ^ {2}}} + \ frac {{{\ partial} ^ {2f}}} {\ partial {{y} ^ {2
}}} \] may be used to detect pellet edge detection and