\documentclass[a4paper]{article}

\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\usepackage{float}
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage[authoryear]{natbib}
\usepackage{hyperref}
\usepackage{babel}
\usepackage[margin=1in]{geometry}

\title{Floc Size and Count App, Spring 2016}
\author{Christian Rodriguez(cer95), Anthony Verghese(akv26), Deniz Yılmazer(dy223)}
\date{\today} % You can write in any date within the brackets.

\begin{document}

\maketitle

% * <cer95@cornell.edu> 2016-05-11T18:44:04.097Z:
%
% I am prety sure that the Results and Analysis section and possibly Future works need to be edited
%
% ^ <akv26@cornell.edu> 2016-05-19T04:09:53.631Z.
% * <cer95@cornell.edu> 2016-05-06T00:16:43.537Z:
%
% In the conclusions section, we can discuss what our final products are, and how maybe we can expand upon this in methods.  WE may also try to reference the images in the essay.  Also, I need to know more about Deniz's part of the code before I can choose a propper picture.
%
% ^ <akv26@cornell.edu> 2016-05-19T04:09:51.355Z.
% * <monroews@gmail.com> 2016-04-28T21:51:31.314Z:
%
% I like Amiel's idea of showing some examples of code. You could show the code that shows the image analysis steps. Provide good documentation in the code so that it will be easy for you to and others to continue improving the code in future semesters.
%
% ^ <akv26@cornell.edu> 2016-05-11T19:13:00.169Z:
%
% Thanks, Christian incorporated images.
%
% ^ <cer95@cornell.edu> 2016-05-16T20:34:04.982Z.
% * <ahm225@cornell.edu> 2016-04-21T05:22:39.617Z:
%
% General comments from Amiel:   Very good work synthesizing so much difficult information into this report! More comments of mine will be in the rubric I send, but here are a few things.
%
% ^ <ahm225@cornell.edu> 2016-04-21T05:24:21.176Z:
%
% 1. Try to add figures or pictures of some kind to give more explanation on difficult topics as well as to improve the visual appeal of this report.
%
% ^ <ahm225@cornell.edu> 2016-04-21T05:25:34.290Z:
%
% 2. Is there a way to include snippets of relevant code? Would it be helpful? I certainly hope that all of the disparate sections of code that you are working on will be collected into a full list and well commented for future researchers!
%
% ^ <ahm225@cornell.edu> 2016-04-21T05:26:47.899Z:
%
% 3. Try to reduce the use of "The Team" in some sentences. The report will become even more professional with more concise statements
%
% ^ <ahm225@cornell.edu> 2016-04-21T05:28:44.708Z:
%
% 4. The references should be uploaded through the Overleaf bibliography functionality. This means re-doing the citations in the text. However, this would properly format all of the citations and the references section at the end. Contact me if you'd like some help getting started with this! 
%
% ^ <akv26@cornell.edu> 2016-05-17T21:58:23.268Z:
%
% I believe we have finished all of these. However, Christian, I'm not sure about his fourth point. Have you fixed that? If so, I can delete this comment. 
%
% ^ <akv26@cornell.edu> 2016-05-19T04:09:45.228Z.
\begin{abstract}
Turbidity measurements are the primary sources of performance data in water treatment plants.   However, turbidity readings of flocculated suspensions do not provide any insight into the performance of subsequent treatment processes. The Floc Size and Count App Team's aim is to create an easy-to-use personal computer application that could measure floc size distribution using a digital camera with appropriate magnification. The app will be written in LabVIEW. The aim for this semester is to develop coding expertise in the LabVIEW environment and start working on the app that will be used in the AguaClara labs and eventually in AguaClara drinking water treatment plants.

\end{abstract}

\section*{Introduction}
The aim of this subteam was to develop an application that could measure the size and number of flocs from an image taken of water flowing at a particular point in an AguaClara treatment plants. This application will be used in the AguaClara project lab as a means of testing different designs for certain aspects of the plant and visualizing how the floc size distribution is affected by the changes. Optimal designs and specifications of the plant, thus, could be made with the aid of the floc size and count application. In addition, by utilizing the software and hardware developed, the operators of the AguaClara plants in Honduras and India would be able to test the efficiency of their respective plant and make sure everything is functioning smoothly by simply checking the application on their computers.  It would work as a way to capture images from the flocculator and count the number of particles in each frame. After this, the program would analyze the physical properties of these floc collections. The floc sizes and masses are important pieces of data to understand the effectiveness of the flocculator since it would show how much of the particles bonded together. The flocculator efficiency translates to sedimentation efficiency since larger particles settle more easily than smaller ones. Therefore, an app that measures floc size and mass would be a way for the operators to learn more about the functionality of the plant and also perform further research.

There are two main components of this project. The first and initial part was to develop the software that would analyze the data. This software was constructed using LabVIEW. The second element is the development of hardware that will be used to collect the data on floc size and distribution, which will make use of cameras. However, this part will probably not be implemented this semester because fixing the code takes a significant amount of time and making sure that the software is running smoothly is crucial. The plan of the team for this semester is to master the LabVIEW environment and implement image analysis.
% * <akv26@cornell.edu> 2016-05-11T19:24:50.798Z:
%
% How do we put the goals and plans for this subteam in the past tense? Do all sentences in the abstract and introduction have to be in the past tense? 
%
% ^ <cer95@cornell.edu> 2016-05-13T15:27:42.308Z:
%
% yes
%
% ^.
% * <ahm225@cornell.edu> 2016-04-21T04:57:01.483Z:
%
% > However, this part will probably not be implemented this semester. 
%
% Make sure to update statements like this to the past tense! Perhaps explain more why the team was focused solely on Part 1 this semester?
%
% ^ <akv26@cornell.edu> 2016-04-22T02:50:05.875Z:
%
% Thanks. Fixed it.
%
% ^ <akv26@cornell.edu> 2016-05-17T21:58:54.533Z.

\section*{Literature Review}
Siwei Sun's thesis, concerning the characterization of flocs and floc size distributions using image analysis, was reviewed, and the content was used to better understand the functionality of the floc application (\citeyear{sewei_sun_characterization_2016}).  She used LabVIEW and its Vision Builder Toolkit to explore particle size distribution changes during flocculation and sedimentation.  The thesis goes into great detail describing how she tested her floc-measuring device.  Different concentrations of polyaluminum chloride as well as clay, specifically kaolinite, were added to water to change turbidity and make sure the image analysis was applicable over a range of conditions.  A detailed flow chart was included, displaying the steps of the experiment and where the hardware was placed (\citeauthor{sewei_sun_characterization_2016}, \citeyear{sewei_sun_characterization_2016}, p. 24, 40).  This information regarding her tests of the experiment was not necessarily useful at this point in time because experimentation will only take place next semester; it may be more helpful in the future, when editing of the current draft of the software is completed.
% * <akv26@cornell.edu> 2016-05-11T19:27:22.598Z:
%
% Are we not allowed to write sentences such as the following because they are in the future tense?...."This information regarding her tests of the experiment was not necessarily useful at this point in time because experimentation will only take place next semester; it may be more helpful in the future, when editing of the current draft of the software is completed."
%
% ^ <dy223@cornell.edu> 2016-05-18T21:29:29.667Z:
%
% we can use future to refer to plans for next semester
%
% ^.
% * <ahm225@cornell.edu> 2016-04-21T05:06:09.795Z:
%
% > (Sun 24, 40)
%
% Overleaf does have a method for adding citations in to the report from your bibliography file. Let me know if you would like any help setting that up! The page of each citation is helpful, though.
%
% ^ <akv26@cornell.edu> 2016-05-17T22:00:41.183Z.
% * <ahm225@cornell.edu> 2016-04-21T05:04:05.202Z:
%
% >  A detailed flow chart was included, displaying the steps of the experiment and where the hardware was placed (Sun 24, 40)
%
% Perhaps you can include some figures cited from her thesis paper? That could help add to the visual appeal of this report!
%
% ^ <akv26@cornell.edu> 2016-04-22T02:41:25.796Z:
%
% Thanks, we fixed this. 
%
% ^ <akv26@cornell.edu> 2016-05-17T22:00:53.595Z.
% * <ahm225@cornell.edu> 2016-04-21T04:59:38.347Z:
%
% > Siwei Sun's thesis, concerning the characterization of flocs and floc size distributions using image analysis, was reviewed
%
% Instead of stating that Siwei's thesis was reviewed by the team, try framing it more like: "Siwei's thesis was crucial to the development of the floc size application.." Sometimes it is more clear to go right to the importance of a paper without bringing up the team's role.
%
% ^ <akv26@cornell.edu> 2016-04-22T02:41:10.621Z:
%
% Thanks, we fixed this.
%
% ^ <akv26@cornell.edu> 2016-05-17T22:01:01.781Z.

More useful was the information describing the hardware and software used. Sun describes how the hardware of the imaging system consisted of an LED light source and a Flea3 FL3-GE-13S2M monochrome GigE camera (\citeauthor{sewei_sun_characterization_2016}, \citeyear{sewei_sun_characterization_2016}, p. 25). The light was incorporated as a means of making sure the image was visible when uploaded onto the computer. With a clearer image, flocs can be distinguished from the surrounding water with greater ease. Another topic that Sun explained was the effect of airy disks. If the edge of a particle at a length scale is close to the wavelength of light, then airy disks often show up (\citeauthor{sewei_sun_characterization_2016}, \citeyear{sewei_sun_characterization_2016}, p. 27). Errors occurred if these airy disks were not taken into account because airy disks cause the computed size of the particle to be inaccurate. Particles that were too small (less than 2.6\(\mu\)m) were often too difficult to analyze and could not be clearly identified. The optimal shutter speed for image contrast was determined to be 330\(\mu\)s or 10 times longer than the minimum shutter speed (\citeauthor{sewei_sun_characterization_2016}, \citeyear{sewei_sun_characterization_2016}, p. 28).
% * <monroews@gmail.com> 2016-03-16T12:53:49.382Z:
%
% > Due to the fact that one pixel was similar to the size
%
% This isn't quite right. Airy disks aren't related to the size of the pixels in the original image. Airy disks are related to the wavelength of light in the image. Airy disks show up anytime you look at the edge of a particle at a length scale that is close to the wavelength of light.
%
% ^ <cer95@cornell.edu> 2016-04-06T23:36:22.345Z:
%
% "Since the size of one pixel is close to the wavelength of visible light (approximately 400-700 nm) (Pal and Pal, 2001), the diffraction of light can result in airy disks around particles in images and errors in particle size measurements."  --Sun 26
%
% ^ <akv26@cornell.edu> 2016-05-17T22:01:13.378Z.

Regarding the software used by Sun, the program began by applying a Gaussian filtering function to smooth the edges of the particles, making them more useful for analysis (\citeauthor{sewei_sun_characterization_2016}, \citeyear{sewei_sun_characterization_2016}, p. 29).  The program then applied a process known as "local thresholding" to the image.  This effectively separates the particles from their surroundings by applying a dark color to the background and a light one to the particles (\citeauthor{sewei_sun_characterization_2016}, \citeyear{sewei_sun_characterization_2016}, p. 29-30).  A closing objects function was then made as a means of filling small holes and smoothing the boundaries of flocs captured in the images.  The program removes flocs that were out of focus.  Out of focus flocs were identified based on a weak light intensity gradient at their borders (\citeauthor{sewei_sun_characterization_2016}, \citeyear{sewei_sun_characterization_2016}, p. 32).  Flocs that are too small are also problematic because they cannot be measured accurately.  The application is also unable to be sure of the dimensions of flocs whose edges cross the borders of the picture frame.  Because of this, flocs that cross the image border were not analyzed.  The remaining particles were then analyzed and their sizes were recorded in a comma separated value (csv) file (\citeauthor{sewei_sun_characterization_2016}, \citeyear{sewei_sun_characterization_2016}, 37). 
% * <monroews@gmail.com> 2016-05-16T19:45:52.232Z:
%
% > comma separated value (csv)
%
% I added the definition and fixed the abbreviation. Always define abbreviations when first used.
%
% ^ <akv26@cornell.edu> 2016-05-17T22:01:46.409Z:
%
% Thanks, Monroe. Sorry about that.
%
% ^ <akv26@cornell.edu> 2016-05-17T22:01:53.638Z.
\begin{figure}[H]
\centering
\includegraphics[scale=0.5]{slslslls}
\caption{Effect of Airy Disks}
\label{Effect of Airy Disks}
\end{figure}

Sun obtained a linear relationship between turbidity and the number of clay particles (44). The slope of the line was determined to be \(1.9*10^6 \pm 2.2*10^5\frac{\mathrm{particles}}{\mathrm{L * NTU}}\)  (\citeauthor{sewei_sun_characterization_2016}, \citeyear{sewei_sun_characterization_2016}, p. 45). In addition, a logarithmic decay plot was created by plotting number of flocs versus PACI dose (\citeauthor{sewei_sun_characterization_2016}, \citeyear{sewei_sun_characterization_2016}, p. 50). Thus, with increased coagulant doses, the concentration of flocs decreased. 
% * <monroews@gmail.com> 2016-03-16T12:58:28.780Z:
%
% >  1.9E6+or-2.2E5
%
% This formatting would be nicer if entered using the equation editor. Also, need to include the units on these numbers. 
%
% ^ <ahm225@cornell.edu> 2016-04-21T05:12:41.431Z:
%
% This could still be formatted better with proper exponents. Check the Overleaf help docs for how to write math text and different operators.
%
% ^ <akv26@cornell.edu> 2016-04-22T02:43:47.041Z:
%
% Thanks. Fixed it.
%
% ^ <monroews@gmail.com> 2016-05-16T19:47:26.842Z.
Some of the topics brought up by Sun in the paper proved to be too advanced and confusing.  For instance, the concepts of thresholding and Gaussian filtering functions were quite difficult to comprehend without previous exposure to them.  Without much context, the reader was left without a solid understanding of what Sun was trying to describe. The thesis, however, provided brief descriptions of other aspects of her research on numerous occasions, maximizing the reader's understanding.
% * <ahm225@cornell.edu> 2016-04-21T05:13:56.317Z:
%
% >  For some reason, most of the equations and associated characters were not present in the provided thesis, such as in the thirty-third page. 
%
% Do you mean that she did not include important equations and variables that she used in her methods / analysis? I am not entirely sure what your critique here is.
%
% ^ <akv26@cornell.edu> 2016-04-22T02:49:33.232Z:
%
% Thanks. We realized that we viewed the thesis in another format then it was written which made the equations seem missing. When we looked at it in the correct format, all the equations were correct and in their places. Thus the only problem about her thesis is that it is too complicated for freshmen to understand.
%
% ^ <monroews@gmail.com> 2016-05-16T19:48:09.857Z.


\section*{Methods and Discussion}

None of the members of the team had previous experience coding or creating software applications in LabVIEW. Therefore, the team focused on learning the tools available. The team was mostly focused on learning the basic data structures in LabVIEW, executables, shift registers, state machines, using configuration files, sub-VIs, type definitions and graphical analysis. In this respect, various teaching resources have been used by the team.
% * <ahm225@cornell.edu> 2016-05-21W11:20:09.912Z:
%
% >  executables, shift registers, state machines, using configuration files, sub-VIs, type definitions and graphical analysis. 
%
% Can you include some definitions of these terms? And other terms throughout the report? Maybe a nice glossary could be created in the results?
%
% ^.

The main source for the team in this process were informative tutorials by National Instruments, the firm that developed LabVIEW.  These tutorials were used for understanding  loops, data types, graphical representations, signal processing and debugging \citep{national_instruments_learn_2016}.  After watching these basic tutorials, the team members took varying approaches in learning how to use LabVIEW. 

Some members of the team continued watching videos from YouTube by groups affiliated with National Instruments.  One such video discussed configuration files \citep{national_instruments_eastern_europe_labview_2014}.  Another discussed the construction of an executable using LabVIEW \citep{enableengvideo_labview_2012}.  After watching these videos, the team members proceeded to put what they had learned into practice in various ways.  

These methods included constructing original programs, analyzing those already provided by LabVIEW, and making  some under the instructions of "White Papers" provided by National Instruments.  Additionally, a calculator was constructed using event structures, and many sub VIs were created as a means of making future programs simpler to make. Together, this work helped foster understanding of LabVIEW and help the members of the team generate ideas as to how the floc size and count application should be made. 
% * <ahm225@cornell.edu> 2016-04-21T05:16:53.690Z:
%
% > Additionally, a calculator was constructed using event structures, and many sub VIs were created as a means of making future programs simpler to make.
%
% Can you add in any figures or screen captures? Perhaps one deliverable could be an informative walkthrough of the software for someone new to it? 
%
% ^ <akv26@cornell.edu> 2016-05-11T19:31:07.494Z:
%
% Thanks, we added screen captures.
%
% ^ <akv26@cornell.edu> 2016-05-17T22:02:04.165Z.

The team refined image analysis code written by Siwei Sun and Casey Garland. The code was analyzed to understand how it worked and what exactly it did. This code was found to be functional but it was disorganized and required scrolling across a large block diagram to read. The team created  subVIs to make the code more readable. The team is also working on the user interface design. By doing this, even those who are not skilled with LabVIEW would be able to work more easily with the code, thus making it more effective and useful in a real-life situation.

\begin{figure}[H]
\centering
\includegraphics[scale=0.35]{cacey}
\label{Single Image Analysis (Original)}
\caption{The above is only a portion of the original code for single image analysis.  The majority of the code is not visible on a single 15 inch monitor.}
\end{figure}
% * <dy223@cornell.edu> 2016-05-10T00:41:41.829Z:
%
% maybe cut the image into parts to show all the code
%
% ^ <dy223@cornell.edu> 2016-05-18T21:30:06.080Z.


% * <monroews@gmail.com> 2016-04-28T21:44:58.374Z:
%
% > The team worked on a preexisting image analysis code written by Sewei Sun and Casey Garland. The code was analyzed to understand how it worked and what exactly it did. This code was found to be functional but it was disorganized and required scrolling across a large block diagram to read. The team has been breaking the code down to subVIs to make it more readable. The team is also working on the user interface design. By doing this, even those who are not skilled with LabVIEW would be able to work more easily with the code, thus making it more effective and useful in a real-life situation.
%
% Throughout the paper make sure to write in the past tense. This will be your final report and thus will describe what you did in the past.
%
% ^ <akv26@cornell.edu> 2016-05-11T19:35:07.966Z:
%
% Thanks, we updated the paper to include past tense where it made sense. However, some sentences in the abstract and the introduction simply had to be future tense to be understandable. Also, when describing aspects of Siwei's code in the literature review, the present tense was necessary. For example,  "If the edge of a particle at a length scale is close to the wavelength of light, then airy disks often show up." What would we do about this? It is a fact that is still occurring in the present, so I assumed that we would use the present tense, but if we should use the past tense please let me know. Thanks.
%
% ^ <akv26@cornell.edu> 2016-05-17T22:05:10.751Z.

Two parts of the process, capturing and analyzing data, were combined into one program that will take a photo and then analyze it according to user selected criteria. The primary goal in making this app is to help with research in the AguaClara project lab. Several teams are working with and researching flocs, so having this app will be very beneficial. In addition, this code will be the final product that will be given to the plant operators for their use. However, the code should be made into an executable app first for it to be used in all of the plants with ease. Therefore, the team learned how to create an executable. One problem with this approach is that the users will need a license for the Vision toolkit for LabVIEW that is used in the program. 
% * <monroews@gmail.com> 2016-05-16T19:57:26.483Z:
%
% > Therefore, makings of an executable was also analyzed by the team extensively.
%
% You can make this sentence simple and clear... Therefore, the team learned how to create an executable.
%
% ^ <akv26@cornell.edu> 2016-05-17T22:06:40.088Z:
%
% Thanks, Monroe.
%
% ^ <akv26@cornell.edu> 2016-05-17T22:06:41.706Z.



% * <monroews@gmail.com> 2016-04-28T21:46:36.108Z:
%
% > the plant operators for their use
%
% Our first goal is to begin using this app in the AguaClara project lab. There are several teams that are working with flocs who will benefit from this code.
%
% ^ <akv26@cornell.edu> 2016-05-03T19:06:41.881Z:
%
% Thanks, we added this. 
%
% ^ <monroews@gmail.com> 2016-05-16T20:07:52.130Z.

The team split into three different "sub-sub-groups" after the initial LabVIEW training and code analysis was completed for greater efficiency. Thus, creation of subVIs, learning more about executables and combining data capturing and analysis parts of the program progressed in parallel, which increased the speed of the team.

To create the subVIs, small parts Garland's new VI; thus, a copy of Garland's code was essentially made that was more user friendly. To allow images to be transferred straight from a camera to the program, the file path aspect at the beginning of the program was taken out and replaced with an image control. After this step was completed, focus was put towards the getting the executable prepared, which was a much harder task.  

To save previous and updated versions of the subVI code, image processing code, and executable made by the team, sourceforge was used. Sourceforge allowed each member of the team to access the same VIs and edit them; although this resembled a google drive account shared amongst other people, sourceforge was a much better choice because a folder was installed on the lab computers' desktops so, rather than having to log onto gmail, code was accessed from the files on the desktop of each computer. This allowed for more efficient work on the code and sped up the process of  working on the floc app. 
% * <ahm225@cornell.edu> 2016-04-21T05:18:51.904Z:
%
% > The team has been working on a preexisting image analysis code. 
%
% What pre-existing code is this? National Instruments? From Siwei? Would be good to cite!
%
% ^ <akv26@cornell.edu> 2016-04-22T02:45:11.364Z:
%
% Thanks. Added Casey's contribution.
%
% ^ <akv26@cornell.edu> 2016-05-17T22:07:09.125Z.
\subsection*{Executable}
In order for the program to run outside of the LabVIEW development environment, an executable and an installer for the project must be built.  Several team members prepared for this task by watching two YouTube videos created by EngableEngVideo; one discussed the creation of executables while the other discussed the creation of installers.  The team then proceeded to practice what had been taught in the video.  These videos went into great detail explaining the numerous setting options that must be decided on when "building" both files.  In terms of the executable, the programmer can decide the name of the program, where it is stored, whether it includes the source code,  the executable's icons, how it starts running (automatically or with the push of a button), and display features.  In terms of installers, the videos explained how to decide where the executable is stored and how to add extra installers to the installer for the team's executable \citep{enableengvideo_labview_2012-1}.  Since the Floc Size and Count App makes use of the Vision Builder Toolkit, this section was particularly useful.  

The team proceeded to create an executable and an installer for a previously created LabVIEW project that uses and edits a configuration file to store setting information.  This exercise was tremendously useful.  It not only provided basic training in the creating these to files, but  it also exposed the team to numerous problems that may occur in an executable.  While running the test-executable, it was discovered that the configuration file generated by the program was not being used.  The cause of this defect, as was later discovered, was that the program stored the file inside of a private directory.  Only when the program was run under administrative settings was the program able to successfully read and edit its configuration file.  To solve this issue, the program was modified so that the configuration file would be saved in the \textit{Public Application Data }directory.  This experience provided great insight into the considerations that need to be taken when creating the executable and installer for the Floc Size and Count App.

\subsection*{Storing Work}

Once the team began to work with Cacey's original LabVIEW code, work was originally stored in AguaClara's Google Drive account.  In order to edit the code, team members downloaded the code from the cloud storage system, make appropriate changes, delete the old files from Google Drive account, and upload the new ones.  This eventually proved to be inconvenient and the team investigated alternative methods.  

It was later discovered that many of the AguaClara subteams whose work consists of developing software store their work on TeamForge.  In this website, users create repositories that store the source code of a project.  A repository for this team had already been developed in AguaClara's TeamForge account with the name \textit{FloatingFloc}. 

Files are originally uploaded from a computer to a repository.  In order to conveniently access and edit the repository, the team utilized the TortoiseSVN program that was installed in AguaClara's lab computers.  For each team member, directories were created that downloaded the repository's files on command.  The repository's URL was required in order to accomplish this (\ref{URL}).  This was done following the instructions from AguaClara's wiki page \citep{carrin_moxley_rachel_j._subversion_2014}. 

\begin{equation}
https://forge.cornell.edu/svn/repos/floating\_\\floc
\label{URL}
\end{equation}

There are many advantages that the team has enjoyed with TeamForge that were not present with Google Drive.  Once this was done, editing became much more natural.  The processes of downloading and uploading the team's work each requires only a click of a button using TeamForge as opposed to logging into a website, traversing a myriad of directories, and selecting the appropriate files.  When "committing" (uploading) to the online repository, TortoiseSVN only updates the files that have been modified by the user.  So, as long as two users working on the same directory edit different files, both edits will be saved after each commits his or her edits to the repository.  In addition to storing the current versions of a file, TeamForge repositories also store prior versions.  This proved to be a particularly useful feature when one of the team members accidentally saved all of the work to a later version of LabVIEW, making it incompatible with specific packages used in the code.  Another team members simply downloaded a previous version of the code and committed it soon after.  
% * <dy223@cornell.edu> 2016-05-10T00:40:42.920Z:
%
% incorprate this into method section
%
% ^ <akv26@cornell.edu> 2016-05-11T19:37:08.664Z:
%
% Should we just delete the executable title? This way the two paragraphs will be in the methods section.
%
% ^ <dy223@cornell.edu> 2016-05-18T21:30:44.010Z:
%
% yes (and storing work part as well)
%
% ^.

\section* {Results and Analysis}
% * <monroews@gmail.com> 2016-04-28T22:35:29.968Z:
%
% > Results and Analysis
%
% Add results of analysis of Casey's image files in this section. Include images and the processing steps.
%
% ^ <akv26@cornell.edu> 2016-05-19T04:10:21.208Z.
\subsection*{Modifying the Code}

The primary objective of the Floc Size and Count App Team was spent on remodeling the original floc analysing software developed by Casey Garland and Siwei Sun.  As shown in Figure 2, the LabVIEW code behind the analysis of each picture was both complicated and long, too long to fit on a single screen.  The large size of the code made it difficult to see the key steps that were used to analyze each image. 

It is worth noting that while creating subVIs, a minor glitch in the original program was discovered.  The display that was supposed to represent the image only after the thresholding was incorrectly connected to the memory location containing the image after the holes were filled.  This error was  corrected.  The thresheld image after this correction had many more holes inside of the flocs and more closely resembled the original image than the previous picture generated by the original code.  This proved to the team that the modification was justified.   

The new code is much more compact and logically organized.  The codes division into subVIs was guided primarily by the image-processing steps outlined in Siwei Sun's Thesis.  The filtering and thresholding processes were combined into a single subVI.  The Hole filling, removal of unfocused flocs, and the analysis of the focused flocs were each turned into individual subVIs (Figure 3).  The final code returned results that perfectly matched the original code's output (minus the improvement mentioned above). 

% * <cer95@cornell.edu> 2016-05-11T22:41:17.075Z:
%
% Get photographs of Cacey's results and our results
%
% ^.
\begin{figure}[H]
\centering
\includegraphics[scale=0.35]{Beginning_GOOT}
\label{Single Image Analysis (Modified)}
\caption{Notice that the whole program fits on one screen.  Its organization strongly correlates to the  steps of image analysis as described in Siwei Sun's Thesis.}
\end{figure}  


\subsection*{Executable}
Using the information acquired from the works of EnableEngVideo, the team was able to create its first executable for a program that analyzes a single image (Figure 4).  Since the program requires image inputs from a camera, it could not be tested.  An installer for this executable was also built after the runtime engines from the Vision LabVIEW package were installed to the appropriate lab computer.  Since the Vision package is not standard, computers would need other runtime engines to be installed to their computer in addition to the standard LabVIEW runtime engine.  Before the installation, an installer that did not include all the recommended additional installers was generated.  In the future, the project team should test both the executable and installer on a computer that does not have LabVIEW or its installers preinstalled; this would be the situation that most computers used in AguaClara plants would face.


\begin{figure}[H]
\centering
\includegraphics[scale=0.35]{Executable}
\label{Single Image Analysis Executable}
\caption{An executable that takes one photo from a camera and analyses it.}
\end{figure}  


\subsection*{Image Acquisition}

The images that the program analyzes needed to be acquired by a camera from the flocculator. To be able to achieve this, the team created an image acquisition VI. The function of the program was limited because of late access to a camera to test the program functionality. However, the VI was in working condition at the end of the semester, able to take images with the camera, save the images to the computer, and return the image itself, which was successfully tested with a simple camera found in the lab.


\subsection*{Final Product}


The final product will be acquiring the data (photos of the flocculator in this case) and analyzing it in a single program. The team finished working on both data analysis and capture parts of the functionality for the product. However, these were two separate VIs at the end of the semester. The attempts to combine them together had not been successful. The image taken from the image acquisition VI was not compatible with the image requirements for the analysis VI. Using the file path for the saved image could be a way to fix this problem.

% * <dy223@cornell.edu> 2016-05-18T21:31:37.128Z:
%
% > Deniz, discuss how you are very close to completing it and how another semester would help us complete this part of the code. Also, explain how we used a camera to test the image processing part. Finally, fix my improper language of image processing part...I forgot what we called this part. 
%
% on it
%
% ^ <dy223@cornell.edu> 2016-05-18T21:48:23.944Z.


\section*{Conclusions}
% * <cer95@cornell.edu> 2016-05-11T22:02:23.531Z:
%
% Consider Removeing Conclusion and just leaveing future work or the reverse   Seem to be the same since did little analysis.
%
% ^ <akv26@cornell.edu> 2016-05-19T04:09:32.824Z.
Despite having difficulty with learning LabVIEW, a complex language to get accustomed to when used to languages such as java and matlab, for the first half of the semester, the first semester of the Floc App team was quite successful. Being one of the few teams using LabVIEW was quite tough because there were few people to aid the team when complications occurred. In addition, Casey and Siwei's code was quite complex, so trying to make sense of the given code that was necessary for editing was a tough process. 

However, after getting used to the LabVIEW platform, working on the code became slightly easier. The subVI program was created successfully and is much more user-friendly, a great benefit for other teams that will use the floc application for their own research. In addition, the executable and image processing part of the code were almost completely finished, thus displaying how the application can soon be used by other subteams and possibly workers at the Agua Clara plants in Honduras. 


\section*{Future Work}
% * <monroews@gmail.com> 2016-04-28T21:48:33.260Z:
%
% > Future Work
%
% ask Casey for a folder of images that you can analyze.
%
% ^ <dy223@cornell.edu> 2016-05-18T21:32:10.035Z.
Completing the image processing aspect of the code is the next step for the Floc App team. Currently, there are a few bugs in this part of the program, but fixing them should only take a few weeks in the 2016 Fall semester. 

After the image processing aspect of the code functions properly, the data acquisition and analysis will be combined into one continuous program.  To do this, the team needs to decide on the best way to implement this (use event structure, state machine, etc). The team also aims to make the program able to analyze an array of images instead of a single image. In a real situation, a camera will be taking many pictures at once, so having a program that can analyze many pictures continuously is very important. The team will additionally continue to develop the user interface of the program, making it easier to use. 

Finally, the hardware components of the project will be added to be able to acquire new images. Members of the team will conduct research in order to find components that balance quality and price. The hardware will then be tested for compatibility and performance with the LabVIEW software in the AguaClara lab. 


\clearpage

\part*{Semester Schedule}

\subsection*{Task Map}
\begin{figure}[H]
\centering
\includegraphics[scale=0.5]{Spring_2016_Task_Map}
\caption{Spring 2016 Task Map}
\label{ExampleTaskMap}
\end{figure}

\subsection*{Task List}
 
\begin{enumerate}
\item Watching tutorial videos to learn LabVIEW - 02/24 - all members
\item Practice Coding - 03/23 - all members
\begin{itemize}
\item Loops: Learned about how for and while loops are used in LabVIEW. All group members had previous experiencing with loops, but the unique aspects of LabVIEW made it somewhat confusing. However, tutorial videos as well as practice with LabVIEW helped promote understanding. Finished learning about loops 2/15. 
\item Shift Registers: Shift registers were studied because converting output values into input values in loops became a necessity as more complex practice was carried out. Finished learning about and practicing with shift registers 2/15
\item State Machines: State machines allowed the members of the group to essentially create a set of if statements. Certain actions were carried out if certain specifications were met. A mock vending machine was created using a state machine. Finished learning about and practicing with state machines 2/22
\item Sub-VIs: Sub-VIs are essentially functions, and can be utilized in future programs to reduce the amount of code that must be written. This makes the code more user friendly, which is the main goal of this application. Finished learning about and practicing with Sub-VIs 3/3
\item Executables: Youtube videos about executables were watched; however, the topics were quite complex, so actual testing with executables was not conducted. Further research into executables will be done in the upcoming week. 
\item Configuration Files: Although the team has looked into Configuration Files, more time needs to be spent on this subject. 
\item Type Definition: Further research into the uses of type definitions must be conducted in the upcoming week. 
\item Graphical Analysis: Using the graphical representation tools provided by LabVIEW will be further studied this week, because it will be very important as the group begins working on the actual application. 
\end{itemize}
\item Start editing the code given by Casey Garland- 03/15
\begin{itemize}
\item Take specific parts of the code and put them into subfunctions. Also, get rid of unnecessary parts of the original code. 
\item Create a new VI with these subfunctions. This new VI is more organized and no longer has the unnecessary parts of the original code. 
\end{itemize}
\item Decide on functionality of the final program - 03/29 - all members
\item Make program be able to process multiple photos continuously- 04/20- all members
% * <monroews@gmail.com> 2016-04-28T22:28:56.116Z:
%
% > Make program be able to process multiple photos continuously- 04/20- all members
%
% Could you be able to show me this as an executable at our next meeting? This would be awesome.
%
% ^ <akv26@cornell.edu> 2016-05-17T22:08:09.107Z.
\begin{itemize}
\item Use event structures and loops to allow multiple photos to be processed continuously. 
\item A VI will be created that completes this action. 
\end{itemize}
\item Create a working version of the post processing image analysis part of the program - 05/10 - all members
\item Order hardware needed to upload photos to program and test the code with continuously generated photos- 05/20- all members
\end{enumerate}
\newpage
\section*{Glossary}
\begin{itemize}
\item \textbf{development environment}: A program that is used to edit the source code of a program.
\item \textbf{executable}: A program that can run independent of a programming environment; they provide instructions directly to the computer for execution.
\item \textbf{floc}:  A clump of pollutants bonded together with coagulant.
\item \textbf{Gaussian Filter}:  A way of manipulating the pixels of an image so that their values are closer to local average values.
\item \textbf{local thresholding}:  A process that compares a pixel value to those of neghboring pixels and determines whether the pixel is part of the "background" or not; pixels representing the background are given one color while those that do not are given a different color.
\item \textbf{installer}: A program that facilitates the installation of an executable, sometimes installing other necessary programs.
\item\textbf{repository}: A folder stored in the accounts of numerous source code management websites.  In practice, a repository stores the source code behind different projects as well as other related files.
\item\textbf{source code}: The instructions that govern how a program operates.
\item \textbf{subVI}:  A method in a LabVIEW program that is used by another method.
\item\textbf{TortoiseSVN}: A program that allows for the manipulation and access of SubVersion repositories.  To use the program, select a computer directory and use the repository's URL to "sync" the directory with the repository.  SubVersion is simply a means of controlling and distributing software.  TeamForge uses this system, and so is compatible with TortoiseSVN.
\item \textbf{VI}:  A method in a LabVIEW program.
\item \textbf{Vision Builder Toolkit}:  a collection of objects and methods for LabVIEW that facilitate the manipulation and analysis of images.
\end{itemize}

\clearpage
\bibliographystyle{apalike}
\bibliography{AguaClara}
\end{document}