\section{Chamfer2D\_\-3x3 Class Reference}
\label{class_chamfer2_d__3x3}\index{Chamfer2D_3x3@{Chamfer2D\_\-3x3}}
Borgefors' Chamfer distance using a 3x3 window.  


{\tt \#include $<$Chamfer2D\_\-3x3.h$>$}

Inheritance diagram for Chamfer2D\_\-3x3::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2cm]{class_chamfer2_d__3x3}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Chamfer2D\_\-3x3} (const int {\bf x\-Size}, const int {\bf y\-Size}, const bool unload=true)\label{class_chamfer2_d__3x3_b85b4aea840747251a3c83de790b852c}

\item 
void {\bf do\-Transform} (const unsigned char $\ast$const I)
\item 
void {\bf do\-Transform} (const unsigned char $\ast$const I, const int dx, const int dy, const int dxy, const bool half\-Is\-Zero)
\item 
int {\bf iterate\-Transform} (const unsigned char $\ast$const I)
\item 
int {\bf iterate\-Transform} (const unsigned char $\ast$const I, const int dx, const int dy, const int dxy, const bool half\-Is\-Zero)
\item 
template$<$class T$>$ bool {\bf check2} (T $\ast$d, const int center, const int X, const int Y, const T Delta)\label{class_chamfer2_d__3x3_0c0064ac8b2ede032561a233b6672dbc}

\end{CompactItemize}


\subsection{Detailed Description}
Borgefors' Chamfer distance using a 3x3 window. 



\subsection{Member Function Documentation}
\index{Chamfer2D_3x3@{Chamfer2D\_\-3x3}!doTransform@{doTransform}}
\index{doTransform@{doTransform}!Chamfer2D_3x3@{Chamfer2D\_\-3x3}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Chamfer2D\_\-3x3::do\-Transform (const unsigned char $\ast$const  {\em I}, const int {\em dx}, const int {\em dy}, const int {\em dxy}, const bool {\em half\-Is\-Zero})}\label{class_chamfer2_d__3x3_a1063278afb696ff7544930f800ffed4}


This method performs the distance transform. I is the 2D binary input image. dx \& dy are the distances in the x and y directions (they need not be the same). dxy is the distance in the diagonal direction. If half\-Is\-Zero is true, then border elements (elements of the immediate interior and exterior are initialized with values of 0. If half\-Is\-Zero is false, then border elements are initialized with dx/2 if the border is in the x direction, dy/2 if the border is in the y direction, or min(dx/2, dy/2) for both. \index{Chamfer2D_3x3@{Chamfer2D\_\-3x3}!doTransform@{doTransform}}
\index{doTransform@{doTransform}!Chamfer2D_3x3@{Chamfer2D\_\-3x3}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Chamfer2D\_\-3x3::do\-Transform (const unsigned char $\ast$const  {\em I})\hspace{0.3cm}{\tt  [virtual]}}\label{class_chamfer2_d__3x3_e4f491b87b80e7a1a433d917af000c78}


This method simply calls the other do\-Transform method with the following arguments: do\-Transform(I, 3, 3, 4, true). Arguments of (2,3) have been used to replace (3,4) as well. 

Implements {\bf Distance\-Transform} {\rm (p.\,\pageref{class_distance_transform_720fbb5d558543a7a48c668315118b91})}.\index{Chamfer2D_3x3@{Chamfer2D\_\-3x3}!iterateTransform@{iterateTransform}}
\index{iterateTransform@{iterateTransform}!Chamfer2D_3x3@{Chamfer2D\_\-3x3}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Chamfer2D\_\-3x3::iterate\-Transform (const unsigned char $\ast$const  {\em I}, const int {\em dx}, const int {\em dy}, const int {\em dxy}, const bool {\em half\-Is\-Zero})}\label{class_chamfer2_d__3x3_cbed78ba57c7d8a9294ec971881e67f0}


This method is similar to the do\-Transform method except that it repeats the forward and backward passes of the distance transform algorithm until no more distance updates occur (until convergence, in effect). \index{Chamfer2D_3x3@{Chamfer2D\_\-3x3}!iterateTransform@{iterateTransform}}
\index{iterateTransform@{iterateTransform}!Chamfer2D_3x3@{Chamfer2D\_\-3x3}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int Chamfer2D\_\-3x3::iterate\-Transform (const unsigned char $\ast$const  {\em I})}\label{class_chamfer2_d__3x3_1419fb3011250604952c9947e3994e0c}


This method simply calls the other iterate\-Transform method with the following arguments: iterate\-Transform(I, 3, 3, 4, true). Arguments of (2,3) have been used to replace (3,4) as well. 

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
{\bf Chamfer2D\_\-3x3.h}\item 
{\bf Chamfer2D\_\-3x3.cpp}\end{CompactItemize}
