\section{Image\-Processor.cpp File Reference}
\label{ImageProcessor_8cpp}\index{ImageProcessor.cpp@{ImageProcessor.cpp}}
{\tt \#include \char`\"{}stdafx.h\char`\"{}}\par
{\tt \#include \char`\"{}resource.h\char`\"{}}\par
{\tt \#include \char`\"{}legoproject\-Dlg.h\char`\"{}}\par
{\tt \#include \char`\"{}Image\-Processor.h\char`\"{}}\par
{\tt \#include \char`\"{}defines.h\char`\"{}}\par
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf WINAPI}~\_\-\_\-stdcall
\item 
\#define {\bf LOGIMAGE}
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void {\bf print\_\-entities} (List$<$ {\bf Entity} $>$ $\ast$objectlist)
\item 
void {\bf send\_\-entities} (List$<$ {\bf Entity} $>$ $\ast$objectlist)
\item 
Image $\ast$ {\bf find\_\-color\_\-objects} (Image $\ast$inputimage, int color, List$<$ {\bf Entity} $>$ $\ast$objectlist)
\item 
Image $\ast$ {\bf get\_\-component} (Image $\ast$input\-Image, int color)
\item 
bool {\bf get\_\-centroid\_\-off\_\-first\_\-object} (Image $\ast$input\-Image, int $\ast$center\_\-row, int $\ast$center\_\-col)
\item 
bool {\bf get\_\-first\_\-non\_\-null\_\-point} (Image $\ast$input\-Image, int $\ast$row, int $\ast$column)
\item 
bool {\bf find\_\-labeled\_\-object} (Image $\ast$input\-Image, int \&row, int \&col, int \&label)
\item 
bool {\bf robot\_\-angle} (Image $\ast$inputimage, int \&center\_\-row, int \&center\_\-col, int \&angle)
\item 
void {\bf log\_\-Image} (Image $\ast$cvipimage, char $\ast$description)
\begin{CompactList}\small\item\em mybriefdef log\_\-Image \item\end{CompactList}\item 
void {\bf view\_\-logged\_\-Image} (CImage $\ast$visimg, int number)
\item 
Image $\ast$ {\bf Robot\_\-Position\_\-and\_\-Angle} (Image $\ast$input\-Image)
\item 
Image $\ast$ {\bf Object\_\-Position\_\-and\_\-Angle} (Image $\ast$input\-Image, int obj\_\-color, int $\ast$obj\_\-row, int $\ast$obj\_\-col, int $\ast$obj\_\-angle)
\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
int {\bf myview} = 0
\item 
int {\bf i\-Image\-Count} = 0
\item 
char {\bf sz\-Name\-Format} [100]
\item 
char {\bf sz\-File\-Name} [100]
\end{CompactItemize}


\subsection{Define Documentation}
\index{ImageProcessor.cpp@{Image\-Processor.cpp}!LOGIMAGE@{LOGIMAGE}}
\index{LOGIMAGE@{LOGIMAGE}!ImageProcessor.cpp@{Image\-Processor.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define LOGIMAGE}\label{ImageProcessor_8cpp_64ee454cf7c20ddd8bb5285e30fc000a}


\index{ImageProcessor.cpp@{Image\-Processor.cpp}!WINAPI@{WINAPI}}
\index{WINAPI@{WINAPI}!ImageProcessor.cpp@{Image\-Processor.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define WINAPI~\_\-\_\-stdcall}\label{ImageProcessor_8cpp_9aa60e1ead64be77ad551e745cbfd4d3}




Definition at line 54 of file Image\-Processor.cpp.

\subsection{Function Documentation}
\index{ImageProcessor.cpp@{Image\-Processor.cpp}!find_color_objects@{find\_\-color\_\-objects}}
\index{find_color_objects@{find\_\-color\_\-objects}!ImageProcessor.cpp@{Image\-Processor.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Image$\ast$ find\_\-color\_\-objects (Image $\ast$ {\em inputimage}, int {\em color}, List$<$ {\bf Entity} $>$ $\ast$ {\em objectlist})}\label{ImageProcessor_8cpp_272104453559ad13abc5bbbf42c76e90}




Definition at line 398 of file Image\-Processor.cpp.

References area(), find\_\-labeled\_\-object(), get\_\-component(), get\_\-first\_\-non\_\-null\_\-point(), Entity::GOAL, GOAL\_\-MAXAREA, GOAL\_\-MINAREA, Entity::ROBOT, robot\_\-angle(), ROBOT\_\-MAXAREA, ROBOT\_\-MINAREA, Entity::set\-Angle(), Entity::set\-Color(), Entity::set\-Type(), Entity::set\-X(), Entity::set\-Y(), Entity::SUBJECT, SUBJECT\_\-MAXAREA, and SUBJECT\_\-MINAREA.

Referenced by Image\-Processor::My\-Algorithm().\index{ImageProcessor.cpp@{Image\-Processor.cpp}!find_labeled_object@{find\_\-labeled\_\-object}}
\index{find_labeled_object@{find\_\-labeled\_\-object}!ImageProcessor.cpp@{Image\-Processor.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool find\_\-labeled\_\-object (Image $\ast$ {\em input\-Image}, int \& {\em row}, int \& {\em col}, int \& {\em label})}\label{ImageProcessor_8cpp_397d65b8635d1caf46005baf5dcda782}




Definition at line 787 of file Image\-Processor.cpp.

Referenced by find\_\-color\_\-objects().\index{ImageProcessor.cpp@{Image\-Processor.cpp}!get_centroid_off_first_object@{get\_\-centroid\_\-off\_\-first\_\-object}}
\index{get_centroid_off_first_object@{get\_\-centroid\_\-off\_\-first\_\-object}!ImageProcessor.cpp@{Image\-Processor.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool get\_\-centroid\_\-off\_\-first\_\-object (Image $\ast$ {\em input\-Image}, int $\ast$ {\em center\_\-row}, int $\ast$ {\em center\_\-col})}\label{ImageProcessor_8cpp_c2e49232b0eb8a47bffd0d4541a32a65}




Definition at line 725 of file Image\-Processor.cpp.

References get\_\-first\_\-non\_\-null\_\-point().

Referenced by Object\_\-Position\_\-and\_\-Angle(), and robot\_\-angle().\index{ImageProcessor.cpp@{Image\-Processor.cpp}!get_component@{get\_\-component}}
\index{get_component@{get\_\-component}!ImageProcessor.cpp@{Image\-Processor.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Image$\ast$ get\_\-component (Image $\ast$ {\em input\-Image}, int {\em color})}\label{ImageProcessor_8cpp_401c0eb9375b541c014a92dbe73a936d}




Definition at line 650 of file Image\-Processor.cpp.

References log\_\-Image(), RGB\_\-BLUE, RGB\_\-GREEN, RGB\_\-RED, threshold\_\-blue, threshold\_\-green, and threshold\_\-red.\index{ImageProcessor.cpp@{Image\-Processor.cpp}!get_first_non_null_point@{get\_\-first\_\-non\_\-null\_\-point}}
\index{get_first_non_null_point@{get\_\-first\_\-non\_\-null\_\-point}!ImageProcessor.cpp@{Image\-Processor.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool get\_\-first\_\-non\_\-null\_\-point (Image $\ast$ {\em input\-Image}, int $\ast$ {\em row}, int $\ast$ {\em column})}\label{ImageProcessor_8cpp_fd56baf1c5cef80f644f9d5811f8a938}




Definition at line 757 of file Image\-Processor.cpp.\index{ImageProcessor.cpp@{Image\-Processor.cpp}!log_Image@{log\_\-Image}}
\index{log_Image@{log\_\-Image}!ImageProcessor.cpp@{Image\-Processor.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void log\_\-Image (Image $\ast$ {\em cvipimage}, char $\ast$ {\em description} = {\tt \char`\"{}\char`\"{}})}\label{ImageProcessor_8cpp_36c79c59696f4032fa2965fb4fc5543b}


mybriefdef log\_\-Image 

mylongdef regle4 Method documentation. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em cvipimage}]The parameter. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]nothing \end{Desc}
\begin{Desc}
\item[See also:]{\bf view\_\-logged\_\-Image()}{\rm (p.\,\pageref{ImageProcessor_8cpp_1bd888a8b8676fa21471b059c0d1a557})} \end{Desc}


Definition at line 911 of file Image\-Processor.cpp.

References i\-Image\-Count, sz\-File\-Name, and sz\-Name\-Format.

Referenced by get\_\-component(), Image\-Processor::My\-Algorithm(), Object\_\-Position\_\-and\_\-Angle(), and robot\_\-angle().\index{ImageProcessor.cpp@{Image\-Processor.cpp}!Object_Position_and_Angle@{Object\_\-Position\_\-and\_\-Angle}}
\index{Object_Position_and_Angle@{Object\_\-Position\_\-and\_\-Angle}!ImageProcessor.cpp@{Image\-Processor.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Image$\ast$ Object\_\-Position\_\-and\_\-Angle (Image $\ast$ {\em input\-Image}, int {\em obj\_\-color}, int $\ast$ {\em obj\_\-row}, int $\ast$ {\em obj\_\-col}, int $\ast$ {\em obj\_\-angle})}\label{ImageProcessor_8cpp_52708bdb02e8ff1ec9939955614f5c89}




Definition at line 1036 of file Image\-Processor.cpp.

References get\_\-centroid\_\-off\_\-first\_\-object(), get\_\-component(), and log\_\-Image().

Referenced by Robot\_\-Position\_\-and\_\-Angle().\index{ImageProcessor.cpp@{Image\-Processor.cpp}!print_entities@{print\_\-entities}}
\index{print_entities@{print\_\-entities}!ImageProcessor.cpp@{Image\-Processor.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void print\_\-entities (List$<$ {\bf Entity} $>$ $\ast$ {\em objectlist})}\label{ImageProcessor_8cpp_a5ef5c6c757b1afa954384024060420d}




Definition at line 335 of file Image\-Processor.cpp.\index{ImageProcessor.cpp@{Image\-Processor.cpp}!robot_angle@{robot\_\-angle}}
\index{robot_angle@{robot\_\-angle}!ImageProcessor.cpp@{Image\-Processor.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool robot\_\-angle (Image $\ast$ {\em inputimage}, int \& {\em center\_\-row}, int \& {\em center\_\-col}, int \& {\em angle})}\label{ImageProcessor_8cpp_570c086359e0136a493058a63f0c7102}




Definition at line 826 of file Image\-Processor.cpp.

References get\_\-centroid\_\-off\_\-first\_\-object(), and log\_\-Image().

Referenced by find\_\-color\_\-objects().\index{ImageProcessor.cpp@{Image\-Processor.cpp}!Robot_Position_and_Angle@{Robot\_\-Position\_\-and\_\-Angle}}
\index{Robot_Position_and_Angle@{Robot\_\-Position\_\-and\_\-Angle}!ImageProcessor.cpp@{Image\-Processor.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Image$\ast$ Robot\_\-Position\_\-and\_\-Angle (Image $\ast$ {\em input\-Image})}\label{ImageProcessor_8cpp_980759bf6f7d43e16a780c9d688f8ec9}




Definition at line 1008 of file Image\-Processor.cpp.

References Object\_\-Position\_\-and\_\-Angle().\index{ImageProcessor.cpp@{Image\-Processor.cpp}!send_entities@{send\_\-entities}}
\index{send_entities@{send\_\-entities}!ImageProcessor.cpp@{Image\-Processor.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void send\_\-entities (List$<$ {\bf Entity} $>$ $\ast$ {\em objectlist})}\label{ImageProcessor_8cpp_eedee3b4314e9e691ae883867a94dc18}




Definition at line 360 of file Image\-Processor.cpp.

Referenced by Image\-Processor::My\-Algorithm(), and My\-App::On\-Run().\index{ImageProcessor.cpp@{Image\-Processor.cpp}!view_logged_Image@{view\_\-logged\_\-Image}}
\index{view_logged_Image@{view\_\-logged\_\-Image}!ImageProcessor.cpp@{Image\-Processor.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void view\_\-logged\_\-Image (CImage $\ast$ {\em visimg}, int {\em number})}\label{ImageProcessor_8cpp_1bd888a8b8676fa21471b059c0d1a557}




Definition at line 952 of file Image\-Processor.cpp.

References sz\-File\-Name, and sz\-Name\-Format.

\subsection{Variable Documentation}
\index{ImageProcessor.cpp@{Image\-Processor.cpp}!iImageCount@{iImageCount}}
\index{iImageCount@{iImageCount}!ImageProcessor.cpp@{Image\-Processor.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf i\-Image\-Count} = 0}\label{ImageProcessor_8cpp_7b1126d1c55ae055a017baf150f2d3c2}




Definition at line 72 of file Image\-Processor.cpp.

Referenced by log\_\-Image(), and Image\-Processor::My\-Algorithm().\index{ImageProcessor.cpp@{Image\-Processor.cpp}!myview@{myview}}
\index{myview@{myview}!ImageProcessor.cpp@{Image\-Processor.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf myview} = 0}\label{ImageProcessor_8cpp_245b94ba59a29b05f8bd5dd4a037ff4b}




Definition at line 56 of file Image\-Processor.cpp.\index{ImageProcessor.cpp@{Image\-Processor.cpp}!szFileName@{szFileName}}
\index{szFileName@{szFileName}!ImageProcessor.cpp@{Image\-Processor.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char {\bf sz\-File\-Name}[100]}\label{ImageProcessor_8cpp_296f5b61e70a6e14fb14dee4453f9ed1}




Definition at line 74 of file Image\-Processor.cpp.

Referenced by log\_\-Image(), and view\_\-logged\_\-Image().\index{ImageProcessor.cpp@{Image\-Processor.cpp}!szNameFormat@{szNameFormat}}
\index{szNameFormat@{szNameFormat}!ImageProcessor.cpp@{Image\-Processor.cpp}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char {\bf sz\-Name\-Format}[100]}\label{ImageProcessor_8cpp_9f2e48327a1ae76cc1f640599a6e7e5a}




Definition at line 73 of file Image\-Processor.cpp.

Referenced by log\_\-Image(), and view\_\-logged\_\-Image().