# A New Approach to Detect Hand-Drawn Dashed Lines in Engineering Sketches
## 5 Tuning Parameters  
As said in the previous section, the algorithm requires the user to define several tuning parameters beforehand. These parameters are used to adapt the algorithm's behavior to the characteristics of the sketch (sketching quality, stroke line style, etc.) and contribute to enhancing the algorithm's overall efficiency. The choice of parameters along with the arguments to support the values assigned to them are explained based on the perceptual principles like the principle of continuity of the Gestalt law, combined with our own experience. Table 1 summarizes the tuning parameters used in the decision-making rules defined in the previous section. They are grouped by their goals. The third column includes the suggested default values based on our experience. The implications of relaxing or restricting these values are also detailed in the table. \begin{table}
\begin{tabular}{p{56.9 pt} p{56.9 pt} p{56.9 pt} p{56.9 pt} p{56.9 pt}} \hline
**Goal** & **Parameter** & **Default Value** & **If Increased** & **If Decreased** \\ \hline \multirow{6}{*}{Exclude implaused dashes} & \multirow{3}{*}{DashSizeMax} & \multirow{3}{*}{50\%} & Computational time would be lost, as implausible dashes should be parsed. & \multirow{3}{*}{Some dashed lines could be incomplete, as legitimate dashes should be labeled as non-candidate dashes.} \\  & & & Even very distant tips could be incorrectly labeled as sharing a vertex with the current stroke, which would be incorrectly labelled as non-candidate dashes & Edges sharing non-perfectly sketched vertices could be incorrectly labeled as (Figure 6). \\ \hline \multirow{6}{*}{DashSizeShortRange} & \multirow{3}{*}{DashSizeShortRange average length} & \multirow{3}{*}{5 (times shorter than average length)} & Excessively short strokes, intended to represent dots, could be accepted as valid dashes (Figure 7). & Only fairly regular dashed lines with dashes close to the average length would be accepted. \\ \cline{2-2}  & & & Excessively long strokes could be accepted as valid dashes, thus incorrectly connecting solid lines to dashed lines. & Only regular dashed lines with dashes close to the average length would be accepted. \\ \cline{2-2}  & \multirow{3}{*}{DashSizeLongRange average length} & \multirow{3}{*}{2.5 (times longer than average length)} & Excessively long strokes could be accepted as valid dashes, thus incorrectly connecting solid lines to dashed lines. & Only regular dashed lines with dashes close to the average length would be accepted. \\ \cline{1-1} \cline{3-3}  & & & Excessively long strokes could be accepted as valid dashes, thus incorrectly connecting solid lines to dashed lines. & Only regular dashed lines with dashes close to the average length would be accepted. \\ \hline \end{tabular}
\end{table} 
Table 1: User-adjustable tuning parameters. Figure 14: Chained stroke. The filter _IsolatedTipThreshold_ is critical to prevent false positives. Failure in removing non-isolated strokes as candidate dashes (resulting from reducing the parameter) can result in false-positive dashed strokes such as those shown in Figure 15.  
The recommended value of the filter _DashSizeShortRange_ (which controls DashLengthMin) may result in false positives (as dash-dot lines are classified as dashed lines) by ignoring the interspersed dots or short dashes (Figure 16). The detection of dash-dot lines in advance would solve this problem. The removal of this filter would naively allow for the detection of dash-dot lines, but short dashes should be parsed as dots (thus preventing checking its orientation, which is prone to be irrelevant). \begin{table}
\begin{tabular}{p{113.8 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline
**Goal** & **Parameter** & **Default Value** & **If Increased** & **If Decreased** \\ \hline \multirow{4}{*}{DashGapShortRange} & \multirow{4}{*}{DashGapShortRange} & \multirow{4}{*}{10 (times shorter than average length)} & Excessively short gaps could be accepted.