From 0decc4301591c556560c8b581e53496455668d94 Mon Sep 17 00:00:00 2001 From: even <philippe.even@loria.fr> Date: Mon, 24 Dec 2018 19:15:17 +0100 Subject: [PATCH] Article: rmk BK integrated --- Article/Fig_method/workflow.tex | 26 ++++++++++ Article/Fig_method/workflowBK.tex | 27 +++++++++++ Article/Fig_notions/bswidth.tex | 11 +++-- Article/abstract.tex | 12 +++-- Article/biblio.bib | 19 ++++++-- Article/intro.tex | 22 +++++---- Article/main.tex | 13 ++++- Article/method.tex | 80 +++++++++++++------------------ Article/notions.tex | 15 +++--- 9 files changed, 145 insertions(+), 80 deletions(-) create mode 100755 Article/Fig_method/workflow.tex create mode 100755 Article/Fig_method/workflowBK.tex diff --git a/Article/Fig_method/workflow.tex b/Article/Fig_method/workflow.tex new file mode 100755 index 0000000..77d18c8 --- /dev/null +++ b/Article/Fig_method/workflow.tex @@ -0,0 +1,26 @@ + \begin{picture}(340,34)(0,-4) + %\put(0,-2.5){\framebox(340,35)} + \put(-2,18){\scriptsize $(A,B)$} + \put(-2,15){\vector(1,0){24}} + \put(24,0){\framebox(56,30)} + \put(24,16){\makebox(56,10){Initial}} + \put(24,4){\makebox(56,10){detection}} + \put(86,18){\scriptsize $\mathcal{B}$} + \put(80,15){\vector(1,0){22}} + %\put(102,0){\framebox(56,30)} + \multiput(102,15)(28,9){2}{\line(3,-1){28}} + \multiput(102,15)(28,-9){2}{\line(3,1){28}} + \put(100,0){\makebox(60,30){Valid ?}} + \put(133,-2){\scriptsize $\emptyset$} + \put(130,6){\vector(0,-1){10}} + \put(159,18){\scriptsize $(C,\vec{D})$} + \put(158,15){\vector(1,0){28}} + \put(186,0){\framebox(56,30)} + \put(186,16){\makebox(56,10){Fine}} + \put(186,4){\makebox(60,10){tracking}} + \put(250,18){\scriptsize $\mathcal{B}'$} + \put(242,15){\vector(1,0){24}} + \put(266,0){\framebox(56,30){Filtering}} + \put(330,18){\scriptsize $\mathcal{B}''$} + \put(322,15){\vector(1,0){22}} + \end{picture} diff --git a/Article/Fig_method/workflowBK.tex b/Article/Fig_method/workflowBK.tex new file mode 100755 index 0000000..f2844f3 --- /dev/null +++ b/Article/Fig_method/workflowBK.tex @@ -0,0 +1,27 @@ + \begin{picture}(340,34)(0,-4) + %\put(0,-2.5){\framebox(340,35)} + \put(-2,18){\scriptsize $(A,B)$} + \put(-2,15){\vector(1,0){24}} + \put(24,0){\framebox(56,30)} + \put(24,16){\makebox(56,10){Initial}} + \put(24,4){\makebox(56,10){detection}} + \put(86,18){\scriptsize $\mathcal{B}$} + \put(80,15){\vector(1,0){22}} + %\put(102,0){\framebox(56,30)} + \multiput(102,15)(28,9){2}{\line(3,-1){28}} + \multiput(102,15)(28,-9){2}{\line(3,1){28}} + \put(100,0){\makebox(60,30){Valid ?}} + \put(133,-2){\scriptsize $\emptyset$} + \put(130,6){\vector(0,-1){10}} + \put(159,18){\scriptsize $(C,\vec{D})$} + \put(158,15){\vector(1,0){26}} + \put(184,0){\framebox(62,30)} + \put(186,18){\makebox(56,10){Fine}} + \put(186,8){\makebox(60,10){tracking }} + \put(186,0){\makebox(60,10){\scriptsize{\color{gray}{(adapt. dir. scan)}}}} + \put(250,18){\scriptsize $\mathcal{B}'$} + \put(246,15){\vector(1,0){20}} + \put(266,0){\framebox(56,30){Filtering}} + \put(330,18){\scriptsize $\mathcal{B}''$} + \put(322,15){\vector(1,0){22}} + \end{picture} diff --git a/Article/Fig_notions/bswidth.tex b/Article/Fig_notions/bswidth.tex index ba010fe..5393c1f 100644 --- a/Article/Fig_notions/bswidth.tex +++ b/Article/Fig_notions/bswidth.tex @@ -1,7 +1,7 @@ \begin{picture}(220,60) \multiput(0,6)(2,-6){2}{\line(3,1){150}} - \multiput(0,8)(30,6){8}{\line(5,1){10}} - \multiput(0,18)(30,6){8}{\line(5,1){10}} + \multiput(0,8)(30,6){8}{\color{red}{\line(5,1){10}}} + \multiput(0,18)(30,6){8}{\color{red}{\line(5,1){10}}} \put(45,21){\circle*{3}} \put(55,21){\circle*{3}} \put(65,21){\circle*{3}} @@ -15,7 +15,8 @@ \put(140,36){\vector(0,1){10}} \put(140,62.66){\vector(0,-1){10}} \put(120,58){$\mu_{i-1}$} - \put(160,30){\vector(0,1){10}} - \put(160,60){\vector(0,-1){10}} - \put(164,36){$\mu_i$} + \put(160,30){\color{red}{\vector(0,1){10}}} + \put(160,60){\color{red}{\vector(0,-1){10}}} + \put(164,36){\color{red}{$\mu_i$}} + \put(180,60){\color{red}{$\mathcal{B}_{i}$}} \end{picture} diff --git a/Article/abstract.tex b/Article/abstract.tex index e495d65..3b0b065 100755 --- a/Article/abstract.tex +++ b/Article/abstract.tex @@ -1,6 +1,8 @@ This paper introduces a new straight edge detector in gray-level images -based on blurred segments, digital objects able to imbed quality measurements -on the extracted features. This study completes previous works with a better -estimation of the blurred segment width and orientation, with two main -improvements: adaptive directional scans and the control of the -assigned width to the detection algorithm. +based on blurred segments, digital objects able to embed quality measurements +on the extracted features. This study enhances previous works on interactive +line detection with a better estimation of the blurred segment width and +orientation through two main improvements: adaptive directional scans and +the control of the assigned width to the detection algorithm. +A new contribution to the detection of all the segments in a single image +is also proposed and left available in an online demonstration. diff --git a/Article/biblio.bib b/Article/biblio.bib index 8af3773..62f91c0 100755 --- a/Article/biblio.bib +++ b/Article/biblio.bib @@ -1,3 +1,11 @@ +@article{DebledAl06, + title = {Optimal Blurred Segments Decomposition of Noisy Shapes + in Linear Times}, + journal = {Computers and Graphics}, + author = {Debled-Rennesson, I. and Feschet, F. and Rouyer-Degli, J.}, + year = {2006} +} + @book{KletteRosenfeld04, title = {Digital geometry -- Geometric methods for digital picture analysis}, author = {Klette, Reinhard and Rosenfeld, Azriel}, @@ -18,7 +26,8 @@ editor = {Wiederhold, P. and Barneva, R. P.}, optmonth = nov, year = {2009}, - pages = {176--186} + pages = {176--186}, + optdoi = {10.1007/978-3-642-10210-3_14} } @@ -47,7 +56,7 @@ number = "6", pages = "1675--1684", year = "2007", - doi = "DOI: 10.1016/j.patcog.2006.10.005" + doi = "10.1016/j.patcog.2006.10.005" } @@ -71,7 +80,8 @@ journal = {Mathematical Morphology: Theory and Applications}, year = {2017}, number = {2}, - pages = {35-54} + pages = {35-54}, + doi = {10.1016/j.patcog.2006.10.005} } @@ -136,7 +146,8 @@ booktitle = {Int. Conf. on Image Processing}, publisher = {IEEE}, year = {2015}, - pages = {507--511} + pages = {507--511}, + doi = {10.1109/ICIP.2015.7350850} } diff --git a/Article/intro.tex b/Article/intro.tex index 53d2923..fb5fa08 100755 --- a/Article/intro.tex +++ b/Article/intro.tex @@ -22,7 +22,7 @@ introduced to cope with the image noise or other sources of imperfections from the real world by the mean of a width parameter. It is well suited to reflect the required edge quality information. Moreover efficient algorithms have already been designed to recognize -these digital objects in binary images. +these digital objects in binary images \cite{DebledAl06}. 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 @@ -72,20 +72,22 @@ resolution images. The work presented in this paper aims at solving both former mentioned drawbacks through two main contributions: -the concept of adaptive directional scanner designed to get some compliance -to the unpredictable orientation problem; -the control of the assigned width to the blurred segment recognition algorithm, -intended to derive more reliable information on the edge orientation and -quality. +(i) the concept of adaptive directional scanner designed to get some +compliance to the unpredictable orientation problem; +(ii) the control of the assigned width to the blurred segment recognition +algorithm, intended to derive more reliable information on the edge +orientation and quality. As a side effect, these two major evolutions also led to a noticeable improvement of the time performance of the detector. +They are also put forward within a global line extraction algorithm +which can be evaluated through an online demonstration. In the next section, the main theoretical notions this work relies on are introduced. -Then the new detector workflow, the adaptive directional scanner, the control -of the assigned with and their integration into both supervised -and unsupervised contexts are presented and discussed in \RefSec{sec:method}. +The new detector workflow, the adaptive directional scanner, the control +of the assigned with and their integration into both supervised and +unsupervised contexts are then presented and discussed in \RefSec{sec:method}. Experiments led to assess the expected increase of performance are decribed in \RefSec{sec:expe}. -Finally achieved results are summarized in \RefSec{sec:conclusion}, +Finally, achieved results are summarized in \RefSec{sec:conclusion}, followed by some open perspectives for future works. diff --git a/Article/main.tex b/Article/main.tex index f458d99..74fbea3 100755 --- a/Article/main.tex +++ b/Article/main.tex @@ -3,9 +3,16 @@ \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} +\usepackage{tikzrput} +\definecolor{dblue}{RGB}{55,55,200} + + +\usepackage[colorlinks=true,citecolor=dblue]{hyperref} + \usepackage{graphicx} \usepackage{color} \definecolor{dwhite}{rgb}{1,1,1} +\definecolor{dgreen}{rgb}{0.1,0.5,0.1} %\graphicspath{{./Fignotions/}{./Figmethod}} \usepackage[ruled,vlined]{algorithm2e} @@ -19,7 +26,7 @@ \begin{frontmatter} % \title{Straight edge detection % based on adaptive directional tracking of blurred segments} - \title{Adaptive directional tracking of blurred segments} + \title{Adaptive Directional Tracking of Blurred Segments} \author{Philippe Even\inst{1} \and Phuc Ngo\inst{1} \and @@ -37,7 +44,9 @@ \begin{abstract} \input{abstract} - \keywords{Line detection \and discrete objects \and image analysis} + \keywords{Line/segment detection + \and discrete objects + \and image analysis} \end{abstract} \end{frontmatter} diff --git a/Article/method.tex b/Article/method.tex index d38d22d..3ef6d59 100755 --- a/Article/method.tex +++ b/Article/method.tex @@ -9,32 +9,7 @@ in the following figure. \begin{figure}[h] \center - \begin{picture}(340,34)(0,-4) - %\put(0,-2.5){\framebox(340,35)} - \put(-2,18){\scriptsize $(A,B)$} - \put(-2,15){\vector(1,0){24}} - \put(24,0){\framebox(56,30)} - \put(24,16){\makebox(56,10){Initial}} - \put(24,4){\makebox(56,10){detection}} - \put(86,18){\scriptsize $\mathcal{B}$} - \put(80,15){\vector(1,0){22}} - %\put(102,0){\framebox(56,30)} - \multiput(102,15)(28,9){2}{\line(3,-1){28}} - \multiput(102,15)(28,-9){2}{\line(3,1){28}} - \put(100,0){\makebox(60,30){Valid ?}} - \put(133,-2){\scriptsize $\emptyset$} - \put(130,6){\vector(0,-1){10}} - \put(159,18){\scriptsize $(C,\vec{D})$} - \put(158,15){\vector(1,0){28}} - \put(186,0){\framebox(56,30)} - \put(186,16){\makebox(56,10){Fine}} - \put(186,4){\makebox(60,10){tracking}} - \put(250,18){\scriptsize $\mathcal{B}'$} - \put(242,15){\vector(1,0){24}} - \put(266,0){\framebox(56,30){Filtering}} - \put(330,18){\scriptsize $\mathcal{B}''$} - \put(322,15){\vector(1,0){22}} - \end{picture} + \input{Fig_method/workflow} \caption{The detection process main workflow.} \label{fig:workflow} \end{figure} @@ -71,10 +46,12 @@ Most of the time, the detection stops where the segment escapes sideways from the scan strip (\RefFig{fig:escape} a). A second search is then run using another directional scan aligned on the detected segment (\RefFig{fig:escape} b). -However, even in case of a correct detection, the estimated orientation -of the segment is subject to the numerization rounding, -and the longer the real segment to detect, the higher the probability to -fail again on a blurred segment escape from the directional scan. +In the given example, an outlier added to the initial segment leads to a +wrong orientation value. +But even in case of a correct detection, this estimated orientation +is subject to the numerization rounding, and the longer the real segment +to detect, the higher the probability to fail again on a blurred segment +escape from the directional scan. %Even in ideal situation where the detected segment is a perfect line, %its width is never null as a result of the discretization process. @@ -116,8 +93,9 @@ thus producing a useless computational cost. Here the proposed solution is to dynamically align the scan direction on the blurred segment one all along the expansion stage. -At each iteration $i$, the scan strip is aligned on the direction of the -blurred segment $\mathcal{B}_{i-1}$ computed at previous iteration $i-1$. +At each iteration $i$ of the expansion, the scan strip is aligned on the +direction of the blurred segment $\mathcal{B}_{i-1}$ computed at previous +iteration $i-1$. More generally, an adaptive directional scan $ADS$ is defined by: \begin{equation} %S_i = \mathcal{D}_{i-1} \cap \mathcal{N}_i @@ -228,19 +206,18 @@ extracting the segment and contributes to notably stabilize the overall process. When selecting candidates for the fine detection stage, an option, called -{\it edge selection mode}, is left to filter the points according to their -gradient direction. +{\it edge selection mode}, is left to also filter the points according to +their gradient direction. In {\it main edge selection mode}, only the points with a gradient vector in the same direction as the start point gradient vector are added to the blurred segment. In {\it opposite edge selection mode}, only the points with an opposite gradient vector direction are kept. -In {\it line selection mode} this filter is not applied, and all the -candidate points are aggregated into a same blurred segment, whatever the -direction of their gradient vector. -This mode allows the detection of the two opposite edges of a thin straight -object. -This distinction is illustrated on \RefFig{fig:edgeDir}. +In {\it line selection mode} this direction-based filter is not applied, +and all the candidate points are aggregated into a same blurred segment, +whatever the direction of their gradient vector. +As illustrated on \RefFig{fig:edgeDir}, this mode allows the detection of +the two opposite edges of a thin straight object. \begin{figure}[h] \center @@ -256,13 +233,15 @@ This distinction is illustrated on \RefFig{fig:edgeDir}. \put(-262.5,-20){a} \put(-89,-20){b} \end{picture} - \caption{Blurred segments obtained in line or edge selection mode - as a result of the gradient direction filtering when adding points. - In line selection mode (a), a thick blurred segment is built and - extended all along the brick join. - In edge selection mode (b), a thin blurred segment is built along - one of the two join edges. - Both join edges are detected with the multi-selection option. + \caption{Blurred segments obtained in \textit{line} or \textit{edge + selection mode} as a result of the gradient direction filtering + when adding points. + In \textit{line selection mode} (a), a thick blurred segment is + built and extended all along the brick join. + In \textit{edge selection mode} (b), a thin blurred segment is + built along one of the two join edges. + Both join edges are detected with the \textit{multi-selection} + option. On that very textured image, they are much shorter than the whole join detected in line selection mode. Blurred segment points are drawn in black color, and the enclosing @@ -276,7 +255,7 @@ Another option, called {\it multi-detection} (Algorithm 1), allows the detection of all the segments crossed by the input stroke $AB$. In order to avoid multiple detections of the same edge, an occupancy mask, initially empty, collects the dilated points of all the blurred segments, -so that these points can not be add to another segment. +so that these points can not be added to another segment. First the positions $M_j$ of the prominent local maxima of the gradient magnitude found under the stroke are sorted from the highest to the lowest. @@ -391,6 +370,11 @@ of interfering outliers insertion. \label{fig:noisy} \end{figure} +The automatic detection of blurred segments in a whole image is left +available for testing in an online demonstration at the following address: \\ +{\small \tt +http://ipol-geometry.loria.fr/\~{}kerautre/ipol\_demo/AdaptDirBS\_IPOLDemo/} + %The behavior of the unsupervised detection is depicted through the two %examples of \RefFig{fig:auto}. %The example on the left shows the detection of thin straight objects on a diff --git a/Article/notions.tex b/Article/notions.tex index cc62fe6..00d917d 100755 --- a/Article/notions.tex +++ b/Article/notions.tex @@ -53,6 +53,9 @@ the assigned width $\varepsilon$, then the new input point is rejected.} \label{fig:bs} \end{figure} +Associated to this primitive, the following definition of directional scan +also based on digital straight lines is also used in the following. + \subsection{Directional scan} A directional scan $DS$ is an ordered partition restricted to the image @@ -104,12 +107,12 @@ At each iteration $i$, the scans $S_i$ and $S_{-i}$ are successively processed. \put(-185,112){$A$} \put(-88,14){$B$} \put(-20,98){$\mathcal{D}$} - \put(-137,64){$S_0$} - \put(-77,94){$S_8$} - \put(-183,64){$S_{-5}$} - \put(-123,8){$\mathcal{N}_0$} - \put(-60,30){$\mathcal{N}_8$} - \put(-169,8){$\mathcal{N}_{-5}$} + \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}$}} \end{picture} \caption{A directional scan. The start scan $S_0$ is drawn in blue, odd scans in green, -- GitLab