]> git.rustad.me Git - prosjektoppgave/commitdiff
Some more theory
authorBjørn Rustad <bjorn@rustad.me>
Sat, 15 Mar 2014 15:35:33 +0000 (16:35 +0100)
committerBjørn Rustad <bjorn@rustad.me>
Sat, 15 Mar 2014 15:35:33 +0000 (16:35 +0100)
bib.bib
methods.tex
total.tex

diff --git a/bib.bib b/bib.bib
index fb93e210af52afff5a439229b800dd8135787d79..e500e577248eebe4f97d1f8108a1bf7d9a4bf44d 100644 (file)
--- a/bib.bib
+++ b/bib.bib
        organization={IEEE}\r
 }\r
 \r
+@book{weickert1998anisotropic,\r
+       title={Anisotropic diffusion in image processing},\r
+       author={Weickert, Joachim},\r
+       volume={1},\r
+       year={1998},\r
+       publisher={Teubner Stuttgart}\r
+}\r
+\r
 </bibtex>\r
index 7c1a4040cee6e36a1582a27715aa5bf8546c9e8f..227317a4f4302744d944fb29c7ec93decd408239 100644 (file)
@@ -4,7 +4,7 @@
 Gaussian filtering, or Gaussian blur is a straight forward kind of
 method where the image is convolved with the Gaussian function
 \begin{equation}
-    G(x, y) = \frac{1}{2 \pi \sigma^2}\exp\left(-\frac{x^2 +
+    G_\sigma(x, y) = \frac{1}{2 \pi \sigma^2}\exp\left(-\frac{x^2 +
     y^2}{2\sigma^2}\right).
 \end{equation}
 In the discrete case this amounts to setting each pixel value as the
@@ -14,23 +14,68 @@ details from the image.
 
 The Gaussian function is also the fundamental solution of the heat
 equation $\partial_t u = \Delta u$, so convolving with it is equivalent to
-solving the heat equation with the original image as initial condition,
-and boundary conditions \fixme{??}.
+solving the heat equation with the original image as initial value. Care
+must of course be taken on the boundary, and it is normal to
+symmetrically extend the image in all directions.
 
-\subsection{Anistropic diffusion}
+By basic fourier analysis it is possible to show that the Gaussian
+filter is a low-pass filter which attenuates high frequencies
+\fixme{Cite Weickert for example?}
+
+\subsection{Anisotropic diffusion}
 Since the Gaussian filter will blur out both noise and details of the
 image, it would be nice to somehow reduce the amount of blur it adds
-around edges, or what we beleive to be edges, in the image. This can be
-done by controlling the conductivity $a(u)$ of the image in the heat
-equation
+in areas with edges, or what we beleive to be edges, in the image. This
+can be done by controlling the thermal diffusivity $\alpha(u)$ of the
+image in the heat equation
+\begin{equation}
+    \partial_t u = \mathrm{div} \big( a(u) \nabla u\big).
+\end{equation}
+The problem is then, how to detect the edges such that we can reduce
+$\alpha(u)$ in those areas.
+
+Perona and Malik proposed a modified heat equation
+\begin{equation}
+    \partial_t u = \mathrm{div} \left( \frac{\nabla u}{1 +
+    \frac{\abs{\nabla u}^2}{\lambda^2}} \right)
+\end{equation}
+which is actually related to the way brightness is percepted by the
+human visual system. At edges, $\abs{\nabla u}$ is big, and the thermal
+diffusivity will be small, while at already smooth portions of the
+image, the amount of applied smoothing will also be higher. The model
+has some theoretical problems related to well-posedness, for more
+information see \cite{weickert1998anisotropic}.
+
+A different kind of anisotropic diffusion model is the total variation
+flow model which is related to the model considered in this project.
+It can be formulated as
+\begin{equation}
+    \partial_t u = \mathrm{div} \frac{\nabla u}{\abs{\nabla u}}
+\end{equation}
+aaaaaaaaand?
+
+An other approach is to let the thermal diffusivity be a matrix $A(u)$
+in the equation
 \begin{equation}
-    \partial_t u = \mathrm{div} \big( a(u) \nabla u\big)
+    \partial_t u = \mathrm{div} \big(A(u) \cdot \nabla u\big).
 \end{equation}
+This way, it is possible to have a small diffusivity \emph{across}
+edges, and at the same time a big diffusivity \emph{along} the edges.
 
 \subsection{Non-local means}
-Somehow averaging over all the pixels in the image. Has a very good
-method noise.
+The non-local means method of image restoration takes into account the
+fact that two separate parts of an image might be very similar, for
+example in the case of a regular texture. One defines some neighborhood
+for each pixel, and when restoring a pixel, one considers \emph{all}
+other pixels which has similiar neighborhoods as the current pixel, for
+some notion of similiar. One then averages all these pixels to obtain
+the new pixel value. 
 
 \subsection{Other filters}
-Median filter for example.
+A different filter much used in real-world image processing is the
+median filter. It replaces the value of each pixel with the median of
+the values of the surrounding pixels. As with other methods, one has to
+choose what the neighborhood of each pixel should be. It can perform
+very well, especially with salt and pepper noise or images where some
+pixels are missing.
 
index 214073340ac2235185c20a406af4e7e076c3790a..95f9caab6f1a75533abf8b82c5964bc835614663 100644 (file)
--- a/total.tex
+++ b/total.tex
@@ -18,18 +18,23 @@ minimizing the energy function
 \end{equation}
 where $v$ is the original image, and $\Omega$ is the image domain, in
 our case an open subset of $\mathbb{R}^2$. Normally, $p$ is chosen to be
-1 or 2. The model can be grounded on spatial statistics by introducing
+1 or 2.
+
+\subsection{Probabilistic background}
+The model can be grounded on spatial statistics by introducing
 and maximizing the likelihood $p(u \mid v) \cdot p(u)$. This is
-equivalent to minimizing
+equivalent to the formulation
 \begin{equation}
-    -\ln p(u \mid v) - \ln p(u).
+    \min_u \big( - \ln p(u \mid v) - \ln p(u) \big).
 \end{equation}
 If the noise term $p(u \mid v)$ is modeled to be independently and
-identically distributed Gaussian noise on each pixel, we will end up
-with a term proportional to
+identically distributed Gaussian noise on each pixel, we have
+\begin{equation}
+    p(u \mid v) \propto \exp \left( \frac{(u - v)^2}{2\sigma^2} \right)
+\end{equation}
 
-\fixme{Why? Theoretical niceness? Models the real world? There
-    are also other norms describing other noise models?}
+\subsection{Functional analysis}
+\fixme{Meh heading.}
 
 The term $\TV(u)$ is the total variation of the image, and is defined as
 follows: