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

even's avatar
even committed
\label{sec:notions}

even's avatar
even committed
\subsection{Blurred segment}

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

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

even's avatar
even committed
In the following, we note $\delta(\mathcal{L}) = b/a$ the slope of
digital line $\mathcal{L}$, $w(\mathcal{L}) = \nu$ its arithmetical width,
even's avatar
even committed
$h(\mathcal{L}) = c$ its {\it shift} to origin, and
even's avatar
even committed
$p(\mathcal{L}) = max(|a|,|b|)$ its period (i.e. the length of its
periodic pattern).
even's avatar
even committed
When $\nu = p(\mathcal{L})$, then $\mathcal{L}$ is the narrowest 8-connected
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 $\mathcal{L}$
of arithmetical width $w(\mathcal{L}) = \varepsilon$.
even's avatar
even committed
\end{definition}

A linear-time algorithm to recognize a blurred segment of assigned width
$\varepsilon$ \cite{DebledAl05} is used in the work.
even's avatar
even committed
It is based on an incremental growth of the convex hull of the blurred
even's avatar
even committed
segment when adding each point $P_i$ 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}$.
even's avatar
even committed
%It is also the minimal width of the convex hull of $\mathcal{B}$,
%that can be computed by Melkman's algorithm \cite{Melkman87}.
The enclosing digital segment $E(\mathcal{B})$ is the section of this
optimal digital straight line bounded by the end points of $\mathcal{B}$.
even's avatar
even committed
As depicted on \RefFig{fig:bs},
the extension of the blurred segment $\mathcal{B}_{i-1}$ of assigned width
even's avatar
even committed
$\varepsilon$ and minimal width $\mu_{i-1}$ at step $i-1$ with a new input
point $P_i$ is thus controlled by the recognition test $\mu_i < \varepsilon$.
even's avatar
even committed

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

even's avatar
even committed
Associated to this primitive, the following definition of a directional scan
also based on digital straight lines is also used in this work.
even's avatar
even committed

even's avatar
even committed
\subsection{Directional scan}

even's avatar
even committed
\begin{definition}
even's avatar
even committed
A directional scan $DS$ is an ordered partition restricted to the image
even's avatar
even committed
domain $\mathcal{I}$ of a digital straight line $\mathcal{D}$, called the
{\it scan strip}, into scans $S_i$, each of them being a segment of a naive
line $\mathcal{N}_i$, called a {\it scan line}, orthogonal to $\mathcal{D}$.
even's avatar
even committed
\end{definition}

\begin{equation}
even's avatar
even committed
DS = \left\{ S_i = \mathcal{D} \cap \mathcal{N}_i \cap \mathcal{I}
\left| \begin{array}{l}
\delta(\mathcal{N}_i) = - \delta^{-1}(\mathcal{D}) \\
even's avatar
even committed
\wedge~ h(\mathcal{N}_i) = h(\mathcal{N}_{i-1}) + p(\mathcal{D})
even's avatar
even committed
\end{array} \right. \right\}
even's avatar
even committed
%S_i = \mathcal{D} \cap \mathcal{N}_i, \mathcal{N}_i \perp \mathcal{D}
\end{equation}
even's avatar
even committed
In this definition, the clause
even's avatar
even committed
$\delta(\mathcal{N}_i) = - \delta^{-1}(\mathcal{D})$
expresses the othogonality constraint between the scan lines $\mathcal{N}_i$
and the scan strip $\mathcal{D}$.
Then the shift of the period $p(\mathcal{D})$ between successive scans
guarantees that all points of the scan strip are travelled one and only one
time.

The scans $S_i$ are developed on each side of a start scan $S_0$,
and ordered by their distance to the start line $\mathcal{N}_0$ with
even's avatar
even committed
a positive (resp. negative) sign if they are on the left (resp. right)
even's avatar
even committed
side of $\mathcal{N}_0$ (\RefFig{fig:ds}).
even's avatar
even committed
The directional scan is iterately parsed from the start scan to both ends.
even's avatar
even committed
At each iteration $i$, the scans $S_i$ and $S_{-i}$ are successively processed.
even's avatar
even committed

\begin{figure}[h]
\center
even's avatar
even committed
%  \input{Fig_notions/fig}
  \includegraphics[width=0.8\textwidth]{Fig_notions/scanstrip.eps}
     \begin{picture}(1,1)(0,0)
     \thicklines
even's avatar
even committed
     \put(-176,112){\vector(2,-1){30}}
     \put(-90,19){\vector(-2,1){30}}
     {\color{dwhite}{
       \put(-181,114.5){\circle*{10}}
       \put(-84,16.5){\circle*{10}}
       \put(-16,102.5){\circle*{10}}
       \put(-132,66.5){\circle*{12}}
       \put(-72,96.5){\circle*{12}}
       \put(-175.5,65.5){\circle*{20}}
       \put(-117,10.5){\circle*{14}}
       \put(-54,32.5){\circle*{14}}
       \put(-161,10.5){\circle*{20}}
     }}
even's avatar
even committed
     \put(-88,13.5){$A$}
     \put(-185,111.5){$B$}
even's avatar
even committed
     \put(-20,98){$\mathcal{D}$}
even's avatar
even committed
     \put(-137,64){\color{blue}{$S_0$}}
     \put(-77,94){\color{red}{$S_8$}}
     \put(-183,64){\color{dgreen}{$S_{-5}$}}
     \put(-123,8){\color{blue}{$\mathcal{N}_0$}}
     \put(-60,30){\color{red}{$\mathcal{N}_8$}}
     \put(-169,8){\color{dgreen}{$\mathcal{N}_{-5}$}}
even's avatar
even committed
     \end{picture}
even's avatar
even committed
  \caption{A directional scan.
           The start scan $S_0$ is drawn in blue, odd scans in green,
           even scans in red, the bounds of scan lines $\mathcal{N}_i$
           with plain lines and the bounds of scan strip $\mathcal{D}$
           with dotted lines.}
even's avatar
even committed
  \label{fig:ds}
\end{figure}

even's avatar
even committed
A directional scan can be defined by its start scan $S_0$.
even's avatar
even committed
If $A(x_A,y_A)$ and $B(x_B,y_B)$ are the end points of $S_0$,
even's avatar
even committed
and if we note $\delta_x = x_B - x_A$, $\delta_y = y_B - y_A$,
$c_1 = \delta_x\cdot x_A + \delta_y\cdot y_A$,
$c_2 = \delta_x\cdot x_B + \delta_y\cdot y_B$ and
$\nu_{AB} = max (|\delta_x|, |\delta_y|)$, it is then defined by
the following scan strip $\mathcal{D}^{A,B}$ and scan lines
$\mathcal{N}_i^{A,B}$:
\begin{equation}
even's avatar
even committed
\left\{ \begin{array}{l}
\mathcal{D}^{A,B} =
\mathcal{L}(\delta_x,~ \delta_y,~ min (c1,c2),~ 1 + |c_1-c_2|) \\
\mathcal{N}_i^{A,B} = \mathcal{L}(\delta_y,~ -\delta_x,~
even's avatar
even committed
\delta_y\cdot x_A - \delta_x\cdot y_A + i\cdot \nu_{AB},~ \nu_{AB})
even's avatar
even committed
\end{array} \right.
\end{equation}
even's avatar
even committed

even's avatar
even committed
%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

A directional scan can also be defined by its central point $C(x_C,y_C)$,
even's avatar
even committed
its direction $\vec{D}(X_D,Y_D)$ and its width $w$. If we note
even's avatar
even committed
$c_3 = x_C\cdot Y_D - y_C\cdot X_D$,
$c_4 = X_D\cdot x_C + Y_D\cdot y_C$,
$\nu_{\vec{D}} = max (|X_D|,|Y_D|)$,
it is then defined by
even's avatar
even committed
the following scan strip $\mathcal{D}^{C,\vec{D},w}$ and scan lines
$\mathcal{N}_i^{C,\vec{D},w}$:
\begin{equation}
even's avatar
even committed
\left\{ \begin{array}{l}
\mathcal{D}^{C,\vec{D},w}
= \mathcal{L}(Y_D,~ -X_D,~ c_3 - w / 2,~ w) \\
\mathcal{N}_i^{C,\vec{D},w} = \mathcal{L}(X_D,~ Y_D,~
even's avatar
even committed
               c_4 - w / 2 + i\cdot w,~ \nu_{\vec{D}}
even's avatar
even committed
\end{array} \right.
\end{equation}