From d6e801af6534b61458bc1c99c537684c1e92fdba Mon Sep 17 00:00:00 2001 From: even <philippe.even@loria.fr> Date: Wed, 1 May 2019 17:24:41 +0200 Subject: [PATCH] Article : experiments introduced and detailed workflow --- Article/expeV2.tex | 16 +++++++++++++ Article/macros.tex | 1 + Article/methodV2.tex | 55 ++++++++++++++++++++++--------------------- Article/notionsV2.tex | 9 +++---- 4 files changed, 50 insertions(+), 31 deletions(-) diff --git a/Article/expeV2.tex b/Article/expeV2.tex index 1fddd26..13f887b 100755 --- a/Article/expeV2.tex +++ b/Article/expeV2.tex @@ -23,6 +23,22 @@ %All other tests, sparsity or fragmentation, are disabled. %The segment minimal size is set to 5 pixels, except where precised. +In the experimental stage, the proposed approach is validated through +comparisons with other recent line detectors. +However only one of them, LSD \cite{GioiAl10}, provides a thickness value +of output lines, based on the width of regions with same gradient direction. +Unfortunately, this information does not really match the line sharpness +or scattering quality, that is addressed in this work, and can not be +actually compared to the thickness value output by the new detector. +Moreover, we did not find any data base with ground truth including +line thickness. +Therefore we proceed in two steps : +(i) evaluation of the benefits brought by the new concepts to measure +the lines orientation and thickness on synthetic images; +(ii) evaluation of more global performance of the unsupervised detector +compared to other approaches. +For all these experiments, the stroke sweeping step is set to 15 pixels. + At first, the benefits of introduced concepts are evaluated through a comparison of the performance of both versions of the detector on a set of 1000 synthesized images containing 10 randomly diff --git a/Article/macros.tex b/Article/macros.tex index afd78a9..cc79340 100755 --- a/Article/macros.tex +++ b/Article/macros.tex @@ -1,3 +1,4 @@ \newcommand{\RefFig}[1]{Fig.\,\ref{#1}} \newcommand{\RefSec}[1]{section\,\ref{#1}} \newcommand{\RefTab}[1]{Tab.\,\ref{#1}} +\newcommand{\RefEq}[1]{Eq.\,\ref{#1}} diff --git a/Article/methodV2.tex b/Article/methodV2.tex index 573f496..5c7ddcf 100755 --- a/Article/methodV2.tex +++ b/Article/methodV2.tex @@ -12,7 +12,7 @@ Contrarily to most detectors, no edge map is built here, but gradient magnitude and orientation are examined in privileged directions to track edge traces. Therefore we use a Sobel operator with a 5x5 pixels mask -\cite{KekreGharge10} to get a high quality gradient information. +to get high quality gradient information \cite{KekreGharge10}. \subsection{Previous work} @@ -31,8 +31,8 @@ untill a correct candidate with an acceptable gradient orientation was found. Despite of a good behavior reported, several drawbacks remained. First, the blurred segment thickness was not measured but initially set by the -user according to the application requirements. The produced information -on the edge quality was rather poor, and especially when the edge is thin, +user according to application requirements. The produced information +on edge quality was rather poor, and especially when the edge is thin, the risk to incorporate outlier points was quite high, thus producing a biased estimation of the edge orientation. Then, two refinement steps were systematically performed. @@ -40,9 +40,9 @@ On the one hand, this is useless when the first detection is successfull. On the other hand, there is no guarantee that this approach is able to process larger images. The search direction relies on the support vector of the blurred segment -detected at the former step. +detected at former step. Because the numerization rounding fixes a limit on this estimated orientation -accuracy, more steps are inevitably necessary to process larger images. +accuracy, more steps are inevitably required to process larger images. In the following, we present the improvements in the new detector to overcome these limitations. @@ -58,32 +58,31 @@ The workflow of the detection process is summerized in the following figure. \end{figure} The initial detection consists in building and extending a blurred segment -$\mathcal{B}$ based on points with highest norm gradient found in each scan -of a static directional scan defined by an input segment $AB$. +$\mathcal{B}$ of assigned thickness $\varepsilon_0$, +based on points with highest gradient magnitude found in each +scan of a static directional scan defined by an input segment $AB$. +The extension is stopped after five point addition failures on each side. +Notice that the gradient direction is not used in this step. Validity tests are then applied to decide of the detection pursuit. -They aim at rejecting too small or too sparse blurred segments, or -those with a close orientation to $AB$. -Size threshold is set to 3 pixels, angle closeness to $\pi/6$, -and the segment length (distance between end points) must be at least twice -the number of points. -In case of positive response, the position $C$ and direction $\vec{D}$ -of this initial blurred segment are extracted. +They aim at rejecting too small segments (less than 4 points) +or too sparse ones (more than 50\% of point addition failures) +or also those with a close orientation to $AB$ (less than $\pi/6$). In the fine tracking step, another blurred segment $\mathcal{B}'$ is built and extended with points that correspond to local maxima of the image gradient, ranked by magnitude order, and with gradient direction -close to start point gradient direction. -At this refinement step, a {\it control of the assigned thickness} is applied +close to start point gradient direction (less than $\pi/6$). +At this refinement step, a {\it control of assigned thickness} is applied and an {\it adaptive directional scan} based on found position $C$ and -direction $\vec{D}$ is used in order to extends the segment in the -appropriate direction. These two improvements are described in +direction $\vec{D}$ is used in order to extend the segment in +appropriate direction. These two notions are described in following sections \ref{subsec:ads} and \ref{subsec:caw}. -The output segment $\mathcal{B}'$ is finally accepted according to the -application needs. -For the present work, only a size test is performed so that blurred -segments with less than 10 pixels are rejected. +Output segment $\mathcal{B}'$ is finally accepted based on application criteria. +Final length and sparsity thresholds can be set accordingly. +They are the only parameters of this local detector, together with the input +assigned thickness. %Too short, too sparse or too fragmented segments %can be rejected. Length, sparsity or fragmentation thresholds are %intuitive parameters left at the end user disposal. @@ -93,8 +92,8 @@ segments with less than 10 pixels are rejected. \subsection{Adaptive directional scan} \label{subsec:ads} -The blurred segment is searched within a directional scan with a position -and an orientation approximately provided by the user, or blindly defined +The blurred segment is searched within a directional scan with position +and orientation approximately drawn by the user, or blindly defined in unsupervised mode. Most of the time, the detection stops where the segment escapes sideways from the scan strip (\RefFig{fig:escape} a). @@ -164,14 +163,15 @@ i > \lambda \end{array} \right. \right\} \end{equation} where $C_{i}$, $\vec{D}_{i}$ and $w_{i}$ are respectively a position, -a director vector and a thickness observed at iteration $i$. +a director vector and a thickness observed at iteration $i$, +used to update the scan strip and lines in accordance to \RefEq{eq:dsdef2}. %In the scope of the present detector, The last clause expresses the update of the scan bounds at iteration $i$ : $C_{i-1}$, $\vec{D}_{i-1}$ and $\mu_{i-1}$ are respectively the intersection of the input selection and the central line of $\mathcal{B}_{i-1}$, the director vector of the optimal line of $\mathcal{B}_{i-1}$, and the thickness of $\mathcal{B}_{i-1}$. -$\lambda$ is a delay set to 20 iterations to avoid direction unstabilities +$\lambda$ is a delay set to 20 iterations to avoid direction instabilities when too few points are inserted. Compared to static directional scans where the scan strip remains fixed to the initial line $\mathcal{D}_0$, here the scan strip moves while @@ -297,7 +297,8 @@ of misaligned segments when the sweeping stroke crosses an image edge near one of its ends. In such situation, any nearby disturbing gradient is likely to deviate the blurred segment direction, and its expansion is quickly stopped. -In the present work, the stroke sweeping step is set to 15 pixels. +The stroke sweeping step is an additional parameter for automatic detections, +that could be set in relation to the final length threshold parameter. The automatic detection of blurred segments in a whole image is available for testing from the online demonstration diff --git a/Article/notionsV2.tex b/Article/notionsV2.tex index 42619cb..fd11d74 100755 --- a/Article/notionsV2.tex +++ b/Article/notionsV2.tex @@ -71,10 +71,10 @@ is an important point of the proposed method. \begin{definition} A directional scan $DS$ is an ordered partition restricted to the image -domain $\mathcal{I}$ of a digital straight line $\mathcal{D}$, called the -\textbf{scan strip}, into scans $S_i$, each of them being a segment of a -naive line $\mathcal{N}_i$, called a \textbf{scan line}, orthogonal to -$\mathcal{D}$. +domain $\mathcal{I}$ of a thick digital straight line $\mathcal{D}$, +called the \textbf{scan strip}, into scans $S_i$, each of them being a +segment of a naive line $\mathcal{N}_i$, called a \textbf{scan line}, +orthogonal to $\mathcal{D}$. \end{definition} \begin{equation} @@ -176,4 +176,5 @@ $\mathcal{N}_i^{C,\vec{D},w}$: \mathcal{N}_i^{C,\vec{D},w} = \mathcal{L}(X_D,~ Y_D,~ c_4 + i\cdot p_{\vec{D}},~ p_{\vec{D}}) \end{array} \right. +\label{eq:dsdef2} \end{equation} -- GitLab