Linear Filters
- Averaging filter: Smooth an image by replacing each pixel by the average of its neighboring pixels

- The filter matrix (kernel) $H$ moves over the original image $I$ to compute the convolution operation
- In general a scale is needed to obtain a normalized filter
- Integer coefficient is preferred to avoid floating point operations
- For a filter of size (2K+1) x (2L+1), if the image size is $M\times N$, the filter is computed over the range:

- Boundaries:
- Leave margins that are not processed (smaller size)
- Pad images (same size)
- Linear filter in Adobe photoshop:

Convolution operation



Gaussian Filter
- rotationally symmetric (for large filters)
- filter weights decrease monotonically from central peak, giving most weight to central pixels
- Simple and intuitive relationship between size of $\sigma$ and the smoothing
- Convolution of a Gaussian with itself is another Gaussian
- so we can first smooth an image with a small Gaussian
- then, we convolve that smoothed image with another small Gaussian and the result is equivalent to smoother the original image with a larger Gaussian
- If we smooth an image with a Gaussian having sd $\sigma$ twice, then we get the same result as smoothing the image with a Gaussian having standard deviation (2$\sigma$)
- $G_{\sigma_1} * G_{\sigma_2} = G_{\sqrt{\sigma_1^2 + \sigma_2^2}}$