Skip to content
Snippets Groups Projects
notions.tex 7.55 KiB
Newer Older
even's avatar
even committed
\section{Base notions}

\subsection{Blurred segment}

even's avatar
even committed
Our work relies on the notion of digital straight line as classically
defined in the digital geometry literature \cite{KletteRosenfeld04}.
even's avatar
even committed
Only the 2-dimensional case is considered here.

\begin{definition}
even's avatar
even committed
A digital line $\mathcal{L}$ with integer parameters $(a,b,c,\nu)$ is the set
even's avatar
even committed
of points $P(x,y)$ of $\mathbb{Z}^2$ that satisfy : $0 \leq ax + by - c < \nu$.
\end{definition}

even's avatar
even committed
The parameter $\nu$ is the arithmetic width of the digital line.
even's avatar
even committed
When $\nu = max (|a|, |b|)$, $\mathcal{L}$ is the narrowest 8-connected
even's avatar
even committed
line and is called a naive line.
even's avatar
even committed

\begin{definition}
even's avatar
even committed
A blurred segment $\mathcal{B}$ of assigned width $\varepsilon$ is a set
even's avatar
even committed
of points in $\mathbb{Z}^2$ that all belong to a digital line of
arithmetical width $\varepsilon$.
even's avatar
even committed
\end{definition}

even's avatar
even committed
Linear time algorithms have been developed to recognize a blurred segment
even's avatar
even committed
of assigned width $\varepsilon$ \cite{DebledAl05,Buzer07}.
even's avatar
even committed
They are based on an incremental growth of the convex hull of the blurred
segment when adding each point successively.
even's avatar
even committed
The minimal width $\mu$ of the blurred segment $\mathcal{B}$ is the
arithmetical width of the narrowest digital straight line that contains
$\mathcal{B}$.
It is also the minimal width of the convex hull, that is computed by
Melkman's algorithm \cite{Melkman87}.
The extension of the blurred segment with a new input point is thus
controlled by the recognition test $\mu < \varepsilon$.
even's avatar
even committed

\begin{figure}[h]
\center
even's avatar
even committed
  \input{Fig_notions/bswidth}
  \caption{A growing blurred segment $\mathcal{B}$ :
when adding the new point $P'$, the blurred segment minimal width augments
from $\mu$ to $\mu '$; if the new width $\mu '$ exceeds the assigned width
$\varepsilon$, then the new input point is rejected.}
even's avatar
even committed
  \label{fig:bs}
\end{figure}

even's avatar
even committed
At the beginning, a large width $\varepsilon_{ini}$ is assigned to the
even's avatar
even committed
recognition problem to allow the detection of large blurred segments.
Then, when extending the blurred segment, this assigned width is
gradually decremented to reach the detected blurred segment minimal width.
even's avatar
even committed

\subsection{Directional scan}

even's avatar
even committed
A directional scan is a partition of a digital straight line $\mathcal{S}$,
called the {\it scan strip}, into naive straight line segments $\mathcal{L}_i$,
that are orthogonal to $\mathcal{S}$. The segments, called {\it scan lines},
are developed on each side of a central scan line $\mathcal{S}_0$, and labelled
with their manhattan distance ($d_1 = |d_x| + |d_y|$) to $\mathcal{L}_0$ and
even's avatar
even committed
a positive (resp.  negative) sign if their are on the left (resp. right)
even's avatar
even committed
of $\mathcal{L}_0$.

\begin{figure}[h]
\center
  %\begin{picture}(300,40)
  %\end{picture}
  \input{Fig_notions/fig}
  \caption{Example of directional scan.}
  \label{fig:ds}
\end{figure}

The directional scan can be defined by its central scan line $\mathcal{L}_0$.
even's avatar
even committed
If $A(x_A,y_A)$ and $B(x_B,y_B)$ are the end points of this scan line,
the scan strip is defined by :

\centerline{
even's avatar
even committed
$\mathcal{S}(A,B) = \mathcal{D}(a, b, c, \nu)$, with
even's avatar
even committed
$\left\{ \begin{array}{l}
a = x_B - x_A \\
b = y_B - y_A \\
\nu = 1 + |c_2 - c_1| \\
c = min (c_1, c_2)
\end{array} \right.$
}
\noindent
where $c_1 = a\cdot x_A + b\cdot y_A$ and $c_2 = a\cdot x_B + b\cdot y_B$.

even's avatar
even committed
The scan line $\mathcal{L}_i(A,B)$ is then defined by :
even's avatar
even committed

\centerline{
even's avatar
even committed
$\mathcal{L}_i(A,B) = \mathcal{S}(A,B) \cap \mathcal{D}(a', b', c', \nu')$, with
even's avatar
even committed
$\left\{ \begin{array}{l}
even's avatar
even committed
a' = y_B - y_A \\
b' = x_A - x_B \\
\nu' = max (|a'|,|b'|) \\
c' = a'\cdot x_A + b'\cdot y_A + i \cdot \nu'
even's avatar
even committed
\end{array} \right.$
}

The scan lines length is $d_\infty(AB)$ or $d_\infty(AB)-1$, where $d_\infty$
is the chessboard distance ($d_\infty = max (|d_x|,|d_y|)$).
In practice, this difference of length between scan lines is not a drawback,
as the image bounds should also be processed anyway.

even's avatar
even committed
The directional scan can also be defined by its central point $C(x_C,y_C)$,
its direction $\vec{D}(x_D,y_D)$ and its width $w$ :

\centerline{
even's avatar
even committed
$\mathcal{S}(C,\vec{D},w) = \mathcal{D}(a, b, c, \nu)$, with
even's avatar
even committed
$\left\{ \begin{array}{l}
a = y_D \\
b = -x_D \\
\nu = w \\
c = a\cdot x_C + b\cdot y_C - w / 2
\end{array} \right.$
}

even's avatar
even committed
and the scan line $\mathcal{L}_i(A,B)$ by :
even's avatar
even committed

\centerline{
even's avatar
even committed
$\mathcal{L}_i(C,\vec{D},w) =
\mathcal{S}(C,\vec{D},w) \cap \mathcal{D}(a', b', c', \nu')$, with
even's avatar
even committed
$\left\{ \begin{array}{l}
a' = x_D \\
b' = y_D \\
\nu' = max (|a'|,|b'|) \\
c' = a'\cdot x_C + b'\cdot y_C - w / 2 + i\cdot w
\end{array} \right.$
}
even's avatar
even committed

\subsection{Adaptive directional scan}

even's avatar
even committed
We try to detect a blurred segment  inside a directional scan which position
and orientation are given by the user, or defined in arbitrary direction in
unsupervised mode.
Most of the times, the detection stops where the segment escapes sideways
froms the scan strip.
Therefore a second search is run again using an other directional scan aligned
on the detected segment.
But we only have an estimation of this blurred segment direction, and the
longer the real segment, the higher the probability to fail again on a
blurred segment escape from the directional scan.
even's avatar
even committed

even's avatar
even committed
\begin{figure}[h]
\center
  \begin{picture}(300,40)
  \end{picture}
  \caption{Example of early detection failures
           on side escapes from the directional scan.}
  \label{fig:sideEscapes}
\end{figure}
even's avatar
even committed

even's avatar
even committed
Even in ideal situation where the detected segment is a perfect line,
its width is never null as a result of the discretization process.
The estimated direction accuracy is mostly constrained by the length of
the detected segment.
To avoid these side escapes, the scan should not be a linear strip but
rather a conic shape to take into account the blurred segment preimage.
% Of course this problem is amplified when ideal BS are considered.
% -> FAUX : c'est relativement plus penalisant sur 1 BS reduit a 2 pts
% que sur un BS qu'on n'autorise pas a s'elargir.
This side shift is amplified when we let the blurred segment the capacity 
to get thicker in order to capture possible noisy features.
The assigned width is then still greater than the detected minimal width,
so that the segment can move within the directional scan.
Knowing the detected BS shape and the image size, it is possible to
define a conic scan area, but this solution is computationaly expensive
because it leads to useless exploration of large image areas.

\begin{figure}[h]
\center
  %\begin{picture}(300,40)
  %\end{picture}
  \input{Fig_notions/bscone}
  \caption{Possible extension area based
           on the detected blurred segment preimage.}
  \label{fig:cone}
\end{figure}
even's avatar
even committed

even's avatar
even committed
The solution implemented in the former work was to let some arbitrary
margin between the scan strip width and the assigned width to the detection,
and to perform two fine detection steps, using for each of them the direction
found at the former step.
This process could be itered as long as the blurred segment escapes from
the directional scanner using as any detection steps as necessary.
But it produces a useless computational coast, because of the margin left,
but also the multiple detection of the same segment start points.
even's avatar
even committed

even's avatar
even committed
\begin{figure}[h]
\center
  \begin{picture}(300,40)
  \end{picture}
  \caption{Example of blurred segment detection
           using an adaptive directional scan.}
  \label{fig:adaptiveScan}
\end{figure}
even's avatar
even committed

even's avatar
even committed
The solution we propose here is to dynamically adapt the scan direction
on the detection result. At each position, the scan strip is updated
using the BS direction and minimal width computed at the former position,
that is :
\[\mathcal{S}_i = \mathcal{L}_0 \cup \mathcal{D}_{i-1}\]
even's avatar
even committed