\section{main.cpp File Reference}
\label{main_8cpp}\index{main.cpp@{main.cpp}}
{\tt \#include $<$assert.h$>$}\par
{\tt \#include $<$iostream$>$}\par
{\tt \#include $<$math.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$time.h$>$}\par
{\tt \#include $<$typeinfo$>$}\par
{\tt \#include \char`\"{}Distance\-Transform.h\char`\"{}}\par
{\tt \#include \char`\"{}Chamfer2D\_\-3x3.h\char`\"{}}\par
{\tt \#include \char`\"{}Chamfer2D\_\-5x5.h\char`\"{}}\par
{\tt \#include \char`\"{}Chamfer2D\_\-7x7.h\char`\"{}}\par
{\tt \#include \char`\"{}Chessboard2D.h\char`\"{}}\par
{\tt \#include \char`\"{}Cityblock2D.h\char`\"{}}\par
{\tt \#include \char`\"{}Dead\-Reckoning\_\-3x3.h\char`\"{}}\par
{\tt \#include \char`\"{}Dead\-Reckoning\_\-7x7.h\char`\"{}}\par
{\tt \#include \char`\"{}Dijkstra\-Vectors.h\char`\"{}}\par
{\tt \#include \char`\"{}Euclidean2D.h\char`\"{}}\par
{\tt \#include \char`\"{}Four\-SED.h\char`\"{}}\par
{\tt \#include \char`\"{}Eight\-SED.h\char`\"{}}\par
{\tt \#include \char`\"{}Eight\-SED\_\-modified.h\char`\"{}}\par
{\tt \#include \char`\"{}Modified\-Dijkstra.h\char`\"{}}\par
{\tt \#include \char`\"{}Simple.h\char`\"{}}\par
{\tt \#include \char`\"{}Simple\-List.h\char`\"{}}\par
{\tt \#include \char`\"{}CSED.h\char`\"{}}\par
{\tt \#include \char`\"{}errorfree\-CSED.h\char`\"{}}\par
{\tt \#include \char`\"{}Timer.h\char`\"{}}\par
{\tt \#include \char`\"{}TIFFWriter.h\char`\"{}}\par
\subsection*{Classes}
\begin{CompactItemize}
\item 
class {\bf Normal}
\begin{CompactList}\small\item\em Normal class which samples random numbers from a normal distribution using the Box-Muller transform. \item\end{CompactList}\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
typedef unsigned char {\bf uchar}\label{main_8cpp_9eabe55f560dcbce9dcf935bbe0db058}

\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
static void {\bf write\-Distance} (const char $\ast$const fname, {\bf Distance\-Transform} $\ast$dt)\label{main_8cpp_cefed03df34a66474784f595ea0da93f}

\item 
static void {\bf write\-Binary\-Image} (const char $\ast$const fname, const uchar $\ast$const I)\label{main_8cpp_d4c4fc3699f25ad2ed46d704de8a213c}

\item 
static void {\bf get\-Min\-Max} ({\bf Distance\-Transform} $\ast$dt)\label{main_8cpp_8bcd27238f938591769fe5c20c898605}

\item 
static uchar {\bf get\-Data} (const uchar $\ast$const I, const int x, const int y)\label{main_8cpp_829301ae9712b37e54205b27a7af6b2c}

\item 
static bool {\bf is\-Border\-Element} (const uchar $\ast$const I, const int x, const int y)\label{main_8cpp_06fa5250a31e9818f8a6a6a0ee57875e}

\item 
static void {\bf check\-Error} (const uchar $\ast$const I, const {\bf Distance\-Transform} $\ast$const dt, const char $\ast$const diff\-File\-Name, const {\bf Distance\-Transform} $\ast$const gold)\label{main_8cpp_93279db30682636ba4a988ea6f22ad4c}

\item 
static void {\bf check\-Error} (const uchar $\ast$const I, const {\bf Distance\-Transform} $\ast$const dt, const char $\ast$const diff\-File\-Name)\label{main_8cpp_5db99835d6e232048af1099c0ece96e8}

\item 
static void {\bf check\-Center\-Point\-Error} ({\bf Distance\-Transform} $\ast$dt)\label{main_8cpp_a41209291809180501d0d4a6bc854af0}

\item 
static void {\bf color\-Parent} (const {\bf Distance\-Transform} $\ast$const dt, const char $\ast$const bin\-File\-Name, const int px, const int py)\label{main_8cpp_bdcd590f4faae668773ded7011e42de7}

\item 
int {\bf main} (const int argc, const char $\ast$const argv[$\,$])\label{main_8cpp_0d6433aa22ee891bc0de328b4ad75950}

\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
static const int {\bf size} = 500\label{main_8cpp_f7bd60b75b29d79b660a2859395c1a24}

\begin{CompactList}\small\item\em 2D images of size x size \item\end{CompactList}\item 
static const int {\bf iter\-Count} = 1\label{main_8cpp_967a6508116c5acd4033e4d542250117}

\item 
static const int {\bf border\-Offset} = 10\label{main_8cpp_f29539bf10163d2cb3cf85b94b9d62ed}

\item 
static const int {\bf pt\-Count} = {\bf size}$\ast${\bf size}/4\label{main_8cpp_6a920fa5a077d123c27faacc015f3f63}

\item 
static int {\bf pt} [pt\-Count][2]\label{main_8cpp_029bccfb0cde54bdf5918aa16d1e27f8}

\end{CompactItemize}


\subsection{Detailed Description}
Main program to test distance transform algorithms.

\begin{Desc}
\item[Author:]George J. Grevera, Ph.D., {\tt ggrevera@sju.edu}\end{Desc}
Copyright (C) 2002, George J. Grevera

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for mor e details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or from {\tt http://www.gnu.org/licenses/gpl.txt.}

This General Public License does not permit incorporating this code into proprietary programs. (So a hypothetical company such as GH (Generally Hectic) should NOT incorporate this code into their proprietary programs.) 