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

Article: multi-detection

parent 452fae93
No related branches found
No related tags found
No related merge requests found
Showing
with 160 additions and 17 deletions
\begin{algorithm}[h]
\SetAlgoLined
\SetKwInOut{Input}{input}
\SetKwInOut{Output}{output}
\SetKwData{lm}{LocMax}
\SetKwData{nullset}{$\emptyset$}
\SetKwData{ortho}{$\vec{AB}_\perp$}
\SetKwData{eps}{$\varepsilon_{ini}$}
\SetKwData{pta}{$A$}
\SetKwData{ptb}{$B$}
\SetKwData{Result}{Result}
\SetKwArray{occmask}{OccupancyMask}
\SetKwArray{bseg}{BlurredSegment}
\SetKwArray{bslist}{ListOfBlurredSegments}
\SetKwFunction{locmax}{ComputeAndSortGradientLocalMax}
\SetKwFunction{sortgradmax}{SortByGradientMagnitude}
\SetKwFunction{taille}{Size}
\SetKwFunction{cardinal}{Card}
\SetKwData{Begin}{Start}
\SetKwData{End}{End}
\Input{Stroke points \pta, \ptb}
\Output{\textit{\bslist} $\rightarrow$ list of detected blurred segments}
\BlankLine
\bslist $\leftarrow$ \nullset\;
\occmask $\leftarrow$ \nullset\;
\lm $\leftarrow$ \locmax (\pta, \ptb)\;
\BlankLine
\For{$i \leftarrow 0$ \KwTo \taille(\lm)}{
\bseg $\leftarrow$ detect (\lm[i], \ortho, \eps, \occmask)\;
\For{$j \leftarrow 0$ \KwTo \cardinal (\bseg)}{
\occmask $\leftarrow$ \bseg[j]\;
}
\bslist $\leftarrow$ \bseg\;
}
\caption{MultiDetection:
finds all blurred segments under an input stroke.}
\end{algorithm}
Images obtenues pas le test testEdgeDir.txt
suivi de la commande de detection multiple : Ctrl-M
avec deux modalites pilotees par Ctrl-E
Sur gimp selection de la zone (34,166)(444,314).
Article/Fig_method/multiEdge_capt.png

93.5 KiB

Article/Fig_method/multiEdge_zoom.png

32.5 KiB

Article/Fig_method/multiStroke_capt.png

93.9 KiB

Article/Fig_method/multiStroke_zoom.png

32.8 KiB

287 142
326 103
329 210
323 245
Images obtenues pas le test testvoisin.txt
suivi de la commande de detection de bords : Ctrl-E
Sur gimp selection de la zone (282,90)(411,156).
Article/Fig_method/voisinGrad_capt.png

83.5 KiB

Article/Fig_method/voisinGrad_zoom.png

5.32 KiB

Article/Fig_method/voisinImage_capt.png

92.9 KiB

Article/Fig_method/voisinImage_zoom.png

5.49 KiB

Article/Fig_method/voisinMulti_capt.png

93.3 KiB

Article/Fig_method/voisinMulti_zoom.png

5.82 KiB

Article/Fig_method/voisinSingle_capt.png

93.2 KiB

Article/Fig_method/voisinSingle_zoom.png

5.61 KiB

...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
\subsection{Workflow of the detection process} \subsection{Workflow of the detection process}
The blurred segment detector workflow is summerized The work-flow of the blurred segment detection process is summerized
in the following figure. in the following figure.
\begin{figure}[h] \begin{figure}[h]
...@@ -12,8 +12,8 @@ in the following figure. ...@@ -12,8 +12,8 @@ in the following figure.
\put(-2,18){\scriptsize $(A,B)$} \put(-2,18){\scriptsize $(A,B)$}
\put(-2,15){\vector(1,0){24}} \put(-2,15){\vector(1,0){24}}
\put(24,0){\framebox(56,30)} \put(24,0){\framebox(56,30)}
\put(24,15){\makebox(56,10){Initial}} \put(24,16){\makebox(56,10){Initial}}
\put(24,3){\makebox(56,10){detection}} \put(24,4){\makebox(56,10){detection}}
\put(86,18){\scriptsize $\mathcal{B}_{1}$} \put(86,18){\scriptsize $\mathcal{B}_{1}$}
\put(80,15){\vector(1,0){22}} \put(80,15){\vector(1,0){22}}
%\put(102,0){\framebox(56,30)} %\put(102,0){\framebox(56,30)}
...@@ -25,15 +25,15 @@ in the following figure. ...@@ -25,15 +25,15 @@ in the following figure.
\put(159,18){\scriptsize $(C,\vec{D})$} \put(159,18){\scriptsize $(C,\vec{D})$}
\put(158,15){\vector(1,0){28}} \put(158,15){\vector(1,0){28}}
\put(186,0){\framebox(56,30)} \put(186,0){\framebox(56,30)}
\put(186,15){\makebox(56,10){Fine}} \put(186,16){\makebox(56,10){Fine}}
\put(186,3){\makebox(60,10){tracking}} \put(186,4){\makebox(60,10){tracking}}
\put(250,18){\scriptsize $\mathcal{B}_2$} \put(250,18){\scriptsize $\mathcal{B}_2$}
\put(242,15){\vector(1,0){24}} \put(242,15){\vector(1,0){24}}
\put(266,0){\framebox(56,30){Filtering}} \put(266,0){\framebox(56,30){Filtering}}
\put(330,18){\scriptsize $\mathcal{B}_3$} \put(330,18){\scriptsize $\mathcal{B}_3$}
\put(322,15){\vector(1,0){22}} \put(322,15){\vector(1,0){22}}
\end{picture} \end{picture}
\caption{The detection method work flow.} \caption{The detection process main work-flow.}
\label{fig:workflow} \label{fig:workflow}
\end{figure} \end{figure}
...@@ -63,21 +63,108 @@ Setting $N=20$ shows a good behaviour on tested images. ...@@ -63,21 +63,108 @@ Setting $N=20$ shows a good behaviour on tested images.
The fine track output segment is finally filtered to remove artifacts The fine track output segment is finally filtered to remove artifacts
and outliers, and a solution blurred segment $\mathcal{B}_3$ is provided. and outliers, and a solution blurred segment $\mathcal{B}_3$ is provided.
\subsection{The thinning process} \subsection{Supervised blurred segment detection}
In supervised context, the user draws an input stroke across the specific
edge he wants to extract from the image.
The detection method previously described is continuously run during mouse
dragging and the output blurred segment is displayed on-the-fly.
The method is very sensitive to the local conditions of the initial detection
so that the output blurred segment may be quite unstable.
In order to temper this undesirable behaviour for particular applications,
the initial detection can be optionally run twice, the second fast scan being
aligned on the first detection output.
This strategy provides a first quick analysis of the local context before
extracting the segment and contributes to notably stabilize the overall
process.
Another option, called multi-detection allows the detection of all the
segments crossed by the input stroke $AB$.
The multi-detection algorithm is displayed below.
First the positions $M_j$ of the local maxima of the gradient magnitude found
under the stroke are sorted from the highest to the lowest.
For each of them the main detection process is run with three modifications:
i) the initial detection takes $M_j$ and the orthogonal direction $AB_\perp$
to the stroke as input to build a static scan of fixed width
$\varepsilon_{ini}$, and $M_j$ is used as start point of the blurred segment;
ii) a occupancy mask, initially empty, is filled in with the points of the
detected blurred segments $\mathcal{B}_{j3}$ at the end of each successful
detection;
iii) points marked as occupied are rejected when selecting candidates for the
blurred selegment extension in the fine tracking step.
\input{Fig_method/algoMulti}
%\input{algo1}
Beyond the possible detection of a large set of edges at once, the
multi-detection allows the detection of some unaccessible edges in
classical single detection mode. This is particularly the case of edges
that are quite close to a more salient edge with a higher gradient.
The multi-detection detects both edges and the user may then select
the awaited one.
\subsection{Multi-detection} \begin{figure}[h]
\center
\begin{tabular}{c@{\hspace{0.2cm}}c@{\hspace{0.2cm}}c@{\hspace{0.2cm}}c}
\includegraphics[width=0.22\textwidth]{Fig_method/voisinImage_zoom.png} &
\includegraphics[width=0.22\textwidth]{Fig_method/voisinGrad_zoom.png} &
\includegraphics[width=0.22\textwidth]{Fig_method/voisinSingle_zoom.png} &
\includegraphics[width=0.22\textwidth]{Fig_method/voisinMulti_zoom.png} \\
\parbox{0.22\textwidth}{\centering{\scriptsize{a)}}} &
\parbox{0.22\textwidth}{\centering{\scriptsize{b)}}} &
\parbox{0.22\textwidth}{\centering{\scriptsize{c)}}} &
\parbox{0.22\textwidth}{\centering{\scriptsize{d)}}}
\end{tabular}
\caption{Example of edge, detected only in multi-detection mode:
a) the stroke on the intensity image,
b) the gradient map,
c) the result of the classical single mode detection,
d) the result of the multi-detection. }
\label{fig:voisins}
\end{figure}
This detection procedure can be used to dectect as well straight edges
as thin straight objects. In the first case, the gradient vectors of all
edge points are assumed to be oriented in the same direction. But if the
sign of the gradient direction is not considered, points with gradient in
opposite directions are merged to build the same blurred segment, allowing
the detection of both edges of a thin linear structure, like for instance
the tile joins of \RefFigure{fig:edgeDir}.
\begin{figure}[h]
\center
\begin{tabular}{c@{\hspace{0.2cm}}c}
\includegraphics[width=0.46\textwidth]{Fig_method/multiStroke_zoom.png} &
\includegraphics[width=0.46\textwidth]{Fig_method/multiEdge_zoom.png} \\
\parbox{0.46\textwidth}{\centering{\scriptsize{a)
Detection of straight lines}}} &
\parbox{0.46\textwidth}{\centering{\scriptsize{b)
Detection of straight edges}}}
\end{tabular}
\caption{Testing the gradient direction to detect as well edges as
linear structures from the same input stroke.}
\label{fig:edgeDir}
\end{figure}
On that example, when a straight features detection is run
(\RefFigure{fig:edgeDir} a)),
a thick blurred segment which extends up to four tiles is provided.
When a straight edge detection is run, a very thin blurred segment is
built to follow only one join edge.
The multi-detection can also be applied to both thin object or edge detection.
In the latter case, the detection algorithm is run twice using opposite
directions, so that in the exemple of figure (\RefFigure{fig:edgeDir} b)),
both edges (in different colours) are highlighted.
These two thin blurred segments are much shorter, probably because the
tiles are not perfectly aligned.
This example illustrates our detector versatility.
Algo de multi-detection. \subsection{Automatic blurred segment detection}
\subsection{Automatic detection} Explication et b\'etail de l'algo
\subsection{Implementation details} \subsection{Implementation details}
A directional scanner is encoded as an iterator that provides successively A directional scanner is encoded as an iterator that provides successively
all the scan lines. all the scan lines.
Description de l'interface pour la d\'etection supervis\'ee d'un segment.
Description de la d\'etection multiple.
Description de la d\'etection automatique.
\section{Base notions} \section{Theoretical background}
\subsection{Blurred segment} \subsection{Blurred segment}
......
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