\begin{algorithm}[h]
  \SetAlgoLined
  \SetKwInOut{Input}{input}
  \SetKwInOut{Output}{output}

  \SetKwData{image}{$\mathcal{I}$}
  \SetKwData{iwidth}{$W_I$}
  \SetKwData{iheight}{$H_I$}
  \SetKwData{resol}{$\delta$}
  \SetKwData{nullset}{$\emptyset$}
  \SetKwData{Result}{Result}

  \SetKwArray{mask}{$\mathcal{M}$}
  \SetKwArray{bslist}{BSL}
  
  \SetKwFunction{multi}{MultiDetect}
  \SetKwFunction{pt}{Pt}

  \SetKwData{Begin}{Start}
  \SetKwData{End}{End}
  
  \Input{Image \image, width \iwidth, height \iheight, resolution \resol}
  \Output{\textit{\bslist} $\rightarrow$ list of detected blurred segments}
  \BlankLine
  \bslist $\leftarrow$ \nullset\;
  \mask $\leftarrow$ \nullset\;
  $i \leftarrow$ \resol/2\;
  \Repeat{$i <$ \iwidth/2}{
    \bslist $\leftarrow$ \bslist + \multi (\pt(\iwidth/2-i,\iheight),
                                           \pt(\iwidth/2-i,0), \mask)\;
    \bslist $\leftarrow$ \bslist + \multi (\pt(\iwidth/2+i,\iheight),
                                           \pt(\iwidth/2+i,0), \mask)\;
    $i \leftarrow i -$ \resol\;
  }
  $i \leftarrow$ \resol/2\;
  \Repeat{$i <$ \iheight/2}{
    \bslist $\leftarrow$ \bslist + \multi (\pt(0,\iheight/2-i),
                                           \pt(\iwidth,\iheight/2-i), \mask)\;
    \bslist $\leftarrow$ \bslist + \multi (\pt(0,\iheight/2+i),
                                           \pt(\iwidth,\iheight/2+i), \mask)\;
    $i \leftarrow i -$ \resol\;
  }
  
  \caption{AutoDetect: finds all blurred segments in the image.}
\end{algorithm}
