Skip to content
Snippets Groups Projects
Commit 77c65c58 authored by even's avatar even
Browse files

Article: ours hunting and eq numbering

parent b58694e6
No related branches found
No related tags found
No related merge requests found
...@@ -12,8 +12,8 @@ For instance, the new directional scanners are encoded as an iterator so that ...@@ -12,8 +12,8 @@ For instance, the new directional scanners are encoded as an iterator so that
only required scan lines are provided when required, whereas with the former only required scan lines are provided when required, whereas with the former
code, all the scan lines were computed and returned, whenever they were used code, all the scan lines were computed and returned, whenever they were used
or not. or not.
We just checked that the outputs of the new coding of the former detector Outputs of the new coding of the former detector were compared to those of
are equivalent to those of the old release. the old release, to ensure an equivalent behaviour.
\begin{figure}[h] \begin{figure}[h]
\center \center
...@@ -42,7 +42,7 @@ are equivalent to those of the old release. ...@@ -42,7 +42,7 @@ are equivalent to those of the old release.
\end{picture} \end{picture}
\end{tabular} \end{tabular}
\caption{Outputs of both former (on left) and new (on right) detectors \caption{Outputs of both former (on left) and new (on right) detectors
using a selec tionof input strokes.} using a selection of input strokes.}
\label{fig:buro} \label{fig:buro}
\end{figure} \end{figure}
...@@ -68,12 +68,13 @@ detectors with the input strokes of \RefFig{fig:buro}.} ...@@ -68,12 +68,13 @@ detectors with the input strokes of \RefFig{fig:buro}.}
\label{tab:cmpOldNew} \label{tab:cmpOldNew}
\end{table} \end{table}
In the second series of tests, we compare the execution times of both detectors In the second series of tests, the execution times of both detectors were
for the automatic detection of edges on a set of test images. We display the compared on the automatic detection of edges on a set of test images.
results for one of them (\RefFig{fig:evalAuto}). X (resp. Y) blurred segments Results are displayed for one of them (\RefFig{fig:evalAuto}).
are extracted with the former (resp. new) detector on all images. The X (resp. Y) blurred segments are extracted with the former
average execution time is X ms for the former detector, and Y ms for the (resp. new) detector on all images.
new detector. The average execution time is X ms for the former detector,
and Y ms for the new detector.
\begin{figure}[h] \begin{figure}[h]
\center \center
......
...@@ -159,7 +159,7 @@ directions, so that in the exemple of figure (\RefFig{fig:edgeDir} b)), ...@@ -159,7 +159,7 @@ directions, so that in the exemple of figure (\RefFig{fig:edgeDir} b)),
both edges (in different colours) are highlighted. both edges (in different colours) are highlighted.
These two thin blurred segments are much shorter, probably because the These two thin blurred segments are much shorter, probably because the
tiles are not perfectly aligned. tiles are not perfectly aligned.
This example illustrates our detector versatility. This example illustrates the versatility of the new detector.
\subsection{Automatic blurred segment detection} \subsection{Automatic blurred segment detection}
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
\subsection{Blurred segment} \subsection{Blurred segment}
Our work relies on the notion of digital straight line as classically This work relies on the notion of digital straight line as classically
defined in the digital geometry literature \cite{KletteRosenfeld04}. defined in the digital geometry literature \cite{KletteRosenfeld04}.
Only the 2-dimensional case is considered here. Only the 2D case is considered here.
\begin{definition} \begin{definition}
A digital line $\mathcal{L}(a,b,c,\nu)$, with $(a,b,c,\nu) \in \mathbb{Z}^4$, A digital line $\mathcal{L}(a,b,c,\nu)$, with $(a,b,c,\nu) \in \mathbb{Z}^4$,
...@@ -25,8 +25,8 @@ of points in $\mathbb{Z}^2$ that all belong to a digital line of ...@@ -25,8 +25,8 @@ of points in $\mathbb{Z}^2$ that all belong to a digital line of
arithmetical width $\varepsilon$. arithmetical width $\varepsilon$.
\end{definition} \end{definition}
In this work, we use a linear-time algorithm that was developed to recognize A linear-time algorithm to recognize a blurred segment of assigned width
a blurred segment of assigned width $\varepsilon$ \cite{DebledAl05}. $\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 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
...@@ -59,34 +59,36 @@ avoid the incorporation of spurious outliers in further parts of the segment. ...@@ -59,34 +59,36 @@ avoid the incorporation of spurious outliers in further parts of the segment.
A directional scan is a partition of a digital straight line $\mathcal{D}$, A directional scan is a partition of a digital straight line $\mathcal{D}$,
called the {\it scan strip}, into scans $S_i$, each of them being a called the {\it scan strip}, into scans $S_i$, each of them being a
segment of a naive line $\mathcal{S}_i$ orthogonal to $\mathcal{D}$. segment of a naive line $\mathcal{S}_i$ orthogonal to $\mathcal{D}$.
\[ S_i = \mathcal{D} \cap \mathcal{S}_i, \begin{equation}
\mathcal{S}_i \perp \mathcal{D} \] S_i = \mathcal{D} \cap \mathcal{S}_i, \mathcal{S}_i \perp \mathcal{D}
\end{equation}
The scans $S_i$ are developed on each side of a central scan $S_0$, The scans $S_i$ are developed on each side of a central scan $S_0$,
and labelled with their manhattan distance ($d_1 = |d_x| + |d_y|$) to and labelled with their manhattan distance ($d_1 = |d_x| + |d_y|$) to
the central line $\mathcal{S}_0$ and a positive (resp. negative) sign the central line $\mathcal{S}_0$ and a positive (resp. negative) sign
if their are on the left (resp. right) of $\mathcal{S}_0$. if they are on the left (resp. right) side of $\mathcal{S}_0$.
\begin{figure}[h] \begin{figure}[h]
\center \center
%\begin{picture}(300,40)
%\end{picture}
\input{Fig_notions/fig} \input{Fig_notions/fig}
\caption{Example of directional scan.} \caption{Example of directional scan.}
\label{fig:ds} \label{fig:ds}
\end{figure} \end{figure}
The directional scan can be defined by its central scan $S_0$. A directional scan can be defined by its central 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 :
\[ \mathcal{D}(A,B) \begin{equation}
= \mathcal{L}(\delta_x, \delta_y, min (c1,c2), 1 + |c_1-c_2|) \] \mathcal{D}(A,B) = \mathcal{L}(\delta_x, \delta_y, min (c1,c2), 1 + |c_1-c_2|)
\end{equation}
\noindent \noindent
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{S}_i$ is then defined by :
\[ \mathcal{S}_i(A,B) = \mathcal{L}(\delta_y, -\delta_x, \begin{equation}
\delta_y\cdot x_A - \delta_X\cdot y_A + i\cdot \nu_{AB}, \nu_{AB}) \] \mathcal{S}_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})
\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$
...@@ -94,29 +96,32 @@ is the chessboard distance ($d_\infty = max (|d_x|,|d_y|)$). ...@@ -94,29 +96,32 @@ 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.
The 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 :
\[ \mathcal{D}(C,\vec{D},w) \begin{equation}
= \mathcal{L}(y_D, -x_D, x_C\cdot y_D - y_C\cdot x_D - w / 2, w) \] \mathcal{D}(C,\vec{D},w)
= \mathcal{L}(y_D, -x_D, x_C\cdot y_D - y_C\cdot x_D - w / 2, w)
\end{equation}
\noindent
and the scan line $\mathcal{S}_i(C,\vec{D},w)$ : and the scan line $\mathcal{S}_i(C,\vec{D},w)$ :
\[ \mathcal{S}_i(C,\vec{D},w) \begin{equation}
= \mathcal{L}(x_D, y_D, \mathcal{S}_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, x_D\cdot x_C + y_D\cdot y_C - w / 2 + i\cdot w, max (|x_D|,|y_D|)
max (|x_D|,|y_D|) \] \end{equation}
\subsection{Adaptive directional scan} \subsection{Adaptive directional scan}
We try to detect a blurred segment inside a directional scan which position The blurred segment is searched inside 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.
Therefore a second search is run again using an other directional scan aligned Therefore a second search is run again using an other directional scan aligned
on the detected segment. on the detected segment.
But we only have an estimation of this blurred segment direction, and the But only an estimation of this blurred segment direction is provided,
longer the real segment, the higher the probability to fail again on a and the longer the real segment, the higher the probability to fail again
blurred segment escape from the directional scan. on a blurred segment escape from the directional scan.
\begin{figure}[h] \begin{figure}[h]
\center \center
...@@ -136,8 +141,8 @@ rather a conic shape to take into account the blurred segment preimage. ...@@ -136,8 +141,8 @@ rather a conic shape to take into account the blurred segment preimage.
% Of course this problem is amplified when ideal BS are considered. % Of course this problem is amplified when ideal BS are considered.
% -> FAUX : c'est relativement plus penalisant sur 1 BS reduit a 2 pts % -> 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. % 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 This side shift is amplified in situations where the blurred segment is
to get thicker in order to capture possible noisy features. left free to get thicker in order to capture possible noisy features.
The assigned width is then still greater than the detected minimal width, The assigned width is then still greater than the detected minimal width,
so that the segment can move within the directional scan. so that the segment can move within the directional scan.
Knowing the detected blurred segment shape and the image size, it is Knowing the detected blurred segment shape and the image size, it is
...@@ -172,10 +177,13 @@ but also of the multiple detection of the same segment start points. ...@@ -172,10 +177,13 @@ but also of the multiple detection of the same segment start points.
\label{fig:adaptiveScan} \label{fig:adaptiveScan}
\end{figure} \end{figure}
The solution we propose here is to dynamically adapt the scan direction The proposed solution is to dynamically adapt the scan direction on the
on the detection result. At each position $i$, the scan strip is updated detection result.
using the direction and minimal width of the blurred segment computed At each position $i$, the scan strip is updated using the direction and
at the former position $i-1$, that is : minimal width of the blurred segment computed at the former position $i-1$,
\[ S_i = \mathcal{D} \cap \mathcal{S}_{i-1} \] that is :
Compared to static directional scans, the scan strip varies while the \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. 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