Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
2019 FBSD
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kerautret Bertrand
2019 FBSD
Commits
3635757a
Commit
3635757a
authored
6 years ago
by
even
Browse files
Options
Downloads
Patches
Plain Diff
Article: reorganization
parent
908e9276
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Article/Fig_method/algoMulti.tex
+6
-7
6 additions, 7 deletions
Article/Fig_method/algoMulti.tex
Article/main.tex
+1
-1
1 addition, 1 deletion
Article/main.tex
Article/method.tex
+125
-12
125 additions, 12 deletions
Article/method.tex
Article/notions.tex
+16
-129
16 additions, 129 deletions
Article/notions.tex
with
148 additions
and
149 deletions
Article/Fig_method/algoMulti.tex
+
6
−
7
View file @
3635757a
...
...
@@ -11,9 +11,9 @@
\SetKwData
{
ptb
}{$
B
$}
\SetKwData
{
Result
}{
Result
}
\SetKwArray
{
occ
mask
}{
OccupancyMask
}
\SetKwArray
{
mask
}{
$
\mathcal
{
M
}$
}
\SetKwArray
{
bseg
}{
BlurredSegment
}
\SetKwArray
{
bslist
}{
ListOfB
lurredSegments
}
\SetKwArray
{
bslist
}{
ListOfB
S
}
\SetKwFunction
{
locmax
}{
ComputeAndSortGradientLocalMax
}
\SetKwFunction
{
sortgradmax
}{
SortByGradientMagnitude
}
...
...
@@ -24,20 +24,19 @@
\SetKwData
{
End
}{
End
}
\Input
{
Stroke points
\pta
,
\ptb
}
\Input
{
Occupancy mask
\mask
}
\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
,
\
occ
mask
)
\;
\bseg
$
\leftarrow
$
detect (
\lm
[i]
,
\ortho
,
\eps
,
\mask
)
\;
\For
{$
j
\leftarrow
0
$
\KwTo
\cardinal
(
\bseg
)
}{
\
occ
mask
$
\leftarrow
$
\bseg
[j]
\;
\mask
$
\leftarrow
$
\bseg
[j]
\;
}
\bslist
$
\leftarrow
$
\bseg\;
}
\caption
{
MultiDetection:
finds all blurred segments under an input stroke.
}
\caption
{
MultiDetect: finds all blurred segments from input selection.
}
\end{algorithm}
This diff is collapsed.
Click to expand it.
Article/main.tex
+
1
−
1
View file @
3635757a
...
...
@@ -35,7 +35,7 @@
\begin{abstract}
\input
{
abstract
}
\keywords
{
Line detection
\and
discrete
geometry
\and
ONE MORE PLEASE.
}
\keywords
{
Line detection
\and
discrete
objects
\and
image analysis
}
\end{abstract}
\end{frontmatter}
...
...
This diff is collapsed.
Click to expand it.
Article/method.tex
+
125
−
12
View file @
3635757a
...
...
@@ -43,8 +43,8 @@ The initial detection consists in building and extending a blurred segment
$
\mathcal
{
B
}_
1
$
based on the highest gradient points found in each scan
of a static directional scanner based on an input segment
$
AB
$
.
Validity tests
based on the length or sparsity of
$
\mathcal
{
B
}_
1
$
are
applied to decide of the detection poursuit. In case of positive response,
Validity tests
aiming at rejecting too short or too sparse blurred segments
are
applied to decide of the detection poursuit. In case of positive response,
the position
$
C
$
and direction
$
\vec
{
D
}$
of this initial blurred segment
are extracted.
...
...
@@ -60,6 +60,124 @@ appropriate direction.
The fine track output segment is finally filtered to remove artifacts
and outliers, and a solution blurred segment
$
\mathcal
{
B
}_
3
$
is provided.
\subsection
{
Adaptive directional scan
}
The blurred segment is searched within a directional scan with a position
and an orientation approximately provided 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 second search is then run using another directional scan aligned
on the detected segment.
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.
\begin{figure}
[h]
\center
\begin{tabular}
{
c
}
\includegraphics
[width=0.49\textwidth]
{
Fig
_
notions/escapeFirst
_
zoom.png
}
\end{tabular}
\caption
{
Example of early detection failures
on side escapes from the directional scan.
}
\label
{
fig:escape
}
\end{figure}
%Even in ideal situation where the detected segment is a perfect line,
%its width is never null as a result of the discretization process.
%The estimated direction accuracy is mostly constrained by the length of
%the detected segment.
%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.
%This side shift is amplified in situations where the blurred segment is
%left free to get thicker in order to capture possible noisy features.
%The assigned width is then still greater than the detected minimal width,
%so that the segment can move within the directional scan.
%Knowing the detected blurred segment shape and the image size, it is
%possible to define a conic scan area, but this solution is computationaly
%expensive because it leads to useless exploration of large image areas.
%
%\begin{figure}[h]
%\center
% %\begin{picture}(300,40)
% %\end{picture}
% \input{Fig_notions/bscone}
% \caption{Possible extension area based
% on the detected blurred segment preimage.}
% \label{fig:cone}
%\end{figure}
To overcome this issue, in the former work, an additional refinement step is
run using the better orientation estimated from the longer segment obtained.
It is enough to completely detect most of the tested edges, but certainly
not all, especially if larger images with much longer edges are processed.
%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,
%and to perform two fine detection steps, using for each of them the direction
%found at the former step.
As a solution, this operation could be itered as long as the blurred segment
escapes from the directional scanner using as any fine detection steps as
necessary.
But at each iteration, already tested points are processed again,
thus producing a useless computational cost.
Here the proposed solution is to dynamically align the scan direction to
the blurred segment one all along the expansion stage.
At each iteration
$
i
$
, the scan strip is updated using the direction
of the blurred segment computed at previous iteration
$
i
-
1
$
.
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
}
\left
|
\begin{array}
{
l
}
\delta
(
\mathcal
{
N
}_
i) = -
\delta
^{
-1
}
(
\mathcal
{
D
}_
0)
\\
\wedge
~ h
_
0(
\mathcal
{
N
}_
i) = h
_
0(
\mathcal
{
N
}_{
i-1
}
) + p(
\mathcal
{
D
}
)
\\
\wedge
~
\mathcal
{
D
}_{
i
}
= D (
\mathcal
{
B
}_{
i-1
}
,
\varepsilon
+ k), i < 1
\end{array}
\right
.
\right\}
\end{equation}
where
$
D
(
\mathcal
{
B
}_
i,w
)
$
is the scan strip aligned to the
detected segment at iteration
$
i
$
with width
$
w
$
.
In practice, the scan width is set a little greater than the assigned
width
$
\varepsilon
$
(
$
k
$
is a constant arbitrarily set to 4).
The last clause expresses the update of the scan bounds at iteration
$
i
$
.
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]
\center
\begin{tabular}
{
c@
{
\hspace
{
0.2cm
}}
c
}
\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
using an adaptive directional scan.
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}
\subsection
{
Control of the assigned width
}
The assigned width
$
\varepsilon
$
to the blurred segment recognition algorithm
is initially set to a large value
$
\varepsilon
_
0
$
in order to allow the
detection of large blurred segments.
Then, when no more augmentation of the minimal width is observed after
$
\lambda
$
iterations (
$
\mu
_{
i
+
\lambda
}
=
\mu
_
i
$
), it is set to a much
stricter value able to circumscribe the possible interpretations of the
segment, that take into account the digitization margins:
\begin{equation}
\varepsilon
=
\mu
_{
i+
\lambda
}
+ 1/2
\end{equation}
This strategy aims at preventing the incorporation of spurious outliers in
further parts of the segment.
Setting the observation distance to a constant value
$
\lambda
=
20
$
seems
appropriate in most experimented situations.
\subsection
{
Supervised blurred segment detection
}
In supervised context, the user draws an input stroke across the specific
...
...
@@ -112,11 +230,11 @@ the awaited one.
\parbox
{
0.22
\textwidth
}{
\centering
{
\scriptsize
{
c)
}}}
&
\parbox
{
0.22
\textwidth
}{
\centering
{
\scriptsize
{
d)
}}}
\end{tabular}
\caption
{
Example of edge disclosed by the multi-detection mode
:
a)
the
input selection
on the intensity ima
ge,
b)
the
gradient map,
c)
the only sharper edge detected in classical single mode
,
d)
a neighbouring edge disclosed by the multi-detection mode
.
}
\caption
{
Detection of close edges with different sharpness
:
a) input selection
across the ed
ge
s
,
b) gradient map,
c)
in single mode, detection of only the edge with the higher gradient
,
d)
in multi-detection mode, detection of both edges
.
}
\label
{
fig:voisins
}
\end{figure}
...
...
@@ -194,8 +312,3 @@ the gradient magnitude with similar orientations.
\caption
{
Automatic detection of blurred segments.
}
\label
{
fig:auto
}
\end{figure}
% \subsection{Implementation details}
%
% A directional scanner is encoded as an iterator that provides successively
% all the scan lines.
This diff is collapsed.
Click to expand it.
Article/notions.tex
+
16
−
129
View file @
3635757a
...
...
@@ -59,9 +59,11 @@ domain $\mathcal{I}$ of a digital straight line $\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}
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\}
DS =
\left\{
S
_
i =
\mathcal
{
D
}
\cap
\mathcal
{
N
}_
i
\cap
\mathcal
{
I
}
\left
|
\begin{array}
{
l
}
\delta
(
\mathcal
{
N
}_
i) = -
\delta
^{
-1
}
(
\mathcal
{
D
}
)
\\
\wedge
~ h
_
0(
\mathcal
{
N
}_
i) = h
_
0(
\mathcal
{
N
}_{
i-1
}
) + p(
\mathcal
{
D
}
)
\end{array}
\right
.
\right\}
%S_i = \mathcal{D} \cap \mathcal{N}_i, \mathcal{N}_i \perp \mathcal{D}
\end{equation}
In this expression, the clause
...
...
@@ -74,8 +76,10 @@ 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)
a positive (resp. negative) sign if they are on the left (resp. right)
side of
$
\mathcal
{
N
}_
0
$
.
The directional scan is iterately processedfrom the start scan to both ends.
At each iteration
$
i
$
, the scans
$
S
_
i
$
and
$
S
_{
-
1
}$
are successively processed.
\begin{figure}
[h]
\center
...
...
@@ -95,17 +99,17 @@ 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
$
,
the scan strip is defined by :
\begin{equation}
\mathcal
{
D
}
(A,B) =
\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
where
$
\delta
_
x
=
x
_
B
-
x
_
A
$
,
$
\delta
_
y
=
y
_
B
-
y
_
A
$
,
$
c
_
1
=
\delta
_
x
\cdot
x
_
A
+
\delta
_
y
\cdot
y
_
A
$
and
$
c
_
2
=
\delta
_
x
\cdot
x
_
B
+
\delta
_
y
\cdot
y
_
B
$
.
The scan line
$
\mathcal
{
N
}_
i
$
is then defined by :
\begin{equation}
\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
}
)
\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
}
)
\end{equation}
where
$
\nu
_{
AB
}
=
max
(
|
\delta
_
x|, |
\delta
_
y|
)
$
...
...
@@ -115,132 +119,15 @@ where $\nu_{AB} = max (|\delta_x|, |\delta_y|)$
%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
)
$
,
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 :
\begin{equation}
\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)
=
\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
{
N
}_
i
(
C,
\vec
{
D
}
,w
)
$
:
\begin{equation}
\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|)
\end{equation}
\subsection
{
Adaptive directional scan
}
The blurred segment is searched within a directional scan with a position
and an orientation approximately provided 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 second search is then run using another directional scan aligned
on the detected segment.
However, even in the case of an exact 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.
\begin{figure}
[h]
\center
\begin{tabular}
{
c
}
\includegraphics
[width=0.49\textwidth]
{
Fig
_
notions/escapeFirst
_
zoom.png
}
\end{tabular}
\caption
{
Example of early detection failures
on side escapes from the directional scan.
}
\label
{
fig:escape
}
\end{figure}
%Even in ideal situation where the detected segment is a perfect line,
%its width is never null as a result of the discretization process.
%The estimated direction accuracy is mostly constrained by the length of
%the detected segment.
%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.
%This side shift is amplified in situations where the blurred segment is
%left free to get thicker in order to capture possible noisy features.
%The assigned width is then still greater than the detected minimal width,
%so that the segment can move within the directional scan.
%Knowing the detected blurred segment shape and the image size, it is
%possible to define a conic scan area, but this solution is computationaly
%expensive because it leads to useless exploration of large image areas.
%
%\begin{figure}[h]
%\center
% %\begin{picture}(300,40)
% %\end{picture}
% \input{Fig_notions/bscone}
% \caption{Possible extension area based
% on the detected blurred segment preimage.}
% \label{fig:cone}
%\end{figure}
In the former work, an additional refinement step is run using the better
orientation estimated from the longer segment obtained.
It is enough to completely detect most of the tested edges, but certainly
not all, especially if larger images with much longer edges are processed.
%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,
%and to perform two fine detection steps, using for each of them the direction
%found at the former step.
This operation could be itered as long as the blurred segment escapes from
the directional scanner using as any fine detection steps as necessary.
But at each iteration, already tested points are processed again,
thus producing a useless computational cost.
Here the proposed solution is to dynamically align the scan direction to
the blurred segment one all along the expansion stage.
At each iteration
$
i
+
1
$
, the scan strip is updated using the direction
of the blurred segment computed at previous iteration
$
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
}
\left
|
\begin{array}
{
l
}
\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
+ k)
\end{array}
\right
.
\right\}
\end{equation}
where
$
D
(
\mathcal
{
B
}_
i,w
)
$
is the scan strip aligned to the
detected segment at iteration
$
i
$
with width
$
w
$
.
In practice, the scan width is set a little greater than the assigned
width
$
\varepsilon
$
(
$
k
$
is a constant arbitrarily set to 4).
The last clause expresses the update of the scan bounds at iteration
$
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]
\center
\begin{tabular}
{
c@
{
\hspace
{
0.2cm
}}
c
}
\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
using an adaptive directional scan.
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}
\subsection
{
Control of the assigned width
}
The assigned width
$
\varepsilon
$
to the blurred segment recognition algorithm
is initially set to a large value
$
\varepsilon
_
0
$
in order to allow the
detection of large blurred segments.
Then, when no more augmentation of the minimal width is observed after
$
\lambda
$
iterations (
$
\mu
_{
i
+
\lambda
}
=
\mu
_
i
$
), it is set to a much
stricter value able to circumscribe the possible interpretations of the
segment, that take into account the digitization margins:
\begin{equation}
\varepsilon
=
\mu
_{
i+
\lambda
}
+ 1/2
\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|)
\end{equation}
This strategy aims at preventing the incorporation of spurious outliers in
further parts of the segment.
Setting the observation distance to a constant value
$
\lambda
=
20
$
seems
appropriate in most experimented situations.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment