Computer Vision MT25, Filtering


Flashcards

Suppose we are creating a new image $g$ from a source image $f$ by a filtering operation. The general setup is that

\[g(x, y) = F(N(x, y))\]

where $N$ is some neighbourhood of $(x, y)$. @Define a simple blur.


\[F(N) = \frac{1}{|N|} \sum _ {(u, v) \in N}f(u, v)\]

Suppose we are creating a new image $g$ from a source image $f$ by a filtering operation. The general setup is that

\[g(x, y) = F(N(x, y))\]

where $N$ is some neighbourhood of $(x, y)$. @Define a Gaussian blur.


\[F(N) = \frac{1}{\sum _ {(u, v) \in N} w(u, v)} \sum _ {(u, v) \in N} w(u, v)f(u, v)\]

where

\[w(u, v) = e^{-\frac{(x - u)^2 + (y-v)^2}{2\sigma^2}}\]

Suppose we are creating a new image $g$ from a source image $f$ by a filtering operation. The general setup is that

\[g(x, y) = F(N(x, y))\]

where $N$ is some neighbourhood of . @Define a bilateral filter. What’s the intuition behind this?


\[F(N) = \frac{1}{\sum _ {(u, v) \in N} w(u, v)} \sum _ {(u, v) \in N} w(u, v)f(u, v)\]

where

\[\begin{aligned} w(u, v) &= w _ g(u, v) w _ s(u, v) \\ w _ g(u, v) &= e^{-\frac{(x - u)^2 + (y-v)^2}{2\sigma^2 _ g}} \\ w _ s(u, v) &= e^{-\frac{(f(u, v) - f(x, y)^2)}{2\sigma^2 _ s}} \end{aligned}\]

The intuition is that there are now two factors affecting how important a pixel is to the averaging operation:

  • How close it is to the pixel under consideration
  • How similar it is to the pixel under consideration

@Visualise the difference between a bilateral filter and a Gaussian filter applied to the same image.


Suppose we are creating a new image $g$ from a source image $f$ by a filtering operation. The general setup is that

\[g(x, y) = F(N(x, y))\]

where $N$ is some neighbourhood of $(x, y)$. In this setup, how does a Gaussian blur work?


\[F(N) = \frac{1}{\sum _ {(u, v) \in N} w(u, v)} \sum _ {(u, v) \in N} w(u, v)f(u, v)\]

where

\[w(u, v) = e^{-\frac{(x - u)^2 + (y-v)^2}{2\sigma^2}}\]

@Visuaslise the difference between an image filtered via a simple blur versus a Gaussian blur.


Suppose

What $f$ would be if $f \ast g$ corresponded to a $3 \times 3$ box blur?


\[f = \frac 1 9 \begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \\ \end{bmatrix}\]

@Visualise the effect of median filtering

\[F(N) = \text{median} _ {(u, v) \in N} \, f(u, v)\]

on an image. In what common circumstance is median filtering useful?


Median filtering is useful for outlier removal.




Related posts