Index: /other-projects/is-sheet-music-encore/trunk/image-identification-development/.idea/workspace.xml
===================================================================
--- /other-projects/is-sheet-music-encore/trunk/image-identification-development/.idea/workspace.xml	(revision 33309)
+++ /other-projects/is-sheet-music-encore/trunk/image-identification-development/.idea/workspace.xml	(revision 33310)
@@ -3,6 +3,4 @@
   <component name="ChangeListManager">
     <list default="true" readonly="true" id="9bad4f92-4a7d-46a2-b6f0-94214c9f55cc" name="Default" comment="">
-      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/out/production/image-identification/Main.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/image-identification/Main.class" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/src/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Main.java" afterDir="false" />
     </list>
@@ -20,16 +18,15 @@
         <entry file="file://$PROJECT_DIR$/src/Main.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="801">
-              <caret line="326" selection-start-line="326" selection-end-line="326" />
+            <state relative-caret-position="506">
+              <caret line="504" column="30" selection-start-line="504" selection-start-column="30" selection-end-line="504" selection-end-column="30" />
               <folding>
                 <element signature="imports" expanded="true" />
                 <element signature="class#StartAndEndPoint#0;class#Main#0" />
                 <element signature="method#removeDuplicates#0;class#Main#0" />
-                <element signature="method#StandardDeviation#0;class#Main#0" />
                 <element signature="method#toBufferedImage#0;class#Main#0" />
                 <element signature="method#ClassifierPixelCount#0;class#Main#0" />
                 <element signature="method#ClassifierLineCount#0;class#Main#0" />
                 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-                <element signature="e#7430#7439#0" expanded="true" />
+                <element signature="e#7453#7462#0" expanded="true" />
               </folding>
             </state>
@@ -75,4 +72,5 @@
     <property name="project.structure.proportion" value="0.15" />
     <property name="project.structure.side.proportion" value="0.2" />
+    <property name="run.code.analysis.last.selected.profile" value="pProject Default" />
     <property name="settings.editor.selected.configurable" value="preferences.lookFeel" />
   </component>
@@ -142,7 +140,9 @@
   <component name="ToolWindowManager">
     <frame x="65" y="24" width="1855" height="1056" extended-state="6" />
+    <editor active="true" />
     <layout>
       <window_info anchor="right" id="Palette" order="4" />
       <window_info anchor="bottom" id="TODO" order="10" />
+      <window_info anchor="bottom" id="Messages" order="3" weight="0.32822084" />
       <window_info anchor="right" id="Palette&#9;" order="1" />
       <window_info id="Image Layers" order="4" />
@@ -150,16 +150,17 @@
       <window_info anchor="bottom" id="Event Log" order="1" side_tool="true" />
       <window_info anchor="right" id="Maven Projects" order="3" />
+      <window_info active="true" anchor="bottom" id="Run" order="6" visible="true" weight="0.33742332" />
       <window_info anchor="bottom" id="Version Control" order="2" />
-      <window_info anchor="bottom" id="Run" order="6" weight="0.22392638" />
       <window_info anchor="bottom" id="Terminal" order="0" weight="0.42638037" />
       <window_info id="Capture Tool" order="2" />
       <window_info id="Designer" order="0" />
       <window_info content_ui="combo" id="Project" order="5" weight="0.18382749" />
+      <window_info anchor="bottom" id="Find" order="5" weight="0.32924336" />
       <window_info id="Structure" order="6" side_tool="true" weight="0.25" />
       <window_info anchor="right" id="Ant Build" order="6" weight="0.25" />
       <window_info id="UI Designer" order="1" />
       <window_info anchor="right" id="Theme Preview" order="2" />
+      <window_info anchor="bottom" id="Debug" order="7" weight="0.398773" />
       <window_info id="Favorites" order="3" side_tool="true" />
-      <window_info anchor="bottom" id="Debug" order="7" weight="0.39894736" />
       <window_info anchor="right" content_ui="combo" id="Hierarchy" order="7" weight="0.25" />
       <window_info anchor="bottom" id="Inspection" order="9" weight="0.4" />
@@ -168,6 +169,4 @@
       <window_info anchor="bottom" id="Message" order="4" />
       <window_info anchor="bottom" id="Cvs" order="8" weight="0.25" />
-      <window_info anchor="bottom" id="Find" order="5" weight="0.32924336" />
-      <window_info anchor="bottom" id="Messages" order="3" weight="0.32822084" />
     </layout>
     <layout-to-restore>
@@ -177,5 +176,4 @@
       <window_info anchor="bottom" id="Run" order="6" visible="true" weight="0.34662578" />
       <window_info anchor="right" id="Theme Preview" order="2" />
-      <window_info anchor="bottom" id="Cvs" order="8" weight="0.25" />
       <window_info content_ui="combo" id="Project" order="5" visible="true" weight="0.18382749" />
       <window_info id="Structure" order="6" side_tool="true" weight="0.25" />
@@ -183,4 +181,5 @@
       <window_info anchor="right" id="Ant Build" order="6" weight="0.25" />
       <window_info anchor="bottom" id="TODO" order="10" />
+      <window_info anchor="bottom" id="Version Control" order="2" />
       <window_info id="Image Layers" order="4" />
       <window_info id="Designer" order="0" />
@@ -192,5 +191,5 @@
       <window_info anchor="bottom" id="Event Log" order="1" side_tool="true" />
       <window_info anchor="bottom" id="Inspection" order="9" weight="0.4" />
-      <window_info anchor="bottom" id="Version Control" order="2" />
+      <window_info anchor="bottom" id="Cvs" order="8" weight="0.25" />
       <window_info id="Capture Tool" order="2" />
       <window_info anchor="bottom" id="Message" order="4" />
@@ -205,8 +204,28 @@
   <component name="XDebuggerManager">
     <breakpoint-manager>
-      <option name="time" value="4" />
+      <breakpoints-dialog>
+        <breakpoints-dialog />
+      </breakpoints-dialog>
+      <option name="time" value="13" />
     </breakpoint-manager>
   </component>
   <component name="editorHistoryManager">
+    <entry file="file://$PROJECT_DIR$/src/Main.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="4890">
+          <caret line="326" selection-start-line="326" selection-end-line="326" />
+          <folding>
+            <element signature="imports" expanded="true" />
+            <element signature="class#StartAndEndPoint#0;class#Main#0" />
+            <element signature="method#removeDuplicates#0;class#Main#0" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
     <entry file="file://$PROJECT_DIR$/src/Main.java">
       <provider selected="true" editor-type-id="text-editor">
@@ -217,10 +236,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -235,10 +253,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -253,10 +270,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -271,10 +287,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -289,10 +304,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -307,10 +321,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -325,10 +338,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -343,10 +355,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -361,10 +372,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -379,10 +389,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -397,10 +406,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -415,10 +423,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -433,10 +440,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -451,10 +457,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -469,10 +474,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -487,10 +491,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -505,10 +508,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -523,10 +525,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -541,10 +542,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -559,10 +559,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -577,10 +576,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -595,10 +593,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -613,10 +610,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -631,10 +627,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -649,10 +644,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -667,10 +661,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -685,10 +678,9 @@
             <element signature="class#StartAndEndPoint#0;class#Main#0" />
             <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
@@ -715,16 +707,15 @@
     <entry file="file://$PROJECT_DIR$/src/Main.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="801">
-          <caret line="326" selection-start-line="326" selection-end-line="326" />
-          <folding>
-            <element signature="imports" expanded="true" />
-            <element signature="class#StartAndEndPoint#0;class#Main#0" />
-            <element signature="method#removeDuplicates#0;class#Main#0" />
-            <element signature="method#StandardDeviation#0;class#Main#0" />
-            <element signature="method#toBufferedImage#0;class#Main#0" />
-            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineCount#0;class#Main#0" />
-            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
-            <element signature="e#7430#7439#0" expanded="true" />
+        <state relative-caret-position="506">
+          <caret line="504" column="30" selection-start-line="504" selection-start-column="30" selection-end-line="504" selection-end-column="30" />
+          <folding>
+            <element signature="imports" expanded="true" />
+            <element signature="class#StartAndEndPoint#0;class#Main#0" />
+            <element signature="method#removeDuplicates#0;class#Main#0" />
+            <element signature="method#toBufferedImage#0;class#Main#0" />
+            <element signature="method#ClassifierPixelCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineCount#0;class#Main#0" />
+            <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" />
+            <element signature="e#7453#7462#0" expanded="true" />
           </folding>
         </state>
Index: /other-projects/is-sheet-music-encore/trunk/image-identification-development/src/Main.java
===================================================================
--- /other-projects/is-sheet-music-encore/trunk/image-identification-development/src/Main.java	(revision 33309)
+++ /other-projects/is-sheet-music-encore/trunk/image-identification-development/src/Main.java	(revision 33310)
@@ -103,9 +103,10 @@
     public static double StandardDeviation(double parseArray[])
     {
+
         double mean;
-        double sum =0;
-        double standardDeviation = 0;
+        double sum =0.0;
+        double standardDeviation = 0.0;
         //calculate sum of array
-        for(int i =0; i > parseArray.length; i++){
+        for(int i =0; i < parseArray.length; i++){
             sum += parseArray[i];
         }
@@ -113,8 +114,10 @@
         mean = sum/parseArray.length;
         //calculate SD of array
-        for(int j =0; j > parseArray.length; j++){
+        for(int j =0; j < parseArray.length; j++){
             standardDeviation += Math.pow(parseArray[j]-mean, 2);
         }
         return Math.sqrt(standardDeviation/parseArray.length);
+
+
     }
 
@@ -123,4 +126,5 @@
     static int CLASSIFIER_HOUGHLINESP_MAX 	= 65;
     static int HOUGHLINEP_THRESHOLD			= 10;
+    static int STANDARD_DEVIATION_THRESHOLD = 6;
     static int MINLINECOUNT                 = 40;
     static double MAXLINEGAP              	= 1;  //4
@@ -210,6 +214,4 @@
             ArrayList<Integer> redPixelYpos = new ArrayList<Integer>();
 
-
-
             //Go Thru every pixel
             for(int i=0; i < y; i++){
@@ -260,6 +262,25 @@
     return returnArray;
     }
-
-    private static ArrayList ClassifierLineCluster(ArrayList<StartAndEndPoint> linePointsArray){
+    private static ArrayList ClassifierLineCluster(ArrayList<StartAndEndPoint> linePointsArray, Mat clustersFoundRGB){
+
+        /*
+        This will check for a cluster of lines that are close together.
+        1. Go through the list of Y positions(start point) in parsed array.
+            If, there is a small distance between them,
+                then, add to closeLineArray.
+
+        Have all Y positions that are close to each other now.
+        Need to find the lines that are clustered together.
+
+        Now check if there are four of these are close to each other.
+        2.  Go through list of closeLine.
+                Get first four lines, traversing down a step each iteration {0,1,2,3} -> {1,2,3,4} -> {2,3,4,5}
+                If, those 4 lines are close together,
+                    Then, add them to a new array that holds Line Cluster Values.
+                    Go to line 4 positions down since, as do not want duplicates.
+
+        3.
+        */
+
         ArrayList returnArray = new ArrayList();
         ArrayList<Double> closeLineYPos = new ArrayList();
@@ -269,11 +290,12 @@
             if(linePointsArray.size()> 1) {
 
+                /*
                 //Display input array TESTING PURPOSES
                 for (int i = 0; i < linePointsArray.size(); i++) {
                     System.out.println(linePointsArray.get(i).toString());
                 }
-
-
-                //Check if y points are close together
+                */
+
+                //1. Check if y points are close together
                 //go thru list and compare values against each other
                 for (int i = 0; i < linePointsArray.size(); i++){
@@ -289,66 +311,92 @@
                     }
                 }
-
-                System.out.println(" ");
-
-                //Have all y coordinates that close to each other.
-                //Now check if there are four of these are close to each other.
+                /*for (double num : closeLineYPos){
+                      System.out.println(num);
+                } */
+
+                //2. Now check if there are four of these are close to each other.
+                //Go through all of the items in this list and check if four of them are close together
+                //Check first four items, traverse down a step {0,1,2,3} -> {1,2,3,4} -> {2,3,4,5}
+                //If 4 items are close together,
+                    //Then add them to a new array that holds Line Cluster Values.
+                    //Go down 4 positions down since, as do not want duplicates.
+
+                //Now have an array of at least four lines that are close together.
+                //Sort array and remove duplicates
+                Collections.sort(closeLineYPos);
+                closeLineYPos = removeDuplicates(closeLineYPos);
                 if(closeLineYPos.size() >= 4) {
-                    //Sort array and remove duplicates
-                    Collections.sort(closeLineYPos);
-                    closeLineYPos = removeDuplicates(closeLineYPos);
-
-
-                   /*for (double num : closeLineYPos){
-                      System.out.println(num);
-                   } */
-
-
-                    //Check first four items, traverse down a step {0,1,2,3} -> {1,2,3,4} -> {2,3,4,5}
+                    //FOR every item in array of CloseLines
                     for(int i= 0; i< closeLineYPos.size(); i++){
-                        //If last comparator is within the array bounds.
-                        if(i + 3 == closeLineYPos.size()){
+                        //If last comparator is at end of array.
+                        if(i + 4 >= closeLineYPos.size()){
                             break;
                         }
                         else{
+                            //Add 4 values of Close Line Array to a tempArray
                             double[] tempArray = new double[4];
-                            tempArray[0] = closeLineYPos.get(i + 0);
+                            tempArray[0] = closeLineYPos.get(i);
                             tempArray[1] = closeLineYPos.get(i + 1);
                             tempArray[2] = closeLineYPos.get(i + 2);
                             tempArray[3] = closeLineYPos.get(i + 3);
-                            System.out.println(tempArray[0] + " , " + tempArray[1] + " , " + tempArray[2] + " , " + tempArray[3]);
-                            //Check standard deviation
-                            if(StandardDeviation(tempArray) < 5){
+
+                            //Check standard deviation between these 4 values.
+                            //If it SD is less than 5 then it is considered to be a cluster of lines.
+
+                            if(StandardDeviation(tempArray) < STANDARD_DEVIATION_THRESHOLD){
+                                System.out.println("tempArray PT: "+tempArray[0] + " , " + tempArray[1] + " , " + tempArray[2] + " , " + tempArray[3]);
+                                System.out.println("tempArray SD: " + StandardDeviation(tempArray));
                                 //Store array
                                 clusterArray.add(tempArray);
-                                //Check if more than one item in array
-                                if(clusterArray.size() > 1){
-                                    //check for duplicate yPos in stored arrays (tempArray)
-
+                                //If I + 4 is less than the size of the array then increment by 4
+                                //Go down +4 positions in closeLineYPos array
+                                if((i + 4 < closeLineYPos.size())){
+                                    System.out.println("IF, i = " + i + " -> "+ (i+4) + ", CloseLineYpos size= " + closeLineYPos.size());
+                                    i = i+4;
                                 }
-
-
+                                else{
+                                    //break
+                                    System.out.println("ELSE, i = " + i+ " closeLineYpos size= " + closeLineYPos.size());
+                                    Thread.sleep(2000);
+                                    break;
+                                }
                             }
                         }
                     }
-
-                    //for (double num : closeLineYPos){
-                    //    System.out.println(num);
-                    //}
-                }
-
-                //PROBLEM. Definition of cluster. Need to check if cluster.
-                //check if four lines are close to each other.(four for loops)
-                //  then store these four items in an array and add one to the counter.
-                //  (will need to check if found 5th item. - DONT NEED TO? Value gained from finding the 5th line? The staffline height?)
-                //
-
-
-
+                }
+                /*
+                System.out.println("Cluster Coordinates: ");
+                for(double[] items : clusterArray){
+                    for(int i = 0; i <items.length; i++){
+                        System.out.println("ITEMS: "+ items[i]);
+                    }
+                }
+                */
+                //Setup Drawing clusters found.
+                //For every pt given the input array
+                for(StartAndEndPoint pt : linePointsArray){
+                    //Go through every the Arrays in the clusterArray(clustered lines)
+                    for(int i =0; i < clusterArray.size(); i++){
+                        //Go through every item in the array
+                        for(double item : clusterArray.get(i)) {
+                            //Check if the curr item is equal to current pt
+                            if (item == pt.getP1().y){
+                                //calculate a different colour for each line
+
+                                //Draw a line
+                                Imgproc.line(clustersFoundRGB, pt.getP1(), pt.getP2(), new Scalar(0, 255, 0), 1, Imgproc.LINE_4, 0);
+                            }
+                        }
+                    }
+
+                }
+
+                clusterCount = clusterArray.size();
                 //SETUP RETURN ARRAY
-                if(closeLineYPos.size() >= 4){
+                if(clusterCount >= 1){
                     returnArray.add(true);
                     returnArray.add(closeLineYPos.size());
                     returnArray.add(clusterCount);
+                    returnArray.add(clustersFoundRGB);
                 }
                 else{
@@ -377,9 +425,10 @@
             Mat edgesDetected = new Mat();
             Mat edgesDetectedRGB = new Mat();
+            Mat clustersFoundRGB = new Mat();
             String directory = "/Scratch/cpb16/is-sheet-music-encore/download-images/MU/";
             //!!!!!!!!!!!!!!!!!!!!!!!!!!!NOT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
             //mdp.39015097852365-2.png 176 lines    Contents page.
             //mdp.39015097852555-3.png 76  lines
-            String default_file = directory+"SheetMusic/coo.31924062612282-9.png";
+            //String default_file = directory+"SheetMusic/coo.31924062612282-9.png";
             //String default_file ="TestImages/NotNot/mdp.39015080972303-3.png";
 
@@ -389,5 +438,5 @@
             //String default_file = "TestImages/NotSheetMusic02.png";
             //String default_file = "TestImages/SheetMusic01.png";
-            //String default_file = "TestImages/SheetMusic02.png";
+            String default_file = "TestImages/SheetMusic02.png";
             //String default_file = "TestImages/vLine.png";
             String filename = ((args.length > 0) ? args[0] : default_file);
@@ -404,4 +453,5 @@
             //Convert to RGB for future use
             Imgproc.cvtColor(edgesDetected, edgesDetectedRGB, Imgproc.COLOR_GRAY2BGR);
+            clustersFoundRGB = edgesDetectedRGB.clone();
 
             Mat linesP = new Mat(); // will hold the results of the detection
@@ -434,8 +484,5 @@
             BufferedImage toBeClassifiedImg = toBufferedImage(edgesDetectedRGB);
 
-            System.out.println("LINE COUNT RESULT:   " +  ClassifierLineCount(horizontalLineCount) + '\t' +"LineCount: " + horizontalLineCount); //COUNT OF LINES CLASSIFICATION
-            System.out.println("LINE CLUSTER RESULT: " +  ClassifierLineClusterOLD(toBeClassifiedImg).get(0) + '\t' + "LinesFound: " + ClassifierLineClusterOLD(toBeClassifiedImg).get(1) + '\t' + "ClustersFound: " + ClassifierLineClusterOLD(toBeClassifiedImg).get(2));
-            //System.out.println("NEW CLUSTER RESULTS: " +  ClassifierLineCluster(pointArrayList).get(0) + '\t' + "LinesFound: " + ClassifierLineCluster(pointArrayList).get(1) + '\t' + "ClustersFound: " + ClassifierLineCluster(pointArrayList).get(2));
-            System.out.println(ClassifierLineCluster(pointArrayList));
+
 
             //Display Results
@@ -443,6 +490,15 @@
             //HighGui.imshow("Just Edges", justEdges); //TESTING
             HighGui.imshow("Detected Lines (in red) - positive", edgesDetectedRGB);
+            if(ClassifierLineCluster(pointArrayList, clustersFoundRGB).get(3) != null) {
+                HighGui.imshow("CLUSTERS FOUND", clustersFoundRGB);
+            }
             //HighGui.imshow("Detected Lines (in red) - negative", edgesDetectedRGBProb);
-            //HighGui.imshow("Detected Lines (in red) - edgeDoesntMakeSense", edgeDoesntMakeSense);
+
+
+
+            //System.out.println("LINE COUNT RESULT:   " +  ClassifierLineCount(horizontalLineCount) + '\t' +"LineCount: " + horizontalLineCount); //COUNT OF LINES CLASSIFICATION
+            //System.out.println("LINE CLUSTER RESULT: " +  ClassifierLineClusterOLD(toBeClassifiedImg).get(0) + '\t' + "LinesFound: " + ClassifierLineClusterOLD(toBeClassifiedImg).get(1) + '\t' + "ClustersFound: " + ClassifierLineClusterOLD(toBeClassifiedImg).get(2));
+            System.out.println("NEW CLUSTER RESULTS: " +  ClassifierLineCluster(pointArrayList,clustersFoundRGB).get(0) + '\t' + "LinesFound: " + ClassifierLineCluster(pointArrayList,clustersFoundRGB).get(1) + '\t' + "ClustersFound: " + ClassifierLineCluster(pointArrayList,clustersFoundRGB).get(2));
+            //System.out.println(ClassifierLineCluster(pointArrayList, clustersFoundRGB));
 
             // Wait and Exit
