\begin{algorithm}[h] \SetAlgoLined \SetKwInOut{Input}{input} \SetKwInOut{Output}{output} \SetKwData{lm}{LocMax} \SetKwData{nullset}{$\emptyset$} \SetKwData{ortho}{$\vec{AB}_\perp$} \SetKwData{eps}{$\varepsilon_{ini}$} \SetKwData{pta}{$A$} \SetKwData{ptb}{$B$} \SetKwData{Result}{Result} \SetKwArray{occmask}{OccupancyMask} \SetKwArray{bseg}{BlurredSegment} \SetKwArray{bslist}{ListOfBlurredSegments} \SetKwFunction{locmax}{ComputeAndSortGradientLocalMax} \SetKwFunction{sortgradmax}{SortByGradientMagnitude} \SetKwFunction{taille}{Size} \SetKwFunction{cardinal}{Card} \SetKwData{Begin}{Start} \SetKwData{End}{End} \Input{Stroke points \pta, \ptb} \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, \occmask)\; \For{$j \leftarrow 0$ \KwTo \cardinal (\bseg)}{ \occmask $\leftarrow$ \bseg[j]\; } \bslist $\leftarrow$ \bseg\; } \caption{MultiDetection: finds all blurred segments under an input stroke.} \end{algorithm}