Skip to content
Snippets Groups Projects
Commit 82f71b08 authored by even's avatar even
Browse files

Article: notions revisited

parent 83d82ad0
No related branches found
No related tags found
No related merge requests found
Article/Fig_notions/adaptionBounds_full.png

36.7 KiB

Article/Fig_notions/adaptionBounds_zoom.png

12.5 KiB

Article/Fig_notions/adaptionLines_full.png

32.2 KiB

Article/Fig_notions/adaptionLines_zoom.png

9.46 KiB

...@@ -9,13 +9,13 @@ ...@@ -9,13 +9,13 @@
\put(82.5,31){\circle*{3}} \put(82.5,31){\circle*{3}}
\put(90,36){\circle*{3}} \put(90,36){\circle*{3}}
\put(100,36){\circle*{3}} \put(100,36){\circle*{3}}
\put(69,35){$\mathcal{B}_i$} \put(66,37){$\mathcal{B}_{i-1}$}
\put(110,30){\circle{3}} \put(110,30){\circle{3}}
\put(112,21){$P_{i+1}$} \put(112,21){$P_i$}
\put(140,36){\vector(0,1){10}} \put(140,36){\vector(0,1){10}}
\put(140,62.66){\vector(0,-1){10}} \put(140,62.66){\vector(0,-1){10}}
\put(129,56){$\mu_i$} \put(120,58){$\mu_{i-1}$}
\put(160,30){\vector(0,1){10}} \put(160,30){\vector(0,1){10}}
\put(160,60){\vector(0,-1){10}} \put(160,60){\vector(0,-1){10}}
\put(164,39){$\mu_{i+1}$} \put(164,36){$\mu_i$}
\end{picture} \end{picture}
Article/Fig_notions/escapeFirst_full.png

37.4 KiB

Article/Fig_notions/escapeFirst_zoom.png

3.37 KiB

...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
@inproceedings{LuAl15, @inproceedings{LuAl15,
title = {CannyLines: A parameter-free line segment detector}, title = {CannyLines: a parameter-free line segment detector},
author = {Lu, Xiaohu and Yao, Jian and Li, Kai and Li, Li}, author = {Lu, Xiaohu and Yao, Jian and Li, Kai and Li, Li},
booktitle = {International Conference on Image Processing (ICIP)}, booktitle = {International Conference on Image Processing (ICIP)},
publisher = {IEEE}, publisher = {IEEE},
......
...@@ -20,8 +20,9 @@ to better fit to the discrete nature of most of todays data to process. ...@@ -20,8 +20,9 @@ to better fit to the discrete nature of most of todays data to process.
In particular, the notion of blurred segment \cite{DebledAl05,Buzer07} was In particular, the notion of blurred segment \cite{DebledAl05,Buzer07} was
introduced to cope with the image noise or other sources of imperfections introduced to cope with the image noise or other sources of imperfections
from the real world by the mean of a width parameter. from the real world by the mean of a width parameter.
Efficient algorithms were designed to recognize these digital objects in It is well suited to reflect the required edge quality information.
binary images. Moreover efficient algorithms have already been designed to recognize
these digital objects in binary images.
The present work aims at designing a flexible tool to detect blurred segments The present work aims at designing a flexible tool to detect blurred segments
with optimal width and orientation in gray-level images for as well with optimal width and orientation in gray-level images for as well
...@@ -69,7 +70,7 @@ accuracy. ...@@ -69,7 +70,7 @@ accuracy.
It results that more steps would inevitably be necessary to process higher It results that more steps would inevitably be necessary to process higher
resolution images. resolution images.
\subsection{Main contritions} \subsection{Main contributions}
The work presented in this paper aims at solving both former mentioned The work presented in this paper aims at solving both former mentioned
drawbacks through two main contributions: drawbacks through two main contributions:
......
...@@ -14,37 +14,40 @@ is the set of points $P(x,y)$ of $\mathbb{Z}^2$ that satisfy : ...@@ -14,37 +14,40 @@ is the set of points $P(x,y)$ of $\mathbb{Z}^2$ that satisfy :
$0 \leq ax + by - c < \nu$. $0 \leq ax + by - c < \nu$.
\end{definition} \end{definition}
The parameters of the digital line are its slope $b/a$, its height $c$ In the following, we note $\delta(\mathcal{L}) = b/a$ the slope of
and its arithmetic width $\nu$. The set of points is organized as a digital line $\mathcal{L}$, $w(\mathcal{L}) = \nu$ its arithmetical width,
periodic pattern of length $p = (|a|, |b|)$. $h_P(\mathcal{L}) = c - ax - by$ its {\it shift} to point $P(x,y)$,
When $\nu = p$, $\mathcal{L}$ is the narrowest 8-connected line $h_0(\mathcal{L}) = c$ its {\it shift} to origin, and
$p(\mathcal{L}) = max(|a|,|b|)$ its period (i.e. the length of its
periodic pattern).
When $\nu = p$, then $\mathcal{L}$ is the narrowest 8-connected line
and is called a naive line. and is called a naive line.
\begin{definition} \begin{definition}
A blurred segment $\mathcal{B}$ of assigned width $\varepsilon$ is a set A blurred segment $\mathcal{B}$ of assigned width $\varepsilon$ is a set
of points in $\mathbb{Z}^2$ that all belong to a digital line of of points in $\mathbb{Z}^2$ that all belong to a digital line of
arithmetical width $\varepsilon$. arithmetical width $\nu = \varepsilon$.
\end{definition} \end{definition}
A linear-time algorithm to recognize a blurred segment of assigned width A linear-time algorithm to recognize a blurred segment of assigned width
$\varepsilon$ \cite{DebledAl05} is used in the work. $\varepsilon$ \cite{DebledAl05} is used in the work.
It is based on an incremental growth of the convex hull of the blurred It is based on an incremental growth of the convex hull of the blurred
segment when adding each point successively. segment when adding each point $P_i$ successively.
The minimal width $\mu$ of the blurred segment $\mathcal{B}$ is the The minimal width $\mu$ of the blurred segment $\mathcal{B}$ is the
arithmetical width of the narrowest digital straight line that contains arithmetical width of the narrowest digital straight line that contains
$\mathcal{B}$. $\mathcal{B}$.
It is also the minimal width of the convex hull of $\mathcal{B}$, It is also the minimal width of the convex hull of $\mathcal{B}$,
that can be computed by Melkman's algorithm \cite{Melkman87}. that can be computed by Melkman's algorithm \cite{Melkman87}.
The extension of the blurred segment $\mathcal{B}_i$ of assigned width The extension of the blurred segment $\mathcal{B}_{i-1}$ of assigned width
$\varepsilon$ and minimal width $\mu_i$ at step $i$ with a new input point $\varepsilon$ and minimal width $\mu_{i-1}$ at step $i-1$ with a new input
$P_{i+1}$ is thus controlled by the recognition test $\mu_{i+1} < \varepsilon$. point $P_i$ is thus controlled by the recognition test $\mu_i < \varepsilon$.
\begin{figure}[h] \begin{figure}[h]
\center \center
\input{Fig_notions/bswidth} \input{Fig_notions/bswidth}
\caption{A growing blurred segment $\mathcal{B}_i$ : \caption{A growing blurred segment $\mathcal{B}_i$ :
when adding the new point $P_{i+1}$, the blurred segment minimal width when adding the new point $P_i$, the blurred segment minimal width
augments from $\mu_i$ to $\mu_{i+1}$; if the new width $\mu_{+1}$ exceeds augments from $\mu_{i-1}$ to $\mu_i$; if the new width $\mu_i$ exceeds
the assigned width $\varepsilon$, then the new input point is rejected.} the assigned width $\varepsilon$, then the new input point is rejected.}
\label{fig:bs} \label{fig:bs}
\end{figure} \end{figure}
...@@ -54,22 +57,34 @@ following way. ...@@ -54,22 +57,34 @@ following way.
At the beginning, a large width $\varepsilon_0$ is assigned to the At the beginning, a large width $\varepsilon_0$ is assigned to the
recognition problem to allow the detection of large blurred segments. recognition problem to allow the detection of large blurred segments.
Then, when no more aumentation of the minimal width is observed as the Then, when no more aumentation of the minimal width is observed as the
segment grows ($\mu_{i+\lambda} = \mu_i$), the assigned width is fixed segment grows ($\mu_{i+\lambda} = \mu_i$), the assigned width is set at
to the observed minimal width in order to avoid the incorporation of a near value to the observed minimal width in order to avoid the
spurious outliers in further parts of the segment. incorporation of spurious outliers in further parts of the segment.
\subsection{Directional scan} \subsection{Directional scan}
A directional scan is a partition of a digital straight line $\mathcal{D}$, A directional scan $DS$ is an ordered partition restricted to the image
called the {\it scan strip}, into scans $S_i$, each of them being a domain $\mathcal{I}$ of a digital straight line $\mathcal{D}$,
segment of a naive line $\mathcal{S}_i$ orthogonal to $\mathcal{D}$. called the {\it scan strip}, into scans $S_i$, each of them being a segment
of a naive line $\mathcal{N}_i$ orthogonal to $\mathcal{D}$.
\begin{equation} \begin{equation}
S_i = \mathcal{D} \cap \mathcal{S}_i, \mathcal{S}_i \perp \mathcal{D} DS = \left\{ S_i = \mathcal{D} \cap \mathcal{N}_i \cap \mathcal{I} |
\delta(\mathcal{N}_i) = - \delta^{-1}(\mathcal{D})
\cap h_0(\mathcal{N}_i) = h_0(\mathcal{N}_{i-1}) + p(\mathcal{D}) \right\}
%S_i = \mathcal{D} \cap \mathcal{N}_i, \mathcal{N}_i \perp \mathcal{D}
\end{equation} \end{equation}
The scans $S_i$ are developed on each side of a central scan $S_0$, In this expression, the clause
and labelled with their manhattan distance ($d_1 = |d_x| + |d_y|$) to $\delta(\mathcal{N}_i) = - \delta^{-1}(\mathcal{D})$
the central line $\mathcal{S}_0$ and a positive (resp. negative) sign expresses the othogonality constraint between the scan lines $\mathcal{N}_i$
if they are on the left (resp. right) side of $\mathcal{S}_0$. 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
a positive (resp. negative) sign if they are on the left (resp. right)
side of $\mathcal{N}_0$.
\begin{figure}[h] \begin{figure}[h]
\center \center
...@@ -78,7 +93,7 @@ if they are on the left (resp. right) side of $\mathcal{S}_0$. ...@@ -78,7 +93,7 @@ if they are on the left (resp. right) side of $\mathcal{S}_0$.
\label{fig:ds} \label{fig:ds}
\end{figure} \end{figure}
A directional scan can be defined by its central scan $S_0$. A directional scan can be defined by its start scan $S_0$.
If $A(x_A,y_A)$ and $B(x_B,y_B)$ are the end points of $S_0$, If $A(x_A,y_A)$ and $B(x_B,y_B)$ are the end points of $S_0$,
the scan strip is defined by : the scan strip is defined by :
\begin{equation} \begin{equation}
...@@ -88,17 +103,17 @@ the scan strip is defined by : ...@@ -88,17 +103,17 @@ the scan strip is defined by :
where $\delta_x = x_B - x_A, \delta_y = y_B - y_A, where $\delta_x = x_B - x_A, \delta_y = y_B - y_A,
c_1 = a\cdot x_A + b\cdot y_A$ and $c_2 = a\cdot x_B + b\cdot y_B$. c_1 = a\cdot x_A + b\cdot y_A$ and $c_2 = a\cdot x_B + b\cdot y_B$.
The scan line $\mathcal{S}_i$ is then defined by : The scan line $\mathcal{N}_i$ is then defined by :
\begin{equation} \begin{equation}
\mathcal{S}_i(A,B) = \mathcal{L}(\delta_y, -\delta_x, \mathcal{N}_i(A,B) = \mathcal{L}(\delta_y, -\delta_x,
\delta_y\cdot x_A - \delta_X\cdot y_A + i\cdot \nu_{AB}, \nu_{AB}) \delta_y\cdot x_A - \delta_X\cdot y_A + i\cdot \nu_{AB}, \nu_{AB})
\end{equation} \end{equation}
where $\nu_{AB} = max (|\delta_x|, |\delta_y|)$ where $\nu_{AB} = max (|\delta_x|, |\delta_y|)$
The scan lines length is $d_\infty(AB)$ or $d_\infty(AB)-1$, where $d_\infty$ %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|)$). %is the chessboard distance ($d_\infty = max (|d_x|,|d_y|)$).
In practice, this difference of length between scan lines is not a drawback, %In practice, this difference of length between scan lines is not a drawback,
as the image bounds should also be processed anyway. %as the image bounds should also be processed anyway.
A directional scan can also be defined by its central point $C(x_C,y_C)$, A 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$. The scan strip is : its direction $\vec{D}(x_D,y_D)$ and its width $w$. The scan strip is :
...@@ -108,86 +123,98 @@ its direction $\vec{D}(x_D,y_D)$ and its width $w$. The scan strip is : ...@@ -108,86 +123,98 @@ its direction $\vec{D}(x_D,y_D)$ and its width $w$. The scan strip is :
\end{equation} \end{equation}
\noindent \noindent
and the scan line $\mathcal{S}_i(C,\vec{D},w)$ : and the scan line $\mathcal{N}_i(C,\vec{D},w)$ :
\begin{equation} \begin{equation}
\mathcal{S}_i(C,\vec{D},w) = \mathcal{L}(x_D, y_D, \mathcal{N}_i(C,\vec{D},w) = \mathcal{L}(x_D, y_D,
x_D\cdot x_C + y_D\cdot y_C - w / 2 + i\cdot w, max (|x_D|,|y_D|) x_D\cdot x_C + y_D\cdot y_C - w / 2 + i\cdot w, max (|x_D|,|y_D|)
\end{equation} \end{equation}
\subsection{Adaptive directional scan} \subsection{Adaptive directional scan}
The blurred segment is searched inside a directional scan which position The blurred segment is searched within a directional scan which position
and orientation are given by the user, or defined in arbitrary direction in and orientation are given by the user, or defined in arbitrary direction in
unsupervised mode. unsupervised mode.
Most of the times, the detection stops where the segment escapes sideways Most of the times, the detection stops where the segment escapes sideways
froms the scan strip. froms the scan strip (\RefFig{fig:escape}).
Therefore a second search is run again using an other directional scan aligned Therefore a second search is run again using a second directional scan aligned
on the detected segment. on the detected segment.
But only an estimation of this blurred segment direction is provided, But only a quantized estimation of this blurred segment direction is given,
and the longer the real segment, the higher the probability to fail again and the longer the real segment, the higher the probability to fail again
on a blurred segment escape from the directional scan. on a blurred segment escape from the directional scan.
\begin{figure}[h] \begin{figure}[h]
\center \center
\begin{picture}(300,40) \begin{tabular}{c}
\end{picture} \includegraphics[width=0.49\textwidth]{Fig_notions/escapeFirst_zoom.png}
\end{tabular}
\caption{Example of early detection failures \caption{Example of early detection failures
on side escapes from the directional scan.} on side escapes from the directional scan.}
\label{fig:sideEscapes} \label{fig:escape}
\end{figure} \end{figure}
Even in ideal situation where the detected segment is a perfect line, %Even in ideal situation where the detected segment is a perfect line,
its width is never null as a result of the discretization process. %its width is never null as a result of the discretization process.
The estimated direction accuracy is mostly constrained by the length of %The estimated direction accuracy is mostly constrained by the length of
the detected segment. %the detected segment.
To avoid these side escapes, the scan should not be a linear strip but %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. %rather a conic shape to take into account the blurred segment preimage.
% Of course this problem is amplified when ideal BS are considered. %This side shift is amplified in situations where the blurred segment is
% -> FAUX : c'est relativement plus penalisant sur 1 BS reduit a 2 pts %left free to get thicker in order to capture possible noisy features.
% que sur un BS qu'on n'autorise pas a s'elargir. %The assigned width is then still greater than the detected minimal width,
This side shift is amplified in situations where the blurred segment is %so that the segment can move within the directional scan.
left free to get thicker in order to capture possible noisy features. %Knowing the detected blurred segment shape and the image size, it is
The assigned width is then still greater than the detected minimal width, %possible to define a conic scan area, but this solution is computationaly
so that the segment can move within the directional scan. %expensive because it leads to useless exploration of large image areas.
Knowing the detected blurred segment shape and the image size, it is %
possible to define a conic scan area, but this solution is computationaly %\begin{figure}[h]
expensive because it leads to useless exploration of large image areas. %\center
% %\begin{picture}(300,40)
\begin{figure}[h] % %\end{picture}
\center % \input{Fig_notions/bscone}
%\begin{picture}(300,40) % \caption{Possible extension area based
%\end{picture} % on the detected blurred segment preimage.}
\input{Fig_notions/bscone} % \label{fig:cone}
\caption{Possible extension area based %\end{figure}
on the detected blurred segment preimage.}
\label{fig:cone} In the former work, an additional refinement step was run,
\end{figure} but doing so, the problem was just delayed further.
%The solution implemented in the former work was to let some arbitrary
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,
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
and to perform two fine detection steps, using for each of them the direction %found at the former step.
found at the former step.
This process could be itered as long as the blurred segment escapes from This process could be itered as long as the blurred segment escapes from
the directional scanner using as any detection steps as necessary. the directional scanner using as any fine detection steps as necessary.
But it produces a useless computational coast, because of the margin left, But the multiple detection of the same segment start points produces
but also of the multiple detection of the same segment start points. a useless computational coast.
Here the proposed solution is to dynamically adapt the scan direction on
the detection result.
At each position $i+1$, the scan strip is updated using the direction
of the blurred segment computed at the former position $i$.
The adaptive directional scan $ADS$ is then defined by :
\begin{equation}
%S_i = \mathcal{D}_{i-1} \cap \mathcal{N}_i
ADS = \left\{ S_i = \mathcal{D}_i \cap \mathcal{N}_i \cap \mathcal{I} |
\delta(\mathcal{N}_i) = - \delta^{-1}(\mathcal{D}_0)
\cap h_0(\mathcal{N}_i) = h_0(\mathcal{N}_{i-1}) + p(\mathcal{D})
\cap \mathcal{D}_{i+1} = d (\mathcal{B}_i,\varepsilon) \right\}
\end{equation}
The last clause expresses the update of the scan bounds at step $i+1$.
Compared to static directional scans, the scan strip moves while
scan lines remain fixed.
An example of adaptive directional scan is given in \RefFig{fig:adaption}.
\begin{figure}[h] \begin{figure}[h]
\center \center
\begin{picture}(300,40) \begin{tabular}{c@{\hspace{0.2cm}}c}
\end{picture} \includegraphics[width=0.49\textwidth]{Fig_notions/adaptionBounds_zoom.png} &
\includegraphics[width=0.49\textwidth]{Fig_notions/adaptionLines_zoom.png}
\end{tabular}
\caption{Example of blurred segment detection \caption{Example of blurred segment detection
using an adaptive directional scan.} using an adaptive directional scan.
\label{fig:adaptiveScan} On the right picture, the scan bounds are displayed in red, the
detected blurred segment in blue, and its bounding lines in green.
The left picture displays the successive scans.
Adaption is quite sensible when crossing the tile joins.}
\label{fig:adaption}
\end{figure} \end{figure}
The proposed solution is to dynamically adapt the scan direction on the
detection result.
At each position $i$, the scan strip is updated using the direction and
minimal width of the blurred segment computed at the former position $i-1$,
that is :
\begin{equation}
S_i = \mathcal{D}_{i-1} \cap \mathcal{S}_i
\end{equation}
Compared to static directional scans, the scan strip is variable while the
scan lines remain fixed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment