Index: other-projects/is-sheet-music-encore/trunk/COMPX520-DOWNLOADER-MIDDLE-PNG.sh
===================================================================
--- other-projects/is-sheet-music-encore/trunk/COMPX520-DOWNLOADER-MIDDLE-PNG.sh	(revision 33439)
+++ other-projects/is-sheet-music-encore/trunk/COMPX520-DOWNLOADER-MIDDLE-PNG.sh	(revision 33439)
@@ -0,0 +1,21 @@
+#!/bin/bash
+#https://stackoverflow.com/questions/15148796/get-string-after-character
+file_name=$1
+location=$2
+
+IFS=$'\n'
+for id in `cat $file_name` ; do
+	new_id=$(echo "$id" | awk 'BEGIN {FS="\t"}; {print $1}')
+	page_num=$(echo "$id" | awk 'BEGIN {FS="\t"}; {print $2}')
+	if [ $page_num != 1 ] ; then
+		let a=$page_num/2
+		middle_page_num=$a
+	else
+		middle_page_num=$page_num
+	fi
+	echo "num_pages: $page_num"
+	echo "id: $new_id  MiddlePageNum: $middle_page_num"
+	echo ""
+	./COMPX520-RUN-MIDDLE-PNG-hi-res.sh $new_id $middle_page_num $location
+	sleep 2  
+done
Index: other-projects/is-sheet-music-encore/trunk/COMPX520-RUN-MIDDLE-PNG-hi-res.sh
===================================================================
--- other-projects/is-sheet-music-encore/trunk/COMPX520-RUN-MIDDLE-PNG-hi-res.sh	(revision 33439)
+++ other-projects/is-sheet-music-encore/trunk/COMPX520-RUN-MIDDLE-PNG-hi-res.sh	(revision 33439)
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+if [ $# != 3 ] ; then 
+  echo "Usage: ./COMPX520-RUN-MIDDLE-PNG-hi-res.sh doc_id page location" 1>&2
+  exit 1
+fi
+
+doc_id=$1
+page_num=$2
+location=$3
+
+doc_id_file=`echo $doc_id | sed 's/:/+/' | sed 's/\//=/g'`
+
+output_file="hires-middle-download-images/$location/$doc_id_file-$page_num.png"
+echo "Retrieving doc-id-page: $doc_id-$page_num -> $output_file"
+echo ""
+
+./dapiclient2-extended-hi-res.pl "$doc_id/$page_num" > "$output_file"
+
+
Index: other-projects/is-sheet-music-encore/trunk/EndToEndSystem.sh
===================================================================
--- other-projects/is-sheet-music-encore/trunk/EndToEndSystem.sh	(revision 33439)
+++ other-projects/is-sheet-music-encore/trunk/EndToEndSystem.sh	(revision 33439)
@@ -0,0 +1,80 @@
+#!/bin/bash
+#****************************************************************************************************
+#Type --help for detail on shortcuts
+#Have Makefile have some useful 'quick commands'
+
+#if [ $# != 1 ] ; then 
+#  echo "Usage: ./EndToEndSystem task" 1>&2
+#  exit 1
+#fi
+#Using scripts that have different amount of arguments
+type=$1
+
+#****************************************************************************************************
+#Test/Dev Scripts
+#****************************************************************************************************
+
+
+
+
+#****************************************************************************************************
+#Utility Scripts
+#****************************************************************************************************
+if [ $type == "page_num_test" ] ; then
+	page_num=5
+	if [ $page_num != 1 ] ; then
+		let a=$page_num/2
+		new_page_num=$a
+	else
+		new_page_num=$page_num
+	fi
+	echo $new_page_num
+	exit 1
+fi
+#****************************************************************************************************
+#Classifier Scripts [HIGHRES BY DEFUALT]
+#****************************************************************************************************
+if [ $type == "cluster" ] ; then
+	
+	if [ $# != 2 ] ; then
+		echo "Usage:./EndToEndSystem cluster <ResultSubDirectory>"
+		exit 1
+	fi
+	location=$2
+	#Compile
+	echo "Compiling java programs..."
+	cd image-identification-terminal
+	javac javaAccuracyCalculator.java
+	javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaClassifierComparison.java;
+	#Classifiers
+	echo "Successfuly Compiled, running classifer now..."
+	#./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MU cluster log-EndToEnd/$location/log-cluster-MU.txt -allNew
+	#./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/BK cluster log-EndToEnd/$location/log-cluster-BK.txt -allNew
+	#./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MP cluster log-EndToEnd/$location/log-cluster-MP.txt -allNew
+	#./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/SE cluster log-EndToEnd/$location/log-cluster-SE.txt -allNew
+	#Results
+	echo "Successfuly Classified, writing results now..."
+	mkdir log-EndToEnd/$location/
+	echo $'\n***********************************************\n' >> log-EndToEnd/$location/results.txt
+	date >> log-EndToEnd/$location/results.txt
+	echo >> log-EndToEnd/$location/results.txt
+	#echo "" >> log-EndToEnd/$location/results.txt
+	cat configClassifierComparison.properties >> log-EndToEnd/$location/results.txt
+	#java javaAccuracyCalculator log-EndToEnd/$location/log-cluster-MU.txt cluster-MU log-EndToEnd/$location/results.txt
+	#java javaAccuracyCalculator log-EndToEnd/$location/log-cluster-BK.txt cluster-BK log-EndToEnd/$location/results.txt
+	#java javaAccuracyCalculator log-EndToEnd/$location/log-cluster-MP.txt cluster-MP log-EndToEnd/$location/results.txt
+	#java javaAccuracyCalculator log-EndToEnd/$location/log-cluster-SE.txt cluster-SE log-EndToEnd/$location/results.txt
+	.././calculateCorpusAccuracy.sh
+	less log-EndToEnd/$location/results.txt 
+	exit 1
+fi
+
+
+#****************************************************************************************************
+#Downloader Scripts
+#****************************************************************************************************
+
+#****************************************************************************************************
+#End of the line
+echo "unknown command, please try again, or type './EndToEndSystem --help'"
+exit 1
Index: other-projects/is-sheet-music-encore/trunk/Makefile
===================================================================
--- other-projects/is-sheet-music-encore/trunk/Makefile	(revision 33437)
+++ other-projects/is-sheet-music-encore/trunk/Makefile	(revision 33439)
@@ -2,4 +2,6 @@
 #Utilities/Test
 #**********
+hi-res-download-map-middle:
+	./COMPX520-DOWNLOADER-MIDDLE-PNG.sh java-gen-corpus/MapListNumPages.txt MP
 
 compile:
@@ -78,4 +80,5 @@
 	cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/SE cluster log-all-hires-new/log-cluster-SE.txt -allNew
 	#Calculate accuracy
+	cd image-identification-terminal; echo configClassifierComparison.properties >> log-all-hires-new/results.txt 
 	cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-cluster-MU.txt cluster-MU log-all-hires-new/results.txt
 	cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-cluster-BK.txt cluster-BK log-all-hires-new/results.txt
Index: other-projects/is-sheet-music-encore/trunk/calculateCorpusAccuracy.sh
===================================================================
--- other-projects/is-sheet-music-encore/trunk/calculateCorpusAccuracy.sh	(revision 33439)
+++ other-projects/is-sheet-music-encore/trunk/calculateCorpusAccuracy.sh	(revision 33439)
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+echo "Calculating Overall Accuracy on Corpus"
+echo "..."
+echo "Finished"
Index: other-projects/is-sheet-music-encore/trunk/image-identification-dev-02/.idea/workspace.xml
===================================================================
--- other-projects/is-sheet-music-encore/trunk/image-identification-dev-02/.idea/workspace.xml	(revision 33437)
+++ other-projects/is-sheet-music-encore/trunk/image-identification-dev-02/.idea/workspace.xml	(revision 33439)
@@ -40,16 +40,14 @@
         <entry file="file://$PROJECT_DIR$/image-identification-development/src/MainMorph.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="2976">
-              <caret line="501" column="69" selection-start-line="501" selection-start-column="69" selection-end-line="501" selection-end-column="69" />
+            <state relative-caret-position="266">
+              <caret line="407" column="55" selection-start-line="407" selection-start-column="55" selection-end-line="407" selection-end-column="55" />
               <folding>
                 <element signature="imports" expanded="true" />
                 <element signature="class#StartAndEndPoint#0;class#MainMorph#0" />
                 <element signature="method#toBufferedImage#0;class#MainMorph#0" />
-                <element signature="e#10410#12916#1" />
-                <element signature="e#13000#15039#1" />
-                <element signature="e#15107#17754#1" />
-                <element signature="e#18758#22215#1" />
-                <element signature="e#19065#19077#0" expanded="true" />
-                <element signature="e#23397#23409#0" expanded="true" />
+                <element signature="e#11164#13670#1" />
+                <element signature="e#13754#15793#1" />
+                <element signature="e#15861#18508#1" />
+                <element signature="e#21594#25229#1" />
               </folding>
             </state>
@@ -60,18 +58,13 @@
         <entry file="file://$PROJECT_DIR$/../image-identification-terminal/javaClassifierComparison.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="1123">
-              <caret line="305" selection-start-line="305" selection-end-line="305" />
+            <state relative-caret-position="4332">
+              <caret line="356" selection-start-line="356" selection-end-line="356" />
               <folding>
                 <element signature="imports" expanded="true" />
-                <element signature="class#StartAndEndPoint#0;class#javaClassifierComparison#0" />
-                <element signature="method#StartAndEndPoint#0;class#StartAndEndPoint#0;class#javaClassifierComparison#0" />
-                <element signature="class#Pair#0;class#javaClassifierComparison#0" />
                 <element signature="method#Algorithm_HoughLinesP_Single#0;class#javaClassifierComparison#0" />
                 <element signature="method#Algorithm_HoughLinesP_Combo#0;class#javaClassifierComparison#0" />
-                <element signature="e#11894#11906#0" expanded="true" />
                 <element signature="method#Classifier_LineCounter#0;class#javaClassifierComparison#0" />
                 <element signature="method#Classifier_ClusterDetection#0;class#javaClassifierComparison#0" />
                 <element signature="method#removeDuplicates#0;class#javaClassifierComparison#0" />
-                <element signature="e#17563#18162#1" />
                 <element signature="method#lineComparison#0;class#javaClassifierComparison#0" />
                 <element signature="method#ClusterCheck#0;class#javaClassifierComparison#0" />
@@ -174,4 +167,5 @@
   <component name="ToolWindowManager">
     <frame x="67" y="25" width="1613" height="1025" extended-state="6" />
+    <editor active="true" />
     <layout>
       <window_info content_ui="combo" id="Project" order="0" weight="0.19783024" />
@@ -182,5 +176,5 @@
       <window_info anchor="bottom" id="Message" order="0" />
       <window_info anchor="bottom" id="Find" order="1" />
-      <window_info anchor="bottom" id="Run" order="2" weight="0.2494432" />
+      <window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.2494432" />
       <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
@@ -252,18 +246,13 @@
     <entry file="file://$PROJECT_DIR$/../image-identification-terminal/javaClassifierComparison.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1123">
-          <caret line="305" selection-start-line="305" selection-end-line="305" />
+        <state relative-caret-position="4332">
+          <caret line="356" selection-start-line="356" selection-end-line="356" />
           <folding>
             <element signature="imports" expanded="true" />
-            <element signature="class#StartAndEndPoint#0;class#javaClassifierComparison#0" />
-            <element signature="method#StartAndEndPoint#0;class#StartAndEndPoint#0;class#javaClassifierComparison#0" />
-            <element signature="class#Pair#0;class#javaClassifierComparison#0" />
             <element signature="method#Algorithm_HoughLinesP_Single#0;class#javaClassifierComparison#0" />
             <element signature="method#Algorithm_HoughLinesP_Combo#0;class#javaClassifierComparison#0" />
-            <element signature="e#11894#11906#0" expanded="true" />
             <element signature="method#Classifier_LineCounter#0;class#javaClassifierComparison#0" />
             <element signature="method#Classifier_ClusterDetection#0;class#javaClassifierComparison#0" />
             <element signature="method#removeDuplicates#0;class#javaClassifierComparison#0" />
-            <element signature="e#17563#18162#1" />
             <element signature="method#lineComparison#0;class#javaClassifierComparison#0" />
             <element signature="method#ClusterCheck#0;class#javaClassifierComparison#0" />
@@ -274,16 +263,14 @@
     <entry file="file://$PROJECT_DIR$/image-identification-development/src/MainMorph.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="2976">
-          <caret line="501" column="69" selection-start-line="501" selection-start-column="69" selection-end-line="501" selection-end-column="69" />
+        <state relative-caret-position="266">
+          <caret line="407" column="55" selection-start-line="407" selection-start-column="55" selection-end-line="407" selection-end-column="55" />
           <folding>
             <element signature="imports" expanded="true" />
             <element signature="class#StartAndEndPoint#0;class#MainMorph#0" />
             <element signature="method#toBufferedImage#0;class#MainMorph#0" />
-            <element signature="e#10410#12916#1" />
-            <element signature="e#13000#15039#1" />
-            <element signature="e#15107#17754#1" />
-            <element signature="e#18758#22215#1" />
-            <element signature="e#19065#19077#0" expanded="true" />
-            <element signature="e#23397#23409#0" expanded="true" />
+            <element signature="e#11164#13670#1" />
+            <element signature="e#13754#15793#1" />
+            <element signature="e#15861#18508#1" />
+            <element signature="e#21594#25229#1" />
           </folding>
         </state>
Index: other-projects/is-sheet-music-encore/trunk/image-identification-dev-02/image-identification-development/src/MainMorph.java
===================================================================
--- other-projects/is-sheet-music-encore/trunk/image-identification-dev-02/image-identification-development/src/MainMorph.java	(revision 33437)
+++ other-projects/is-sheet-music-encore/trunk/image-identification-dev-02/image-identification-development/src/MainMorph.java	(revision 33439)
@@ -193,12 +193,15 @@
 
         try {
+
             ArrayList<StartAndEndPoint> pointArrayList = new ArrayList<>();
 
             //Variables
-            int codeVersion = 5;
+            int codeVersion = 4;
+            System.out.println("Running code version: " + codeVersion);
             Mat edgesDetected = new Mat();
             Mat mid = new Mat();
             Mat edgesDetectedRGB = new Mat();
             Mat clustersFoundRGB = new Mat();
+
             String testDirectory = "/Scratch/cpb16/is-sheet-music-encore/image-identification-dev-02/image-identification-development/";
             String directory = "/Scratch/cpb16/is-sheet-music-encore/download-images/MU/";
@@ -215,5 +218,5 @@
             //String default_file =hiresDirectory+"BK/NotSheetMusic/aeu.ark+=13960=t2q53nq6w-6.png";
             //String default_file =hiresDirectory+"BK/NotSheetMusic/aeu.ark+=13960=t9z03w65z-4.png";
-            //String default_file =hiresDirectory+"MU/NotSheetMusic/aeu.ark+=13960=t0dv28v9r-1.png";
+            String default_file =hiresDirectory+"MU/NotSheetMusic/aeu.ark+=13960=t0dv28v9r-1.png";
 
             //System.out.println(default_file);
@@ -395,5 +398,30 @@
 
                 Mat test = original.clone();
+
                 showWaitDestroy("00 Inverse Binarized Original", test);
+
+                //remove large items of no interest pre proc
+                //denoize
+                //heal
+                //fnd large images, write to a seperate mat.
+                //draw these onto orignal image(binerized) in red
+                //turn all red pixels in image to black
+
+
+                //denoize
+                Mat denoize = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(3,3));
+                Imgproc.morphologyEx(test,test, Imgproc.MORPH_OPEN, denoize);
+                showWaitDestroy("Denoize", test);
+
+                //close up gaps
+                Mat gapcloser = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(3,3));
+                Imgproc.morphologyEx(test,test,Imgproc.MORPH_CLOSE, gapcloser);
+                showWaitDestroy("gap closer", test);
+
+                Mat kernelRemoveLarge = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(5, 50));
+                Imgproc.erode(test,test, kernelRemoveLarge);
+                showWaitDestroy("Remove Large", test);
+
+                //start staff line detection
 
                 Mat kernelErode = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(10,1));
@@ -454,9 +482,9 @@
                 int vert = original.height();
                 //Find ratio between 100 and width and 100 and height
-                int sizeX100 = (hori/68) * 10;
-                int sizeY100 = (vert/46) * 10;
+                int sizeX100 = 10 * (hori/68);
+                int sizeY100 = 10 * (vert/46);
                 int sizeX10 = (hori/68);
                 int sizeY10 = (vert/46);
-                int sizeX1 = (hori/46)/10;
+                int sizeX1 = (hori/68)/10;
                 int sizeY1 = (vert/46)/10;
 
@@ -471,4 +499,10 @@
                 showWaitDestroy("00 Inverse Binarized Original", test);
 
+                //Remove very large and wide black spaces (8th of the page)
+                //Mat kernelRemoveLarge = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(hori/8, vert/8));
+                //Imgproc.erode(test,test, kernelRemoveLarge);
+                //showWaitDestroy("Remove Large", test);
+
+                //Eliminate things that are not long and thin
                 Mat kernelErode = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(sizeX10,sizeY1)); //new Size(10,1));
                 Imgproc.erode(test,test,kernelErode);
@@ -479,6 +513,6 @@
                 showWaitDestroy("02 Dilate", test);
 
-                Mat kernelOpening = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(sizeX1*4,sizeY1*4)); //new Size(4,4));
-                Imgproc.morphologyEx(test, test, Imgproc.MORPH_CLOSE, kernelOpening);
+                Mat kernelClose = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(sizeX1*4,sizeY1*4)); //new Size(4,4));
+                Imgproc.morphologyEx(test, test, Imgproc.MORPH_CLOSE, kernelClose);
                 showWaitDestroy("03 Open", test);
 
@@ -522,5 +556,7 @@
                 showWaitDestroy("Contours", drawing);
             }
-
+            //ADD PRE PROC
+
+            //USE stuc element, to rule out large wide and long pieces of black and white.
 
 
Index: other-projects/is-sheet-music-encore/trunk/image-identification-terminal/configClassifierComparison.properties
===================================================================
--- other-projects/is-sheet-music-encore/trunk/image-identification-terminal/configClassifierComparison.properties	(revision 33439)
+++ other-projects/is-sheet-music-encore/trunk/image-identification-terminal/configClassifierComparison.properties	(revision 33439)
@@ -0,0 +1,18 @@
+#Config for JavaClassifierComparsion.java
+
+#HoughlinesP Constants
+CLASSIFIER_HOUGHLINESP_MIN		= 10
+CLASSIFIER_HOUGHLINESP_MAX		= 65
+HOUGHLINEP_THRESHOLD			= 10
+STANDARD_DEVIATION_THRESHOLD		= 6
+MINLINECOUNT				= 40
+MAXLINEGAP				= 1
+THRESHOLD_C				= 4
+SLOPEGRADIENT				= 0.02
+CLUSTER_DISTANCE_MAX			= 40
+CLUSTER_DISTANCE_MIN			= 2
+#MORPHOLOGY
+THRESHOLD_AREA_SIZE			= 1000
+THRESHOLD_AREA_COUNT			= 4
+
+
Index: other-projects/is-sheet-music-encore/trunk/image-identification-terminal/javaAccuracyCalculator.java
===================================================================
--- other-projects/is-sheet-music-encore/trunk/image-identification-terminal/javaAccuracyCalculator.java	(revision 33437)
+++ other-projects/is-sheet-music-encore/trunk/image-identification-terminal/javaAccuracyCalculator.java	(revision 33439)
@@ -111,5 +111,6 @@
 					+ "SheetMusicAccuracyRate: " 	+ trueAccuracyRate + "%" + '\n'
 					+ "NotSheetMusicAccuracyRate: " + falseAccuracyRate + "%" + '\n'
-					+ "OverallAccuracyRate: " 		+ overallAccuracyRate + "%" + '\n' + '\n');		
+					+ "OverallAccuracyRate: " 		+ overallAccuracyRate + "%" + '\n' +
+					"****************************************************************" + '\n');		
 				buf.close();
 				fw.close();								
Index: other-projects/is-sheet-music-encore/trunk/image-identification-terminal/javaClassifierComparison.java
===================================================================
--- other-projects/is-sheet-music-encore/trunk/image-identification-terminal/javaClassifierComparison.java	(revision 33437)
+++ other-projects/is-sheet-music-encore/trunk/image-identification-terminal/javaClassifierComparison.java	(revision 33439)
@@ -8,4 +8,6 @@
 import java.awt.image.BufferedImage;
 import java.awt.image.DataBufferByte;
+import java.io.FileInputStream;
+import java.io.IOException;
 //import java.io.File;
 //import java.io.BufferedWriter;
@@ -16,4 +18,5 @@
 //import java.util.Collections.*;
 import java.util.*;
+//import java.util.Properties;
 import java.lang.*;
 import java.io.*;
@@ -34,7 +37,10 @@
 //False =classifierType + 0 + Filename + Status
 public class javaClassifierComparison {
-
-    //MAKE THIS A PROPERTIES FILE. THIS WILL BE SET AND CHECKED FROM OUTSIDE THE LOOP
-    //GLOBALS Constants
+	
+//*******************************************************************************************
+//GLOBALS
+//*******************************************************************************************
+/*		
+    //HOUGHLINE
     static int CLASSIFIER_HOUGHLINESP_MIN = 10;
     static int CLASSIFIER_HOUGHLINESP_MAX = 65;
@@ -50,6 +56,47 @@
     static double THRESHOLD_AREA_SIZE  = 1000;
     static double THRESHOLD_AREA_COUNT = 4;
-
-
+*/
+	static int CLASSIFIER_HOUGHLINESP_MIN;
+    static int CLASSIFIER_HOUGHLINESP_MAX;
+    static int HOUGHLINEP_THRESHOLD;
+    static int STANDARD_DEVIATION_THRESHOLD;
+    static int MINLINECOUNT;
+    static int MAXLINEGAP;
+    static double THRESHOLD_C;
+    static double SLOPEGRADIENT;
+    static double CLUSTER_DISTANCE_MAX;
+    static double CLUSTER_DISTANCE_MIN;
+    //MORPHOLOGY
+    static double THRESHOLD_AREA_SIZE;
+    static double THRESHOLD_AREA_COUNT;
+
+//********************************************************************************************
+//CLASSES
+//********************************************************************************************
+	
+	//Sets globals based off properties file
+    public static void init(){
+		try{
+			Properties config = new Properties();
+			FileInputStream input = new FileInputStream("configClassifierComparison.properties");
+			config.load(input);
+			CLASSIFIER_HOUGHLINESP_MIN = 	Integer.parseInt(config.getProperty("CLASSIFIER_HOUGHLINESP_MIN"));
+			CLASSIFIER_HOUGHLINESP_MAX = 	Integer.parseInt(config.getProperty("CLASSIFIER_HOUGHLINESP_MAX"));
+			HOUGHLINEP_THRESHOLD = 			Integer.parseInt(config.getProperty("HOUGHLINEP_THRESHOLD")); 
+			STANDARD_DEVIATION_THRESHOLD = 	Integer.parseInt(config.getProperty("STANDARD_DEVIATION_THRESHOLD"));
+			MINLINECOUNT = 					Integer.parseInt(config.getProperty("MINLINECOUNT"));
+			MAXLINEGAP = 					Integer.parseInt(config.getProperty("MAXLINEGAP"));
+			THRESHOLD_C = 					Double.parseDouble(config.getProperty("THRESHOLD_C"));
+			SLOPEGRADIENT = 				Double.parseDouble(config.getProperty("SLOPEGRADIENT"));
+			CLUSTER_DISTANCE_MAX = 			Double.parseDouble(config.getProperty("CLUSTER_DISTANCE_MAX"));
+			CLUSTER_DISTANCE_MIN = 			Double.parseDouble(config.getProperty("CLUSTER_DISTANCE_MIN"));
+			THRESHOLD_AREA_SIZE =  			Double.parseDouble(config.getProperty("THRESHOLD_AREA_SIZE"));
+			THRESHOLD_AREA_COUNT = 			Double.parseDouble(config.getProperty("THRESHOLD_AREA_COUNT"));
+		}
+		catch(Exception e){
+			e.printStackTrace();
+		}
+	}
+    
     static public class StartAndEndPoint {
         //PRIVATES
@@ -114,5 +161,7 @@
 
     public static void main(String[] args) {
+    	init();
         try {
+        
             if (args.length != 3) {
                 System.out.println("Usage: imageClassifier <inputFilename> <classifierType> <outputFilename>");
@@ -134,4 +183,5 @@
                 //Split output by tab for processing in next java program
                 //imageFilename = 1, result = 3, classifierType = 4
+                
                 switch (classifierType) {
                     case "count":
@@ -156,5 +206,6 @@
                         System.out.println("unknown algorithm");
                         break;
-                }
+                }     
+                
                 bw.close();
             }
