%* Last edited: Sep 24 17:27 1995 (misha)
\begin{figure}[htbp]
\sl
\small

\begin{tabbing}
HOUGH TRANSFORM ALGORITHM \\
\\
iii \= \kill
\> shift image SOUTH as pre-processing step \\
\> while \= projections still need to be computed \\
\> \> set sin theta, cos theta, and both band numbers to $\infty$ \\
\> \> for \= as many easterly shifts as it takes to flush the pipeline \\
\> \> \> where \= PE column equals zero and projection is valid \\
\> \> \> \> obtain new sin and cos values from pre-computed table \\
\\
\> \> \> where inside the currently active pipeline \\
\> \> \> \> calculate $\rho$ and wraparound $\rho$ at this PE from sin, cos values \\
\> \> \> \> temporarily shift $\rho$ and wraparound $\rho$ NORTH \\
\> \> \> \> where shifted $\rho$ equals $\rho$, set $\rho$ to $\infty$ \\
\> \> \> \> where shifted wraparound $\rho$ equals wraparound $\rho$, set wraparound $\rho$ to $\infty$ \\
\> \> \> \> where $\rho$ is not $\infty$ set column contribution to image value \\
\> \> \> \> temporarily shift $\rho$ SOUTH \\
\> \> \> \> where shifted $\rho$ equals $\infty$ increment column contribution by pre-processed image value \\
\> \> \> \> where band number is not $\infty$ or $\rho$, shift band number and band total NORTH \\
\> \> \> \> where \= wraparound band number is not $\infty$ or wraparound $\rho$ \\
\> \> \> \> \> shift wraparound band number and wraparound $\rho$ NORTH \\
\> \> \> \> where band number is not $\infty$ or $\rho$ \\
\> \> \> \> \> set wraparound band number to band number \\
\> \> \> \> \> set wraparound band total to band total \\
\> \> \> \> \> set band number to $\infty$ \\ 
\> \> \> \> where $\rho$ is not $\infty$ and band number is not $\infty$ \\
\> \> \> \> \> set band number to $\rho$ \\
\> \> \> \> \> set band total to column contribution \\
\> \> \> \> elsewhere increment band total by column contribution \\
\\
\> \> \> shift $\rho$ and wraparound $\rho$ EAST \\
\> \> \> shift band total and wraparound band total EAST \\
\> \> \> shift sin and cos values EAST \\
\> \> \> if projections still need to be made, advance to next projection \\
\> \> end-for \\  
\> \> now that the mesh is full, store this phase's hough image (band number, \\
\> \> n \= \kill
\> \> \> band total, wraparound band number, and wraparound band total) \\
\> \>  advance to the next phase \\
\> end-while \\
\\
END HOUGH TRANSFORM
\end{tabbing}
\caption{Algorithmic description for the Hough transform.}
\label{fig:hough}
\end{figure}

