\section{Experimental validation}

\label{sec:expe}

The evaluation stage aims at quantifying the advantages of the new detector
compared to the former one.
For a fair comparison, the process flow of the former method (the initial
detection followed by two refinement steps) was coded as an option of the
new detector, because since that time, the code of basic routineshas
largely been improved.
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
code, all the scan lines were computed and returned, whenever they were used
or not.
We just checked that the outputs of the new coding of the former detector
are equivalent to those of the old release.

\begin{figure}[h]
\center
  \begin{tabular}{c@{\hspace{0.2cm}}c}
    \includegraphics[width=0.49\textwidth]{Fig_expe/buro.png} &
    \includegraphics[width=0.49\textwidth]{Fig_expe/buroNew.png}
    \begin{picture}(1,1)
      \put(-18,30){\circle{8}}
      \put(-22,26){\makebox(8,8){\scriptsize 1}}
      \put(-57,92){\circle{8}}
      \put(-61,88){\makebox(8,8){\scriptsize 2}}
      \put(-53,104){\circle{8}}
      \put(-57,100){\makebox(8,8){\scriptsize 3}}
      \put(-89,49){\circle{8}}
      \put(-93,45){\makebox(8,8){\scriptsize 4}}
      \put(-92,23){\circle{8}}
      \put(-96,19){\makebox(8,8){\scriptsize 5}}
      \put(-134,9){\circle{8}}
      \put(-138,5){\makebox(8,8){\scriptsize 6}}
      \put(-156,27){\circle{8}}
      \put(-160,23){\makebox(8,8){\scriptsize 7}}
      \put(-157,82){\circle{8}}
      \put(-161,78){\makebox(8,8){\scriptsize 8}}
      \put(-39,110){\circle{8}}
      \put(-43,106){\makebox(8,8){\scriptsize 9}}
    \end{picture}
  \end{tabular}
  \caption{Outputs of both former (on left) and new (on right) detectors
           using a selec tionof input strokes.}
  \label{fig:buro}
\end{figure}

The first test compares the computation times of both detectors on a
selection of input strokes (\RefFig{fig:buro}). Results are displayed
in table \RefTab{tab:cmpOldNew}.

\begin{table}
\centering
\begin{tabular}{|l||l|l|l|l|l|l|l|l|l|l|}
\hline \multicolumn{1}{|r||}{Stroke \hspace{0.4cm}} &
       \multicolumn{1}{c|}{1} & \multicolumn{1}{c|}{2} &
       \multicolumn{1}{c|}{3} & \multicolumn{1}{c|}{4} &
       \multicolumn{1}{c|}{5} & \multicolumn{1}{c|}{6} &
       \multicolumn{1}{c|}{7} & \multicolumn{1}{c|}{8} &
       \multicolumn{1}{c|}{9} & \multicolumn{1}{c|}{10} \\ \hline \hline
with the former detector: \hspace{0.4cm}
& 18.2 & 18.2 & 18.2 & 18.2 & 18.2 & 18.2 & 18.2 & 18.2 & 18.2 & 18.2 \\ \hline
with the new detector: & & & & & & & & & & \\ \hline
\end{tabular}
\caption{Compared execution time in milliseconds between former and new
detectors with the input strokes of \RefFig{fig:buro}.}
\label{tab:cmpOldNew}
\end{table}

In the second series of tests, we compare the execution times of both detectors
for the automatic detection of edges on a set of test images. We display the
results for one of them (\RefFig{fig:evalAuto}). X (resp. Y) blurred segments
are extracted with the former (resp. new) detector on all images. The
average execution time is X ms for the former detector, and Y ms for the
new detector.

\begin{figure}[h]
\center
  \begin{tabular}{c@{\hspace{0.2cm}}c}
    \includegraphics[width=0.49\textwidth]{Fig_expe/autoNew.png} &
    \includegraphics[width=0.49\textwidth]{Fig_expe/autoNew.png}
  \end{tabular}
  \caption{Automatic edge detections on one of the test images with the
former detector on the left, and the new detector on the right.}
  \label{fig:evalAuto}
\end{figure}

The former detector do not estimate the edge width, but just circumscribes
the edge with a blurred segment of assigned width.
If the edge is very thin, the blurred segment is free to rotate around the
extracted edge and the provided orientation is biased.
Moreover it lets some space to incorporate additional spurious outliers.
With the new appoach, a real estimation of the edge width is provided.
The main risk of outlier incorporation remains at the beginning of the
blurred segment expansion as long as the minimal width continues to grow
and the assigned width has not been set to the detected segment minimal width.

\begin{figure}[h]
\center
  \begin{tabular}{c@{\hspace{0.2cm}}c}
    \includegraphics[width=0.49\textwidth]{Fig_expe/outliersNew_zoom.png} &
    \includegraphics[width=0.49\textwidth]{Fig_expe/outliersNew_zoom.png}
  \end{tabular}
  \caption{Potential insertion of outliers for both detectors:
On the left, the fixed width of the former detector always lets opportunities
of outlier insertions. On the right, the new detector restricts these
opportunities to the blurred segment early analysis stage.}
  \label{fig:outliers}
\end{figure}

