Changeset 33437 for other-projects
- Timestamp:
- 2019-08-26T16:44:52+12:00 (5 years ago)
- Location:
- other-projects/is-sheet-music-encore/trunk
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/is-sheet-music-encore/trunk/Makefile
r33415 r33437 1 #********** 2 #Utilities/Test 3 #********** 4 1 5 compile: 2 6 cd java-gen-corpus; javac *.java; 3 #*******4 5 7 6 8 download-single: 7 ./COMPX520-RUN-PNG.sh coo1.ark:/13960/t2t448j81 1 8 9 9 ./COMPX520-RUN-PNG-hi-res.sh coo1.ark:/13960/t2t448j81 1 /.. 10 11 test-get-page-numbers-map: 12 cd java-gen-corpus; javac javaGenMapPageCountChecker.java 13 cd java-gen-corpus; java javaGenMapPageCountChecker gen-500-MP-hathiFullIDList.txt 234 MapListNumPages.txt 14 15 16 test-gen-new-5000-map: 17 #MAKE SURE TO RUN source SETUP.bash prior to this cmd 18 cd java-gen-corpus; javac javaGenMap5000ValidIDList.java 19 cd java-gen-corpus; java javaGenMap5000ValidIDList gen-500-MP-hathiFullIDList.txt gen-5000-MapList02.txt 20 21 test-gen-new-5000-local-map: 22 #MAKE SURE TO RUN source SETUP.bash prior to this cmd 23 cd java-gen-corpus; javac javaGenMapLocal5000ValidIDList.java 24 cd java-gen-corpus; java javaGenMapLocal5000ValidIDList MapListNumPages.txt gen-5000-Local-MapList.txt 25 26 27 run-morphology-100-test: 28 cd image-identification-terminal/log-all-hires-new; rm log-morphology-MU-test.txt 29 cd image-identification-terminal; javac javaAccuracyCalculator.java 30 cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaClassifierComparison.java; 31 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MU morphology log-all-hires-new/log-morphology-MU-test.txt -testNew 32 cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-morphology-MU-test.txt morphology-MU log-all-hires-new/results.txt 33 cd image-identification-terminal; less log-all-hires-new/results.txt 34 cd image-identification-terminal; less log-all-hires-new/log-morphology-MU-test.txt 35 36 run-morph-single: 37 cd image-identification-terminal; make testrun-classifier-single-morph 10 38 #********** 11 39 #HI-RES … … 16 44 ./COMPX520-DOWNLOADER-PNG-10PAGES-hi-res.sh java-gen-corpus/BK-500-reconstructed.txt BK 17 45 ./COMPX520-DOWNLOADER-PNG-10PAGES-hi-res.sh java-gen-corpus/SE-500-reconstructed.txt SE 18 ./COMPX520-DOWNLOADER-PNG-10PAGES-hi-res.sh java-gen-corpus/MP-500-reconstructed.txt MP 46 make hi-res-download-map 47 hi-res-download-map: 48 ./FirstAndLastTest-DOWNLOADER-PNG.sh java-gen-corpus/gen-5000-Local-MapList.txt MP 19 49 20 50 ###################################### 21 51 #CAUTION: run must: source SETUP.bash 22 #Prior to running the scripts below52 #Prior to running the gen-* scripts 23 53 ###################################### 24 #MUSIC, Including Sheet music 25 gen-500-MU: 26 cd java-gen-corpus; javac *.java 27 cd java-gen-corpus; java javaGenFullIDList hathiFull.txt gen-500-MU-hathiFullIDList.txt MU 28 cd java-gen-corpus; java javaGenValidIDList gen-500-MU-hathiFullIDList.txt 500 gen-500-MU-hathiValidIDList.txt 29 ./COMPX520-DOWNLOADER-PNG-10PAGES.sh java-gen-corpus/gen-500-MU-hathiValidIDList.txt 30 31 32 #BOOKS, Monograhpical 33 gen-500-BK: 34 cd java-gen-corpus; javac *.java 35 cd java-gen-corpus; java javaGenFullIDList hathiFull.txt gen-500-BK-hathiFullIDList.txt BK 36 cd java-gen-corpus; java javaGenValidIDList gen-500-BK-hathiFullIDList.txt 500 gen-500-BK-hathiValidIDList.txt 37 ./COMPX520-DOWNLOADER-PNG-10PAGES.sh java-gen-corpus/gen-500-BK-hathiValidIDList.txt 38 39 40 #SERIAL (journals, newspapers,etc) 41 gen-500-SE: 42 cd java-gen-corpus; javac *.java 43 cd java-gen-corpus; java javaGenFullIDList hathiFull.txt gen-500-SE-hathiFullIDList.txt SE 44 cd java-gen-corpus; java javaGenValidIDList gen-500-SE-hathiFullIDList.txt 500 gen-500-SE-hathiValidIDList.txt 45 ./COMPX520-DOWNLOADER-PNG-10PAGES.sh java-gen-corpus/gen-500-SE-hathiValidIDList.txt 46 47 48 #MAPS, Including atlas and sheet maps 49 gen-500-MP: 50 cd java-gen-corpus; javac *.java 51 cd java-gen-corpus; java javaGenFullIDList hathiFull.txt gen-500-MP-hathiFullIDList.txt MP 52 cd java-gen-corpus; java javaGenValidIDList gen-500-MP-hathiFullIDList.txt 500 gen-500-MP-hathiValidIDList.txt 53 ./COMPX520-DOWNLOADER-PNG-10PAGES.sh java-gen-corpus/gen-500-MP-hathiValidIDList.txt 54 55 56 #MIXED MATERIAL (This may not be required) 57 gen-500-MX: 58 cd java-gen-corpus; javac *.java 59 cd java-gen-corpus; java javaGenFullIDList hathiFull.txt gen-500-MX-hathiFullIDList.txt MX 60 cd java-gen-corpus; java javaGenValidIDList gen-500-MX-hathiFullIDList.txt 500 gen-500-MX-hathiValidIDList.txt 61 ./COMPX520-DOWNLOADER-PNG-10PAGES.sh java-gen-corpus/gen-500-MX-hathiValidIDList.txt 54 gen-10000-MU: 55 cd java-gen-corpus; javac *.java 56 cd java-gen-corpus; java javaGenFullIDList hathiFull.txt gen-10000-MU-hathiFullIDList.txt MU 57 cd java-gen-corpus; java javaGenFirstAndLastTenIDList gen-10000-MU-hathiFullIDList.txt 10000 gen-10000-MU-hathiValidIDList.txt 58 #./FirstAndLastTest-DOWNLOADER-PNG.sh java-gen-corpus/gen-10000-MU-hathiValidIDList.txt MU 59 62 60 63 61 #*********** 64 62 #CLASSIFIERS 65 #*********** 63 #*********** 66 64 run-cluster-single-test: 67 65 cd image-identification-terminal; make testrun-classifier-single-cluster 68 66 69 67 run-count-single-test: 70 68 cd image-identification-terminal; make testrun-classifier-single-count 71 69 72 70 run-cluster-corpus-hires: 73 71 #Compile 74 72 cd image-identification-terminal; javac javaAccuracyCalculator.java 75 cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar java ImageClassifier.java;73 cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaClassifierComparison.java; 76 74 #Run classifier 77 cd image-identification-terminal; /runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MU cluster log-all-hires-new/log-cluster-MU.txt -allNew78 cd image-identification-terminal; /runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/BK cluster log-all-hires-new/log-cluster-BK.txt -allNew79 cd image-identification-terminal; /runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MP cluster log-all-hires-new/log-cluster-MP.txt -allNew80 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 -allNew75 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MU cluster log-all-hires-new/log-cluster-MU.txt -allNew 76 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/BK cluster log-all-hires-new/log-cluster-BK.txt -allNew 77 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MP cluster log-all-hires-new/log-cluster-MP.txt -allNew 78 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 81 79 #Calculate accuracy 82 80 cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-cluster-MU.txt cluster-MU log-all-hires-new/results.txt … … 86 84 #Display the results 87 85 cd image-identification-terminal; less log-all-hires-new/results.txt 88 86 89 87 run-count-corpus-hires: 90 88 #Compile 91 89 cd image-identification-terminal; javac javaAccuracyCalculator.java 92 cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar java ImageClassifier.java;90 cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaClassifierComparison.java; 93 91 #Run classifier 94 cd image-identification-terminal; /runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MU count log-all-hires-new/log-count-MU.txt -allNew95 cd image-identification-terminal; /runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/BK count log-all-hires-new/log-count-BK.txt -allNew96 cd image-identification-terminal; /runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MP count log-all-hires-new/log-count-MP.txt -allNew97 cd image-identification-terminal; /runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/SE count log-all-hires-new/log-count-SE.txt -allNew92 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MU count log-all-hires-new/log-count-MU.txt -allNew 93 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/BK count log-all-hires-new/log-count-BK.txt -allNew 94 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MP count log-all-hires-new/log-count-MP.txt -allNew 95 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/SE count log-all-hires-new/log-count-SE.txt -allNew 98 96 #Calculate accuracy 99 97 cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-count-MU.txt count-MU log-all-hires-new/results.txt … … 103 101 #Display the results 104 102 cd image-identification-terminal; less log-all-hires-new/results.txt 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 #*********** 103 104 #Cluster and Count 105 run-combo-corpus-hires: 106 #Compile 107 cd image-identification-terminal; javac javaAccuracyCalculator.java 108 cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaClassifierComparison.java; 109 #Run classifier 110 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MU combo log-all-hires-new/log-combo-MU.txt -allNew 111 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/BK combo log-all-hires-new/log-combo-BK.txt -allNew 112 #cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/MP combo log-all-hires-new/log-combo-MP.txt -allNew 113 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/hires-download-images/SE combo log-all-hires-new/log-combo-SE.txt -allNew 114 #Calculate accuracy 115 cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-combo-MU.txt combo-MU log-all-hires-new/results.txt 116 cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-combo-BK.txt combo-BK log-all-hires-new/results.txt 117 #cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-combo-MP.txt combo-MP log-all-hires-new/results.txt 118 cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-combo-SE.txt combo-SE log-all-hires-new/results.txt 119 #Display the results 120 cd image-identification-terminal; less log-all-hires-new/results.txt 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 #************** 136 #OLD SCRIPTS 137 #************** 124 138 #OLDCLASSIFIERS 125 #*********** 139 #************** 126 140 run-houghlinesP-refined-corpus: 127 141 #cd image-identification-terminal; cd log-all; rm *.txt … … 159 173 #Display the results 160 174 cd image-identification-terminal; less log-all-hires/results.txt 175 176 #*********** 177 #OLDGEN 178 #*********** 179 #MUSIC, Including Sheet music 180 gen-500-MU: 181 cd java-gen-corpus; javac *.java 182 cd java-gen-corpus; java javaGenFullIDList hathiFull.txt gen-500-MU-hathiFullIDList.txt MU 183 cd java-gen-corpus; java javaGenValidIDList gen-500-MU-hathiFullIDList.txt 500 gen-500-MU-hathiValidIDList.txt 184 ./COMPX520-DOWNLOADER-PNG-10PAGES.sh java-gen-corpus/gen-500-MU-hathiValidIDList.txt 185 186 187 #BOOKS, Monograhpical 188 gen-500-BK: 189 cd java-gen-corpus; javac *.java 190 cd java-gen-corpus; java javaGenFullIDList hathiFull.txt gen-500-BK-hathiFullIDList.txt BK 191 cd java-gen-corpus; java javaGenValidIDList gen-500-BK-hathiFullIDList.txt 500 gen-500-BK-hathiValidIDList.txt 192 ./COMPX520-DOWNLOADER-PNG-10PAGES.sh java-gen-corpus/gen-500-BK-hathiValidIDList.txt 193 194 195 #SERIAL (journals, newspapers,etc) 196 gen-500-SE: 197 cd java-gen-corpus; javac *.java 198 cd java-gen-corpus; java javaGenFullIDList hathiFull.txt gen-500-SE-hathiFullIDList.txt SE 199 cd java-gen-corpus; java javaGenValidIDList gen-500-SE-hathiFullIDList.txt 500 gen-500-SE-hathiValidIDList.txt 200 ./COMPX520-DOWNLOADER-PNG-10PAGES.sh java-gen-corpus/gen-500-SE-hathiValidIDList.txt 201 202 203 #MAPS, Including atlas and sheet maps 204 gen-500-MP: 205 cd java-gen-corpus; javac *.java 206 cd java-gen-corpus; java javaGenFullIDList hathiFull.txt gen-500-MP-hathiFullIDList.txt MP 207 cd java-gen-corpus; java javaGenValidIDList gen-500-MP-hathiFullIDList.txt 500 gen-500-MP-hathiValidIDList.txt 208 ./COMPX520-DOWNLOADER-PNG-10PAGES.sh java-gen-corpus/gen-500-MP-hathiValidIDList.txt 209 210 211 #MIXED MATERIAL (This may not be required) 212 gen-500-MX: 213 cd java-gen-corpus; javac *.java 214 cd java-gen-corpus; java javaGenFullIDList hathiFull.txt gen-500-MX-hathiFullIDList.txt MX 215 cd java-gen-corpus; java javaGenValidIDList gen-500-MX-hathiFullIDList.txt 500 gen-500-MX-hathiValidIDList.txt 216 ./COMPX520-DOWNLOADER-PNG-10PAGES.sh java-gen-corpus/gen-500-MX-hathiValidIDList.txt 217 -
other-projects/is-sheet-music-encore/trunk/dapiclient2-extended-ZIP.pl
r33010 r33437 152 152 print $response->content; 153 153 } 154 exit $success; 154 unless ($success) { 155 # indicate there was an error to the calling process 156 exit 1; 157 } 155 158 156 159 -
other-projects/is-sheet-music-encore/trunk/dapiclient2-extended-hi-res.pl
r33384 r33437 154 154 print $response->content; 155 155 } 156 exit $success;157 156 158 157 158 unless ($success) { 159 # indicate there was an error to the calling process 160 exit 1; 161 } 159 162 163 -
other-projects/is-sheet-music-encore/trunk/dapiclient2-extended-size.pl
r33384 r33437 154 154 print $response->content; 155 155 } 156 exit $success; 156 unless ($success) { 157 # indicate there was an error to the calling process 158 exit 1; 159 } 157 160 158 161 -
other-projects/is-sheet-music-encore/trunk/dapiclient2-extended.pl
r32952 r33437 152 152 print $response->content; 153 153 } 154 exit $success; 154 unless ($success) { 155 # indicate there was an error to the calling process 156 exit 1; 157 } 155 158 156 159 -
other-projects/is-sheet-music-encore/trunk/image-identification-dev-02/.idea/workspace.xml
r33418 r33437 15 15 <entry file="file://$PROJECT_DIR$/image-identification-development/src/Main.java"> 16 16 <provider selected="true" editor-type-id="text-editor"> 17 <state relative-caret-position=" 2774">18 <caret line=" 800" column="12" selection-start-line="800" selection-start-column="12" selection-end-line="800" selection-end-column="92" />17 <state relative-caret-position="874"> 18 <caret line="116" column="48" selection-start-line="116" selection-start-column="48" selection-end-line="116" selection-end-column="48" /> 19 19 <folding> 20 20 <element signature="imports" expanded="true" /> … … 40 40 <entry file="file://$PROJECT_DIR$/image-identification-development/src/MainMorph.java"> 41 41 <provider selected="true" editor-type-id="text-editor"> 42 <state relative-caret-position=" 347">43 <caret line=" 306" column="41" selection-start-line="306" selection-start-column="41" selection-end-line="306" selection-end-column="41" />42 <state relative-caret-position="2976"> 43 <caret line="501" column="69" selection-start-line="501" selection-start-column="69" selection-end-line="501" selection-end-column="69" /> 44 44 <folding> 45 <element signature="e#9745#9798#1" /> 46 <element signature="e#10939#13586#1" /> 45 <element signature="imports" expanded="true" /> 46 <element signature="class#StartAndEndPoint#0;class#MainMorph#0" /> 47 <element signature="method#toBufferedImage#0;class#MainMorph#0" /> 48 <element signature="e#10410#12916#1" /> 49 <element signature="e#13000#15039#1" /> 50 <element signature="e#15107#17754#1" /> 51 <element signature="e#18758#22215#1" /> 52 <element signature="e#19065#19077#0" expanded="true" /> 53 <element signature="e#23397#23409#0" expanded="true" /> 54 </folding> 55 </state> 56 </provider> 57 </entry> 58 </file> 59 <file pinned="false" current-in-tab="false"> 60 <entry file="file://$PROJECT_DIR$/../image-identification-terminal/javaClassifierComparison.java"> 61 <provider selected="true" editor-type-id="text-editor"> 62 <state relative-caret-position="1123"> 63 <caret line="305" selection-start-line="305" selection-end-line="305" /> 64 <folding> 65 <element signature="imports" expanded="true" /> 66 <element signature="class#StartAndEndPoint#0;class#javaClassifierComparison#0" /> 67 <element signature="method#StartAndEndPoint#0;class#StartAndEndPoint#0;class#javaClassifierComparison#0" /> 68 <element signature="class#Pair#0;class#javaClassifierComparison#0" /> 69 <element signature="method#Algorithm_HoughLinesP_Single#0;class#javaClassifierComparison#0" /> 70 <element signature="method#Algorithm_HoughLinesP_Combo#0;class#javaClassifierComparison#0" /> 71 <element signature="e#11894#11906#0" expanded="true" /> 72 <element signature="method#Classifier_LineCounter#0;class#javaClassifierComparison#0" /> 73 <element signature="method#Classifier_ClusterDetection#0;class#javaClassifierComparison#0" /> 74 <element signature="method#removeDuplicates#0;class#javaClassifierComparison#0" /> 75 <element signature="e#17563#18162#1" /> 76 <element signature="method#lineComparison#0;class#javaClassifierComparison#0" /> 77 <element signature="method#ClusterCheck#0;class#javaClassifierComparison#0" /> 47 78 </folding> 48 79 </state> … … 65 96 <option value="$PROJECT_DIR$/../image-identification-terminal/javaImageClassifier.java" /> 66 97 <option value="$PROJECT_DIR$/../image-identification-terminal/javaClassifierComparison" /> 98 <option value="$PROJECT_DIR$/image-identification-development/src/Main.java" /> 67 99 <option value="$PROJECT_DIR$/../image-identification-terminal/javaClassifierComparison.java" /> 68 <option value="$PROJECT_DIR$/image-identification-development/src/Main.java" />69 100 <option value="$PROJECT_DIR$/image-identification-development/src/MainMorph.java" /> 70 101 </list> … … 87 118 <foldersAlwaysOnTop value="true" /> 88 119 </navigator> 89 <panes /> 120 <panes> 121 <pane id="ProjectPane" /> 122 <pane id="PackagesPane" /> 123 <pane id="Scope" /> 124 </panes> 90 125 </component> 91 126 <component name="PropertiesComponent"> … … 94 129 <property name="project.structure.proportion" value="0.15" /> 95 130 <property name="project.structure.side.proportion" value="0.2" /> 131 <property name="run.code.analysis.last.selected.profile" value="pProject Default" /> 96 132 <property name="settings.editor.selected.configurable" value="preferences.lookFeel" /> 97 133 </component> … … 146 182 <window_info anchor="bottom" id="Message" order="0" /> 147 183 <window_info anchor="bottom" id="Find" order="1" /> 148 <window_info anchor="bottom" id="Run" order="2" weight="0.24 610245" />184 <window_info anchor="bottom" id="Run" order="2" weight="0.2494432" /> 149 185 <window_info anchor="bottom" id="Debug" order="3" weight="0.4" /> 150 186 <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" /> … … 191 227 </provider> 192 228 </entry> 193 <entry file="file://$PROJECT_DIR$/../image-identification-terminal/javaClassifierComparison.java">194 <provider selected="true" editor-type-id="text-editor">195 <state relative-caret-position="921">196 <caret line="107" column="5" lean-forward="true" selection-start-line="107" selection-start-column="5" selection-end-line="107" selection-end-column="5" />197 <folding>198 <element signature="imports" expanded="true" />199 <element signature="class#StartAndEndPoint#0;class#javaClassifierComparison#0" />200 <element signature="method#StartAndEndPoint#0;class#StartAndEndPoint#0;class#javaClassifierComparison#0" />201 <element signature="class#Pair#0;class#javaClassifierComparison#0" />202 <element signature="method#Classifier_LineCounter#0;class#javaClassifierComparison#0" />203 <element signature="method#VarianceCalc#0;class#javaClassifierComparison#0" />204 <element signature="method#lineComparison#0;class#javaClassifierComparison#0" />205 <element signature="method#ClusterCheck#0;class#javaClassifierComparison#0" />206 </folding>207 </state>208 </provider>209 </entry>210 229 <entry file="file://$PROJECT_DIR$/image-identification-development/src/Main.java"> 211 230 <provider selected="true" editor-type-id="text-editor"> 212 <state relative-caret-position=" 2774">213 <caret line=" 800" column="12" selection-start-line="800" selection-start-column="12" selection-end-line="800" selection-end-column="92" />231 <state relative-caret-position="874"> 232 <caret line="116" column="48" selection-start-line="116" selection-start-column="48" selection-end-line="116" selection-end-column="48" /> 214 233 <folding> 215 234 <element signature="imports" expanded="true" /> … … 231 250 </provider> 232 251 </entry> 233 <entry file="file://$PROJECT_DIR$/ image-identification-development/src/MainMorph.java">252 <entry file="file://$PROJECT_DIR$/../image-identification-terminal/javaClassifierComparison.java"> 234 253 <provider selected="true" editor-type-id="text-editor"> 235 <state relative-caret-position=" 347">236 <caret line="30 6" column="41" selection-start-line="306" selection-start-column="41" selection-end-line="306" selection-end-column="41" />254 <state relative-caret-position="1123"> 255 <caret line="305" selection-start-line="305" selection-end-line="305" /> 237 256 <folding> 238 <element signature="e#9745#9798#1" /> 239 <element signature="e#10939#13586#1" /> 257 <element signature="imports" expanded="true" /> 258 <element signature="class#StartAndEndPoint#0;class#javaClassifierComparison#0" /> 259 <element signature="method#StartAndEndPoint#0;class#StartAndEndPoint#0;class#javaClassifierComparison#0" /> 260 <element signature="class#Pair#0;class#javaClassifierComparison#0" /> 261 <element signature="method#Algorithm_HoughLinesP_Single#0;class#javaClassifierComparison#0" /> 262 <element signature="method#Algorithm_HoughLinesP_Combo#0;class#javaClassifierComparison#0" /> 263 <element signature="e#11894#11906#0" expanded="true" /> 264 <element signature="method#Classifier_LineCounter#0;class#javaClassifierComparison#0" /> 265 <element signature="method#Classifier_ClusterDetection#0;class#javaClassifierComparison#0" /> 266 <element signature="method#removeDuplicates#0;class#javaClassifierComparison#0" /> 267 <element signature="e#17563#18162#1" /> 268 <element signature="method#lineComparison#0;class#javaClassifierComparison#0" /> 269 <element signature="method#ClusterCheck#0;class#javaClassifierComparison#0" /> 240 270 </folding> 241 271 </state> 242 272 </provider> 243 273 </entry> 274 <entry file="file://$PROJECT_DIR$/image-identification-development/src/MainMorph.java"> 275 <provider selected="true" editor-type-id="text-editor"> 276 <state relative-caret-position="2976"> 277 <caret line="501" column="69" selection-start-line="501" selection-start-column="69" selection-end-line="501" selection-end-column="69" /> 278 <folding> 279 <element signature="imports" expanded="true" /> 280 <element signature="class#StartAndEndPoint#0;class#MainMorph#0" /> 281 <element signature="method#toBufferedImage#0;class#MainMorph#0" /> 282 <element signature="e#10410#12916#1" /> 283 <element signature="e#13000#15039#1" /> 284 <element signature="e#15107#17754#1" /> 285 <element signature="e#18758#22215#1" /> 286 <element signature="e#19065#19077#0" expanded="true" /> 287 <element signature="e#23397#23409#0" expanded="true" /> 288 </folding> 289 </state> 290 </provider> 291 </entry> 244 292 </component> 245 293 <component name="masterDetails"> -
other-projects/is-sheet-music-encore/trunk/image-identification-dev-02/image-identification-development/src/Main.java
r33415 r33437 113 113 static int MAXLINEGAP = 1; //4 114 114 static double THRESHOLD_C = 4; 115 static double SLOPEGRADIENT = 0.02; 115 static double SLOPEGRADIENT = 0.02; //0.02 116 116 static double CLUSTER_DISTANCE_MAX = 40; 117 117 static double CLUSTER_DISTANCE_MIN = 2; … … 757 757 //!!!!!!!!!!!!!!!!!!!!!!!!!!!NOTNOT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 758 758 //coo.31924062612282-9.png 8 lines 759 //String default_file = hiresDirectory+ "MU/SheetMusic/mdp.39015096400919-9.png"; 760 761 //String default_file = hiresDirectory+ "MU/SheetMusic/mdp.39015096402204-2.png"; 762 String default_file = hiresDirectory+ "MU/SheetMusic/mdp.39015096408490-3.png"; 759 763 //String default_file = directory+"NotSheetMusic/coo.31924062612282-9.png"; 760 764 //String default_file = directory+"NotSheetMusic/mdp.39015097852365-2.png"; 761 765 //String default_file ="TestImages/NotNot/mdp.39015080972303-3.png"; 762 766 //String default_file =hiresDirectory+"BK/NotSheetMusic/aeu.ark+=13960=t2q53nq6w-6.png"; 763 String default_file = "/Scratch/cpb16/is-sheet-music-encore/image-identification-terminal/TestImages/test-coo.31924062612282-9.png";767 //String default_file = "/Scratch/cpb16/is-sheet-music-encore/image-identification-terminal/TestImages/test-coo.31924062612282-9.png"; 764 768 //String default_file =hiresDirectory+"BK/NotSheetMusic/aeu.ark+=13960=t9z03w65z-4.png"; 765 769 … … 856 860 HighGui.resizeWindow("LINESFOUND", 1000,1000); 857 861 858 //HighGui.imshow("CLUSTERS FOUND", clustersFoundRGB); 862 HighGui.imshow("CLUSTERSFOUND", clustersFoundRGB); 863 HighGui.resizeWindow("CLUSTERSFOUND", 1000,1000); 859 864 860 865 //HighGui.imshow("Detected Lines (in red) - negative", edgesDetectedRGBProb); … … 862 867 System.out.println("LINE COUNT RESULT: " + ClassifierLineCount(horizontalLineCount) + '\t' +"LinesFound: " + horizontalLineCount); //COUNT OF LINES CLASSIFICATION 863 868 //System.out.println("LINE CLUSTER RESULT: " + ClassifierLineClusterOLD(toBeClassifiedImg).get(0) + '\t' + "LinesFound: " + ClassifierLineClusterOLD(toBeClassifiedImg).get(1) + '\t' + "ClustersFound: " + ClassifierLineClusterOLD(toBeClassifiedImg).get(2)); 864 //System.out.println("NEW CLUSTER RESULTS: " + ClassifierLineClusterPt(pointArrayList,clustersFoundRGB).get(0) + '\t' + "LinesFound: " + horizontalLineCount + '\t' + "ClustersFound: " + ClassifierLineClusterPt(pointArrayList,clustersFoundRGB).get(1));869 System.out.println("NEW CLUSTER RESULTS: " + ClassifierLineClusterPt(pointArrayList,clustersFoundRGB).get(0) + '\t' + "LinesFound: " + horizontalLineCount + '\t' + "ClustersFound: " + ClassifierLineClusterPt(pointArrayList,clustersFoundRGB).get(1)); 865 870 //System.out.println(ClassifierLineClusterPt(pointArrayList, clustersFoundRGB)); 866 871 -
other-projects/is-sheet-music-encore/trunk/image-identification-dev-02/image-identification-development/src/MainMorph.java
r33418 r33437 59 59 import org.opencv.core.*; 60 60 import org.opencv.core.Point; 61 61 62 import org.opencv.highgui.HighGui; 62 63 import org.opencv.imgcodecs.Imgcodecs; 63 64 import org.opencv.imgproc.Imgproc; 65 import org.opencv.imgproc.Moments; 66 import org.opencv.osgi.OpenCVNativeLoader; 64 67 import org.opencv.photo.Photo; 68 69 import static org.opencv.core.CvType.CV_8UC3; 70 import static org.opencv.highgui.HighGui.imshow; 65 71 import static org.opencv.imgcodecs.Imgcodecs.imwrite; 66 72 import java.awt.image.BufferedImage; … … 85 91 //https://stackoverflow.com/questions/37946482/crop-images-area-with-opencv-java 86 92 //https://docs.opencv.org/3.4/dd/dd7/tutorial_morph_lines_detection.html 87 93 //https://docs.opencv.org/3.4/d0/d49/tutorial_moments.html 94 //https://docs.opencv.org/2.4/doc/tutorials/imgproc/shapedescriptors/moments/moments.html 95 //https://docs.opencv.org/3.3.1/d3/dc0/group__imgproc__shape.html#ga17ed9f5d79ae97bd4c7cf18403e1689a 96 //http://androiderstuffs.blogspot.com/2016/06/detecting-rectangle-using-opencv-java.html 97 //https://stackoverflow.com/questions/23327502/opencv-how-to-draw-minarearect-in-java 88 98 89 99 … … 107 117 //GLOBAL_CONSTANTS 108 118 109 static double THRESHOLD_C = 4; 110 119 static double THRESHOLD_C = 4; 120 static double THRESHOLD_AREA_SIZE = 1000; 121 static double THRESHOLD_AREA_COUNT = 2; 111 122 112 123 // … … 163 174 164 175 private static void showWaitDestroy(String winname, Mat img) { 165 HighGui.imshow(winname, img); 166 HighGui.moveWindow(winname, 500, 0); 167 HighGui.waitKey(0); 168 HighGui.destroyWindow(winname); 176 try { 177 HighGui.namedWindow(winname, HighGui.WINDOW_AUTOSIZE); 178 imshow(winname, img); 179 HighGui.resizeWindow(winname, 1000, 1000); 180 HighGui.moveWindow(winname, 500, 0); 181 HighGui.waitKey(0); 182 183 HighGui.destroyWindow(winname); 184 } 185 catch (Exception e){ 186 e.printStackTrace(); 187 } 169 188 } 170 189 //MAIN … … 177 196 178 197 //Variables 179 int codeVersion = 2;198 int codeVersion = 5; 180 199 Mat edgesDetected = new Mat(); 181 200 Mat mid = new Mat(); 182 201 Mat edgesDetectedRGB = new Mat(); 183 202 Mat clustersFoundRGB = new Mat(); 203 String testDirectory = "/Scratch/cpb16/is-sheet-music-encore/image-identification-dev-02/image-identification-development/"; 184 204 String directory = "/Scratch/cpb16/is-sheet-music-encore/download-images/MU/"; 185 205 String hiresDirectory = "/Scratch/cpb16/is-sheet-music-encore/hires-download-images/"; … … 192 212 //String default_file = directory+"NotSheetMusic/coo.31924062612282-9.png"; 193 213 //String default_file = directory+"NotSheetMusic/mdp.39015097852365-2.png"; 194 //String default_file = "TestImages/NotNot/mdp.39015080972303-3.png";214 //String default_file =testDirectory+"TestImages/NotNot/mdp.39015080972303-3.png"; //WHY GREY? 195 215 //String default_file =hiresDirectory+"BK/NotSheetMusic/aeu.ark+=13960=t2q53nq6w-6.png"; 196 String default_file = "/Scratch/cpb16/is-sheet-music-encore/image-identification-terminal/TestImages/test-coo.31924062612282-9.png";197 216 //String default_file =hiresDirectory+"BK/NotSheetMusic/aeu.ark+=13960=t9z03w65z-4.png"; 217 //String default_file =hiresDirectory+"MU/NotSheetMusic/aeu.ark+=13960=t0dv28v9r-1.png"; 198 218 199 219 //System.out.println(default_file); 200 //String default_file = "TestImages/NotSheetMusic01.png"; 201 //String default_file = "TestImages/NotSheetMusic02.png"; 202 //String default_file = "TestImages/SheetMusic01.png"; 203 //String default_file = "TestImages/SheetMusic02.png"; 204 //String default_file = "TestImages/vLine.png"; 220 //String default_file = "/Scratch/cpb16/is-sheet-music-encore/image-identification-terminal/TestImages/test-coo.31924062612282-9.png"; 221 //String default_file = testDirectory+"TestImages/MorphTester.png"; 222 //String default_file = testDirectory+"TestImages/NotSheetMusic01.png"; 223 //String default_file = testDirectory+"TestImages/NotSheetMusic02.png"; 224 //String default_file = testDirectory+"TestImages/SheetMusic01.png"; 225 //String default_file = testDirectory+"TestImages/SheetMusic02.png"; 226 //String default_file = testDirectory+"TestImages/vLine.png"; 205 227 String filename = ((args.length > 0) ? args[0] : default_file); 206 228 File file = new File(filename); … … 210 232 211 233 // Load an image 212 Mat original = Imgcodecs.imread(filename, Imgcodecs.IMREAD_GRAYSCALE);213 // Edge detection234 Mat original1 = Imgcodecs.imread(filename, Imgcodecs.IMREAD_GRAYSCALE); 235 Mat original = original1.clone(); 214 236 215 Imgproc.adaptiveThreshold(original , edgesDetected,255, Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C,Imgproc.THRESH_BINARY_INV, 15, THRESHOLD_C);237 Imgproc.adaptiveThreshold(original1, original,255, Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C,Imgproc.THRESH_BINARY_INV, 15, THRESHOLD_C); 216 238 //TEST PARAMETERSImgproc.adaptiveThreshold(original, edgesDetected,255, Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C,Imgproc.THRESH_BINARY_INV, 531,1); 217 239 //Imgproc.threshold(original,original, 127, 255, Imgproc.THRESH_BINARY); 218 240 219 241 … … 275 297 //Successful hardcode for morhpology 276 298 if (codeVersion == 2) { 299 300 //MAKE SURE BLACK & WHITE 277 301 Mat test = original.clone(); 278 showWaitDestroy("00 Original", test);302 showWaitDestroy("00 Binarized Original", test); 279 303 280 304 Mat kernelErode = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(100,1)); … … 282 306 showWaitDestroy("01 Erode", test); 283 307 284 Mat kernelDialate = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(1 00,10));308 Mat kernelDialate = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(110,10)); 285 309 Imgproc.dilate(test, test, kernelDialate); 286 310 showWaitDestroy("02 Dialate", test); … … 290 314 showWaitDestroy(" 03 Erode Again", test); 291 315 292 Mat kernelClose = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size( 50,30));316 Mat kernelClose = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(35,20)); 293 317 Imgproc.morphologyEx(test,test,Imgproc.MORPH_CLOSE, kernelClose); 294 318 showWaitDestroy("04 Close", test); 295 319 296 Imgproc.adaptiveThreshold(test, test,255, Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C,Imgproc.THRESH_BINARY_INV, 15, THRESHOLD_C);297 showWaitDestroy("05 Binarized", test);320 // Imgproc.threshold(test,test, 127, 255, Imgproc.THRESH_BINARY); 321 // showWaitDestroy("05 Binarized", test); 298 322 299 323 Mat kernelOpen = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(4,4)); … … 364 388 System.exit(0); 365 389 } 366 390 //Better morphology attempt - static 391 if(codeVersion ==4) { 392 393 //Display Original 394 showWaitDestroy("original", original1); 395 396 Mat test = original.clone(); 397 showWaitDestroy("00 Inverse Binarized Original", test); 398 399 Mat kernelErode = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(10,1)); 400 Imgproc.erode(test,test,kernelErode); 401 showWaitDestroy("01 Erode", test); 402 403 Mat kernelDilate = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(20,3)); 404 Imgproc.dilate(test,test,kernelDilate); 405 showWaitDestroy("02 Dilate", test); 406 407 Mat kernelOpening = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(4,4)); 408 Imgproc.morphologyEx(test, test, Imgproc.MORPH_CLOSE, kernelOpening); 409 showWaitDestroy("03 Open", test); 410 411 Mat kernelErode02 = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(8,8)); 412 Imgproc.erode(test,test,kernelErode02); 413 showWaitDestroy("04 Erode (Final)", test); 414 415 416 //DETECT OUTLINE AND FIND AREA OF THESE LINES. 417 ArrayList<MatOfPoint> contours = new ArrayList<MatOfPoint>(); 418 Mat hierarchy = new Mat(); 419 420 //PARAMETERS: input image, output array of arrays, output array, contour retrieval mode, contour approximation method. 421 //(contours) output array of arrays: Detected contours. Each contour is stored as a vector of points 422 //(hierarchy) output array: Optional output vector, containing information about the image topology. 423 //https://docs.opencv.org/3.3.1/d3/dc0/group__imgproc__shape.html#ga17ed9f5d79ae97bd4c7cf18403e1689a 424 425 Imgproc.findContours(test, contours, hierarchy, Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE); 426 427 //Draw contours and record areas 428 Mat drawing = Mat.zeros(test.size(), CvType.CV_8UC3); 429 Mat drawing2 = Mat.zeros(test.size(), CvType.CV_8UC3); 430 int areaCounter = 0; 431 for (int i = 0; i < contours.size(); i++) { 432 double area = Imgproc.contourArea(contours.get(i)); 433 if(area > THRESHOLD_AREA_SIZE ) { 434 areaCounter++; 435 Scalar color = new Scalar(0, 0, 255); 436 Imgproc.drawContours(drawing, contours, i, color, 1); 437 System.out.println("AREA: " + area); 438 } 439 } 440 441 //Classifier Calculation 442 if(areaCounter >= THRESHOLD_AREA_COUNT){ 443 System.out.println("THIS IS SHEET MUSIC"); 444 System.out.println(areaCounter); 445 } 446 447 448 //Show in a window 449 showWaitDestroy("Contours", drawing); 450 } 451 //Better morphology attempt - dynamic 452 if(codeVersion ==5) { 453 int hori = original.width(); 454 int vert = original.height(); 455 //Find ratio between 100 and width and 100 and height 456 int sizeX100 = (hori/68) * 10; 457 int sizeY100 = (vert/46) * 10; 458 int sizeX10 = (hori/68); 459 int sizeY10 = (vert/46); 460 int sizeX1 = (hori/46)/10; 461 int sizeY1 = (vert/46)/10; 462 463 //SizeX should always be a 68th * 10. Based off the defualt tester image "coo.*" 464 //SizeT should always be a 46th * 10 465 466 System.out.println(hori + " " + vert + " " + sizeX1 + " " + sizeY1); 467 //Display Original 468 showWaitDestroy("original", original1); 469 470 Mat test = original.clone(); 471 showWaitDestroy("00 Inverse Binarized Original", test); 472 473 Mat kernelErode = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(sizeX10,sizeY1)); //new Size(10,1)); 474 Imgproc.erode(test,test,kernelErode); 475 showWaitDestroy("01 Erode", test); 476 477 Mat kernelDilate = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(sizeX10*2,sizeY1*3)); //new Size(20,3)); 478 Imgproc.dilate(test,test,kernelDilate); 479 showWaitDestroy("02 Dilate", test); 480 481 Mat kernelOpening = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(sizeX1*4,sizeY1*4)); //new Size(4,4)); 482 Imgproc.morphologyEx(test, test, Imgproc.MORPH_CLOSE, kernelOpening); 483 showWaitDestroy("03 Open", test); 484 485 Mat kernelErode02 = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(sizeX1*8,sizeX1*8)); //new Size(8,8)); 486 Imgproc.erode(test,test,kernelErode02); 487 showWaitDestroy("04 Erode (Final)", test); 488 489 490 //DETECT OUTLINE AND FIND AREA OF THESE LINES. 491 ArrayList<MatOfPoint> contours = new ArrayList<MatOfPoint>(); 492 Mat hierarchy = new Mat(); 493 494 //PARAMETERS: input image, output array of arrays, output array, contour retrieval mode, contour approximation method. 495 //(contours) output array of arrays: Detected contours. Each contour is stored as a vector of points 496 //(hierarchy) output array: Optional output vector, containing information about the image topology. 497 //https://docs.opencv.org/3.3.1/d3/dc0/group__imgproc__shape.html#ga17ed9f5d79ae97bd4c7cf18403e1689a 498 499 Imgproc.findContours(test, contours, hierarchy, Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE); 500 501 //Draw contours and record areas 502 Mat drawing = Mat.zeros(test.size(), CvType.CV_8UC3); 503 int areaCounter = 0; 504 for (int i = 0; i < contours.size(); i++) { 505 double area = Imgproc.contourArea(contours.get(i)); 506 if(area > THRESHOLD_AREA_SIZE ) { 507 areaCounter++; 508 Scalar color = new Scalar(0, 0, 255); 509 Imgproc.drawContours(drawing, contours, i, color, 1); 510 System.out.println("AREA: " + area); 511 } 512 } 513 514 //Classifier Calculation 515 if(areaCounter >= THRESHOLD_AREA_COUNT){ 516 System.out.println("THIS IS SHEET MUSIC"); 517 System.out.println(areaCounter); 518 } 519 520 521 //Show in a window 522 showWaitDestroy("Contours", drawing); 523 } 367 524 368 525 … … 370 527 //****************MORPHOLOGY**************************************************************************************** 371 528 372 BufferedImage toBeClassifiedImg = toBufferedImage(edgesDetectedRGB); 373 529 //BufferedImage toBeClassifiedImg = toBufferedImage(edgesDetectedRGB); 374 530 375 531 //Display Results … … 378 534 379 535 380 HighGui.imshow("LINESFOUND", edgesDetectedRGB);536 imshow("LINESFOUND", edgesDetectedRGB); 381 537 HighGui.resizeWindow("LINESFOUND", 1000,1000); 382 538 -
other-projects/is-sheet-music-encore/trunk/image-identification-terminal/Makefile
r33415 r33437 34 34 #Display output 35 35 less logSingle.txt 36 37 testrun-classifier-single-morph: 38 javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaClassifierComparison.java; 39 ./runClassifer.sh TestImages/test-coo.31924062612282-9.png morphology logSingle.txt -singleNew 40 echo "Displaying javaImageClassifier output" 41 #Calculate the Accuracy of the classifier 42 java javaAccuracyCalculator logSingle.txt morphology resultSingle.txt 43 #Display output 44 less logSingle.txt 36 45 37 46 -
other-projects/is-sheet-music-encore/trunk/image-identification-terminal/javaAccuracyCalculator.java
r33340 r33437 47 47 truePositive++; 48 48 } 49 else if(item[3].equals("false") ){49 else if(item[3].equals("false") || item[3].equals("null")){ 50 50 falseNegative++; 51 51 } … … 59 59 falsePositive++; 60 60 } 61 else if(item[3].equals("false") ){61 else if(item[3].equals("false")|| item[3].equals("null")){ 62 62 trueNegative++; 63 63 } -
other-projects/is-sheet-music-encore/trunk/image-identification-terminal/javaClassifierComparison.java
r33415 r33437 34 34 //False =classifierType + 0 + Filename + Status 35 35 public class javaClassifierComparison { 36 37 //MAKE THIS A PROPERTIES FILE. THIS WILL BE SET AND CHECKED FROM OUTSIDE THE LOOP 36 38 //GLOBALS Constants 37 39 static int CLASSIFIER_HOUGHLINESP_MIN = 10; … … 41 43 static int MINLINECOUNT = 40; 42 44 static int MAXLINEGAP = 1; 43 static double THRESHOLD_C 45 static double THRESHOLD_C = 4; 44 46 static double SLOPEGRADIENT = 0.02; 45 47 static double CLUSTER_DISTANCE_MAX = 40; 46 48 static double CLUSTER_DISTANCE_MIN = 2; 49 //MORPHOLOGY 50 static double THRESHOLD_AREA_SIZE = 1000; 51 static double THRESHOLD_AREA_COUNT = 4; 47 52 48 53 … … 113 118 System.out.println("Usage: imageClassifier <inputFilename> <classifierType> <outputFilename>"); 114 119 } else { 115 Pair houghlinesPResult = new Pair();120 Pair algorithmResult = new Pair(); 116 121 117 122 Boolean result = null; … … 132 137 case "count": 133 138 enableLineClustering = false; 134 houghlinesPResult = Algorithm_HoughLinesP(imageFilename, enableLineClustering);135 bw.write("Filename:" + '\t' + imageFilename + '\t' + "Classified as:" + '\t' + houghlinesPResult.getBoolean() + '\t' + "Number of lines:" + '\t' + houghlinesPResult.getInteger() + '\t' + classifierType + '\n');139 algorithmResult = Algorithm_HoughLinesP_Single(imageFilename, enableLineClustering); 140 bw.write("Filename:" + '\t' + imageFilename + '\t' + "Classified as:" + '\t' + algorithmResult.getBoolean() + '\t' + "Number of lines:" + '\t' + algorithmResult.getInteger() + '\t' + classifierType + '\n'); 136 141 break; 137 142 case "cluster": 138 143 enableLineClustering = true; 139 houghlinesPResult = Algorithm_HoughLinesP(imageFilename, enableLineClustering); 140 bw.write("Filename:" + '\t' + imageFilename + '\t' + "Classified as:" + '\t' + houghlinesPResult.getBoolean() + '\t' + "Number of lines:" + '\t' + houghlinesPResult.getInteger() + '\t' + classifierType + '\n'); 144 algorithmResult = Algorithm_HoughLinesP_Single(imageFilename, enableLineClustering); 145 bw.write("Filename:" + '\t' + imageFilename + '\t' + "Classified as:" + '\t' + algorithmResult.getBoolean() + '\t' + "Number of lines:" + '\t' + algorithmResult.getInteger() + '\t' + classifierType + '\n'); 146 break; 147 case "combo": 148 algorithmResult = Algorithm_HoughLinesP_Combo(imageFilename); 149 bw.write("Filename:" + '\t' + imageFilename + '\t' + "Classified as:" + '\t' + algorithmResult.getBoolean() + '\t' + "Number of lines:" + '\t' + algorithmResult.getInteger() + '\t' + classifierType + '\n'); 141 150 break; 142 151 case "morphology": 143 //result_cluster = setup_Cluster(imageFilename);144 //bw.write(result_cluster);152 algorithmResult = Algorithm_Morphology(imageFilename); 153 bw.write("Filename:" + '\t' + imageFilename + '\t' + "Classified as:" + '\t' + algorithmResult.getBoolean() + '\t' + "Number of areas:" + '\t' + algorithmResult.getInteger() + '\t' + classifierType + '\n'); 145 154 break; 146 155 default: … … 148 157 break; 149 158 } 150 151 159 bw.close(); 152 160 } … … 159 167 //ALGORITHM FUNCTIONS 160 168 //****************** 161 private static Pair Algorithm_HoughLinesP (String filename, Boolean enableLineClusterDetection){169 private static Pair Algorithm_HoughLinesP_Single(String filename, Boolean enableLineClusterDetection){ 162 170 System.loadLibrary(Core.NATIVE_LIBRARY_NAME); 163 171 Boolean isSheetMusic = null; … … 170 178 Mat edgesExtra = new Mat(); 171 179 Mat edgesDetectedRGBProb; 172 ArrayList<StartAndEndPoint> pointArrayList = new ArrayList< >();180 ArrayList<StartAndEndPoint> pointArrayList = new ArrayList<StartAndEndPoint>(); 173 181 174 182 //****************EXPLANATION************************************************** … … 204 212 returnVariables.setBoolean(isSheetMusic); 205 213 returnVariables.setInteger(horizontalLineCount); 214 } 215 } 216 catch(Exception e){ 217 System.err.println(e); 218 } 219 return returnVariables; 220 } 221 private static Pair Algorithm_HoughLinesP_Combo(String filename){ 222 System.loadLibrary(Core.NATIVE_LIBRARY_NAME); 223 Boolean isSheetMusic = null; 224 Pair returnVariables = new Pair(); 225 try{ 226 //Variables 227 int horizontalLineCount =0; 228 Mat edgesDetected = new Mat(); 229 Mat edgesDetectedRGB = new Mat(); 230 Mat edgesExtra = new Mat(); 231 Mat edgesDetectedRGBProb; 232 ArrayList<StartAndEndPoint> pointArrayList = new ArrayList<StartAndEndPoint>(); 233 234 //****************EXPLANATION************************************************** 235 // 236 //Load an image in greyscale 237 //Additional matrix to hold results of line detection 238 //Inversed Binarization of image 239 //Detect lines in image 240 //Go thru every line detected and check its gradient is less than SLOPEGRADIENT 241 // 242 //****************EXPLANATION************************************************** 243 244 Mat original = Imgcodecs.imread(filename, Imgcodecs.IMREAD_GRAYSCALE); 245 Mat linesP = new Mat(); //will hold the results of the detection 246 Imgproc.adaptiveThreshold(original, edgesDetected,255, Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C,Imgproc.THRESH_BINARY_INV,15, THRESHOLD_C); 247 double minLineLength = edgesDetected.size().width/8; 248 Imgproc.HoughLinesP(edgesDetected, linesP, 1, Math.PI / 720, HOUGHLINEP_THRESHOLD, minLineLength, MAXLINEGAP); 249 for (int x = 0; x < linesP.rows(); x++) { 250 double[] l = linesP.get(x, 0); 251 Point p1 = new Point(l[0], l[1]); 252 Point p2 = new Point(l[2], l[3]); 253 double m = Math.abs(p2.y - p1.y)/(p2.x - p1.x); 254 if(m<SLOPEGRADIENT) { 255 horizontalLineCount++; 256 pointArrayList.add(new StartAndEndPoint(p1, p2)); 257 } 258 } 259 260 //Calculate if its sheet music or not 261 isSheetMusic = Classifier_LineCounter(horizontalLineCount); 262 if(isSheetMusic == true){ 263 returnVariables.setBoolean(isSheetMusic); 264 returnVariables.setInteger(horizontalLineCount); 265 } 266 else if (isSheetMusic == false){ 267 returnVariables = Classifier_ClusterDetection(pointArrayList); 268 } 269 } 270 catch(Exception e){ 271 System.err.println(e); 272 } 273 return returnVariables; 274 } 275 private static Pair Algorithm_Morphology(String filename){ 276 System.loadLibrary(Core.NATIVE_LIBRARY_NAME); 277 Boolean isSheetMusic = null; 278 Pair returnVariables = new Pair(); 279 try{ 280 //Variables 281 int areaCounter = 0; 282 Mat edgesDetectedRGB = new Mat(); 283 Mat original = Imgcodecs.imread(filename, Imgcodecs.IMREAD_GRAYSCALE); 284 285 ArrayList<MatOfPoint> contours = new ArrayList<MatOfPoint>(); 286 Mat hierarchy = new Mat(); 287 288 //Thresholds 289 Imgproc.adaptiveThreshold(original, original,255, Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C,Imgproc.THRESH_BINARY_INV, 15, THRESHOLD_C); 290 Mat processed = original.clone(); 291 //Morphological Processing 292 Mat kernelErode = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(10,1)); 293 Imgproc.erode(processed,processed,kernelErode); 294 295 Mat kernelDilate = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(20,3)); 296 Imgproc.dilate(processed,processed,kernelDilate); 297 298 Mat kernelOpening = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(4,4)); 299 Imgproc.morphologyEx(processed, processed, Imgproc.MORPH_CLOSE, kernelOpening); 300 301 Mat kernelErode02 = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(8,8)); 302 Imgproc.erode(processed,processed,kernelErode02); 303 304 //Detect contours 305 Imgproc.findContours(processed, contours, hierarchy, Imgproc.RETR_TREE, Imgproc.CHAIN_APPROX_SIMPLE); 306 307 //Record areas 308 for (int i = 0; i < contours.size(); i++) { 309 double area = Imgproc.contourArea(contours.get(i)); 310 //Check if area detected meets threshold 311 if(area > THRESHOLD_AREA_SIZE) { 312 areaCounter++; 313 //System.out.println("AREA: " + area); 314 } 315 } 316 //Calculates if sheet music or not 317 if(areaCounter >= THRESHOLD_AREA_COUNT){ 318 returnVariables.setBoolean(true); 319 returnVariables.setInteger(areaCounter); 206 320 } 207 321 } -
other-projects/is-sheet-music-encore/trunk/image-identification-terminal/runClassifer.sh
r33415 r33437 2 2 3 3 if [ $# != 4 ] ; then 4 echo "Usage: ./testClassifier.sh folder/file _nameclassifier_type output_filename type(-a:all -test:100 -single:1)" 1>&24 echo "Usage: ./testClassifier.sh folder/file classifier_type output_filename type(-a:all -test:100 -single:1)" 1>&2 5 5 exit 1 6 6 fi 7 7 8 folder_name=$18 source=$1 9 9 classifier_type=$2 10 10 output=$3 … … 12 12 j=0 13 13 case "$4" in 14 #________________________________________________________________________________________________________________________________________________________________________________________ 15 14 16 -all) 15 17 #Runs javaImageClassifier on ALL images 16 for file _name in $folder_name/*/*.png; do17 echo $file _name18 for file in $source/*/*.png; do 19 echo $file 18 20 echo $output 19 21 echo $i 20 22 echo "" 21 java -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar:. -Djava.library.path=/Scratch/cpb16/opencv-3.4.2/build/lib/ javaImageClassifier $file _name$classifier_type $output23 java -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar:. -Djava.library.path=/Scratch/cpb16/opencv-3.4.2/build/lib/ javaImageClassifier $file $classifier_type $output 22 24 i=$[$i+1] 23 25 done 24 26 ;; 27 #________________________________________________________________________________________________________________________________________________________________________________________ 25 28 26 29 -allNew) 27 for file _name in $folder_name/*/*.png; do28 echo $file _name30 for file in $source/*/*.png; do 31 echo $file 29 32 echo $output 30 echo $i33 #echo $i 31 34 echo "" 32 java -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar:. -Djava.library.path=/Scratch/cpb16/opencv-3.4.2/build/lib/ javaClassifierComparison $file_name $classifier_type $output 35 36 java -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar:. -Djava.library.path=/Scratch/cpb16/opencv-3.4.2/build/lib/ javaClassifierComparison $file $classifier_type $output 33 37 i=$[$i+1] 34 38 done 35 39 ;; 36 40 #________________________________________________________________________________________________________________________________________________________________________________________ 41 37 42 -test) 38 43 #Runs javaImageClassifier on 100 images of each 39 for file _name in $folder_name/SheetMusic/*.png; do44 for file in $source/SheetMusic/*.png; do 40 45 if [ $i -lt 10 ] ; then 41 echo $file _name46 echo $file 42 47 echo $output 43 48 echo $i 44 49 echo "" 45 java -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar:. -Djava.library.path=/Scratch/cpb16/opencv-3.4.2/build/lib/ javaImageClassifier $file _name$classifier_type $output50 java -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar:. -Djava.library.path=/Scratch/cpb16/opencv-3.4.2/build/lib/ javaImageClassifier $file $classifier_type $output 46 51 i=$[$i+1] 47 52 fi 48 53 done 49 for file _name in $folder_name/NotSheetMusic/*.png; do54 for file in $source/NotSheetMusic/*.png; do 50 55 if [ $j -lt 10 ] ; then 51 echo $file _name56 echo $file 52 57 echo $output 53 58 echo $j 54 59 echo "" 55 java -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar:. -Djava.library.path=/Scratch/cpb16/opencv-3.4.2/build/lib/ javaImageClassifier $file _name$classifier_type $output60 java -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar:. -Djava.library.path=/Scratch/cpb16/opencv-3.4.2/build/lib/ javaImageClassifier $file $classifier_type $output 56 61 j=$[$j+1] 57 62 fi 58 63 done 59 ;; 64 ;; 65 #________________________________________________________________________________________________________________________________________________________________________________________ 66 67 -testNew) 68 javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar -Xlint javaClassifierComparison.java; 69 #Runs javaImageClassifier on 10 images of each 70 for file in $source/SheetMusic/*.png; do 71 if [ $i -lt 10 ] ; then 72 echo $file 73 echo $output 74 echo $i 75 echo "" 76 java -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar:. -Djava.library.path=/Scratch/cpb16/opencv-3.4.2/build/lib/ javaClassifierComparison $file $classifier_type $output 77 i=$[$i+1] 78 fi 79 done 80 for file in $source/NotSheetMusic/*.png; do 81 if [ $j -lt 10 ] ; then 82 echo $file 83 echo $output 84 echo $j 85 echo "" 86 java -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar:. -Djava.library.path=/Scratch/cpb16/opencv-3.4.2/build/lib/ javaClassifierComparison $file $classifier_type $output 87 j=$[$j+1] 88 fi 89 done 90 ;; 91 #________________________________________________________________________________________________________________________________________________________________________________________ 92 60 93 -single) 61 94 #Runs javaImagesClassifier on ONE image 62 95 javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaImageClassifier.java; 63 echo $ folder_name96 echo $source 64 97 echo $output 65 98 echo $classifier_type 66 java -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar:. -Djava.library.path=/Scratch/cpb16/opencv-3.4.2/build/lib/ javaImageClassifier $folder_name $classifier_type $output 67 ;; 99 java -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar:. -Djava.library.path=/Scratch/cpb16/opencv-3.4.2/build/lib/ javaImageClassifier $source $classifier_type $output 100 ;; 101 #________________________________________________________________________________________________________________________________________________________________________________________ 68 102 69 103 -singleNew) 70 104 #Runs javaImagesClassifier on ONE image 71 105 javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar -Xlint javaClassifierComparison.java; 72 echo $ file_name106 echo $source 73 107 echo $output 74 108 echo $classifier_type 75 java -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar:. -Djava.library.path=/Scratch/cpb16/opencv-3.4.2/build/lib/ javaClassifierComparison $ folder_name $classifier_type $output76 109 java -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar:. -Djava.library.path=/Scratch/cpb16/opencv-3.4.2/build/lib/ javaClassifierComparison $source $classifier_type $output 110 ;; 77 111 esac -
other-projects/is-sheet-music-encore/trunk/java-gen-corpus/download_metadata_temp.sh
r33044 r33437 11 11 output_cmp_file="compact_metadata_temp.xml" 12 12 echo "Retrieving metadata: $doc_id -> $output_file" 13 echo "" 13 echo "$" 14 #sleep 2 14 15 15 16 ../dapiclient2-extended-META.pl "$doc_id" > "$output_cmp_file" -
other-projects/is-sheet-music-encore/trunk/java-gen-corpus/gen-500-MU-hathiValidIDList.txt
r33375 r33437 1 dul1.ark:/13960/t4xh15j022 mdp.390150963557093 mdp.390150978533144 mdp.390150966965245 mdp.390150963792616 mdp.390150966528997 mdp.390150965758848 mdp.390150965593839 mdp.3901509781090010 mdp.3901509657132111 mdp.3901509785155712 mdp.3901509785380113 mdp.3901509781291414 mdp.3901509661185315 mdp.3901509670023516 mdp.3901509637880017 mdp.3901509664006818 mdp.3901509669002219 mdp.3901509634376220 mdp.3901508096194221 mdp.3901509783383722 nc01.ark:/13960/t50g5wb1m23 mdp.3901509669415624 nc01.ark:/13960/t4sj2t73t25 mdp.3901509669533626 nc01.ark:/13960/t6f19v52s27 mdp.3901509634666628 mdp.3901509656755029 mdp.3901509635492630 mdp.3901509780923331 mdp.3901509642483632 mdp.3901509785167233 mdp.3901509784853834 mdp.3901509637213435 mdp.3901509661186136 mdp.3901509661071537 mdp.3901509782605438 aeu.ark:/13960/t50g4rs6t39 mdp.3901509660527740 mdp.3901508094576241 mdp.3901509653959142 mdp.3901509782880343 mdp.3901509778323044 mdp.3901508096558845 mdp.3901509781004146 mdp.3901509644996547 mdp.3901509635670748 mdp.3901509637808149 nc01.ark:/13960/t5cc2n47550 mdp.3901509635220151 mdp.3901509641193252 mdp.3901509635522053 mdp.3901509778571454 mdp.3901509779498955 mdp.3901509658281556 nc01.ark:/13960/t48p7tq7n57 mdp.3901509634399458 mdp.3901508096406059 mdp.3901509778230760 mdp.3901509779742061 wau.3935202630356062 mdp.3901509635612963 mdp.3901509780641164 mdp.3901509784552665 nc01.ark:/13960/t6d22f88f66 nc01.ark:/13960/t3vt3f86n67 mdp.3901509645070868 mdp.3901509634537969 mdp.3901509641486070 mdp.3901509783120371 mdp.3901509783193072 mdp.3901509639520073 mdp.3901509645948574 mdp.3901509670199375 mdp.3901509656509176 mdp.3901509655601777 mdp.3901509655139878 mdp.3901509653988079 mdp.3901508093251380 mdp.3901509644974281 mdp.3901509637400782 nc01.ark:/13960/t06x1kg1483 mdp.3901509635607984 mdp.3901509655745285 mdp.3901509668998286 nc01.ark:/13960/t9087wj9z87 mdp.3901509779598688 mdp.3901508094733989 mdp.3901509658170090 miua.5399937.0001.00191 mdp.3901509652892592 mdp.3901509784323293 mdp.3901509783107094 mdp.3901509654838695 mdp.3901509660662296 mdp.3901508094709997 mdp.3901509783907398 mdp.3901509643107099 mdp.39015097784162100 mdp.39015097820545101 wau.39352027329804102 nc01.ark:/13960/t2x35vt55103 mdp.39015097809340104 mdp.39015096462844105 dul1.ark:/13960/t2x41569k106 mdp.39015097820495107 mdp.39015096373579108 nc01.ark:/13960/t9281zr6c109 wau.39352026655274110 coo.31924062612282111 mdp.39015096358240112 mdp.39015096541480113 mdp.39015096465953114 mdp.39015097793007115 mdp.39015096538957116 mdp.39015097840279117 mdp.39015096640589118 mdp.39015088980407119 mdp.39015096380566120 miua.1542298.0001.001121 miua.5256125.0002.001122 uma.ark:/13960/t8pc3vs56123 mdp.39015096535441124 mdp.39015080932125125 mdp.39015096381572126 mdp.39015097843844127 mdp.39015097796653128 mdp.39015096542207129 mdp.39015097809373130 aeu.ark:/13960/t1kh1qw26131 mdp.39015096472348132 mdp.39015096352276133 uiuo.ark:/13960/t7kp82m95134 nc01.ark:/13960/t78s6zb0g135 mdp.39015097808631136 nc01.ark:/13960/t1wd6jt79137 mdp.39015096429835138 mdp.39015097842929139 mdp.39015097814027140 mdp.39015097790607141 mdp.39015096698009142 mdp.39015097819794143 mdp.39015096550978144 mdp.39015093756677145 mdp.39015096529931146 mdp.39015096565588147 mdp.39015096406585148 mdp.39015096355923149 mdp.39015096639938150 mdp.39015097819919151 miua.1305273.0001.001152 mdp.39015080972238153 mdp.39015096534261154 nc01.ark:/13960/t0dv3bb97155 mdp.39015097837929156 mdp.39015097794005157 mdp.39015096533180158 nc01.ark:/13960/t5db8xq8t159 mdp.39015096562486160 mdp.39015096398279161 miua.5095954.0001.001162 nc01.ark:/13960/t7gq7zm51163 mdp.39015097785623164 mdp.39015097847274165 mdp.39015096348837166 mdp.39015096369445167 mdp.39015096548634168 mdp.39015096406551169 mdp.39015096547636170 mdp.39015096642684171 mdp.39015097831047172 mdp.39015096371797173 mdp.39015096456994174 nc01.ark:/13960/t38067v5w175 mdp.39015096445104176 mdp.39015096374569177 mdp.39015097857711178 mdp.39015097780798179 mdp.39015096580801180 mdp.39015096350676181 emu.010001066823182 mdp.39015096344109183 uiuo.ark:/13960/t1cj8g40m184 uiuo.ark:/13960/t6451wq4w185 mdp.39015096530848186 mdp.39015097831963187 mdp.39015096697050188 mdp.39015097848447189 mdp.39015096654259190 mdp.39015097854684191 mdp.39015096607653192 mdp.39015097835022193 mdp.39015096526002194 mdp.39015096560126195 mdp.39015096450682196 mdp.39015096456309197 mdp.39015097793189198 mdp.39015096548832199 mdp.39015096552214200 aeu.ark:/13960/t0dv28v9r201 mdp.39015096457851202 nc01.ark:/13960/t81k0np8v203 mdp.39015097787785204 mdp.39015096703452205 bc.ark:/13960/t8md3j87f206 mdp.39015096559862207 uiuo.ark:/13960/t20d2f44b208 mdp.39015096565828209 mdp.39015097839750210 mdp.39015080942090211 mdp.39015096401792212 mdp.39015096572303213 ucbk.ark:/28722/h27b48214 mdp.39015096455848215 mdp.39015097820792216 mdp.39015097822764217 mou.010103825522218 mdp.39015097824935219 mdp.39015096580041220 mdp.39015096437119221 mdp.39015096475648222 mdp.39015096363802223 mdp.39015096527778224 mdp.39015080945804225 mdp.39015097838455226 mdp.39015096582823227 mdp.39015097817228228 mdp.39015097834900229 nc01.ark:/13960/t6g17sw99230 mdp.39015096667665231 mdp.39015096530822232 nc01.ark:/13960/t8bg3kj08233 mdp.39015080921482234 nc01.ark:/13960/t0gt71681235 mdp.39015097845013236 mdp.39015097784543237 nc01.ark:/13960/t6xw5cd8g238 mdp.39015080947537239 mdp.39015080941894240 uiuo.ark:/13960/t3wt52q8z241 nc01.ark:/13960/t1fj39k41242 mdp.39015097806015243 mdp.39015097840618244 mdp.39015096537181245 mdp.39015096371912246 mdp.39015080921458247 mdp.39015088981066248 mdp.39015080947032249 mdp.39015096454163250 mdp.39015096534345251 nc01.ark:/13960/t6m05694c252 mdp.39015080942108253 mdp.39015096666972254 miua.3905855.0001.001255 mdp.39015096575488256 mdp.39015096454304257 mdp.39015096544385258 nc01.ark:/13960/t96703b08259 mdp.39015096365930260 mdp.39015097817194261 mdp.39015096574523262 mdp.39015096381275263 mdp.39015093764010264 mdp.39015096584134265 mdp.39015080940805266 mdp.39015088985158267 mdp.39015096406304268 mdp.39015096563732269 mdp.39015096531978270 nc01.ark:/13960/t50g5g180271 nc01.ark:/13960/t2r50pf9b272 nc01.ark:/13960/t81k09h51273 nc01.ark:/13960/t4fn1xq0f274 mdp.39015096538445275 nc01.ark:/13960/t6xw6w20q276 mdp.39015096530673277 mdp.39015096696482278 mdp.39015096615979279 mdp.39015096552230280 mdp.39015096466274281 mdp.39015096363950282 mdp.39015097828902283 mdp.39015097843711284 miua.5399934.0001.001285 mdp.39015096543866286 mdp.39015096582799287 mdp.69015000002812288 mdp.39015096653046289 mdp.39015096434041290 mdp.39015097857158291 mdp.39015096450195292 mdp.39015096566214293 mdp.39015096443935294 mdp.39015096546265295 mdp.39015096563724296 mdp.39015096574010297 mdp.39015080963765298 mdp.39015097836376299 mdp.39015096701597300 mdp.39015080933115301 nc01.ark:/13960/t8sb52z77302 mdp.39015070661817303 mdp.39015096639953304 mdp.39015080969580305 nc01.ark:/13960/t14n0tc92306 mdp.39015096546687307 mdp.39015097821972308 uiuo.ark:/13960/t9p32390j309 mdp.39015097837838310 mdp.39015096545861311 mdp.39015097803434312 mdp.39015080933198313 mdp.39015096458438314 mdp.39015097820453315 mdp.39015080947883316 nc01.ark:/13960/t8rb82131317 mdp.39015096581981318 mdp.39015080933040319 mdp.39015096641744320 mdp.39015096349256321 dul1.ark:/13960/t3wt0b675322 mdp.39015096548741323 mdp.39015096688729324 mdp.39015097814613325 mdp.39015096445658326 nc01.ark:/13960/t5z61hv0q327 mdp.39015096694719328 mdp.39015096355857329 nc01.ark:/13960/t8gf3f09p330 mdp.39015096377752331 mdp.39015097806619332 mdp.39015097787843333 mdp.39015096368868334 mdp.39015097810686335 mdp.39015096343614336 mdp.39015007864112337 miua.5253957.0001.001338 mdp.39015097783750339 mdp.39015088980480340 miun.anf5594.0001.001341 mdp.39015080937348342 mdp.39015096641298343 mdp.39015096379345344 nc01.ark:/13960/t0sq9qq15345 mdp.39015096567295346 mdp.39015096349462347 mdp.39015097843257348 mdp.39015096578755349 mdp.39015096688265350 nc01.ark:/13960/t54f2pk4g351 mdp.39015096699619352 mdp.39015096452886353 mdp.39015080968848354 mdp.39015096523868355 nc01.ark:/13960/t6rz0m12s356 nc01.ark:/13960/t6wx00z87357 nc01.ark:/13960/t1pg4b252358 mdp.39015096607786359 mdp.39015097789732360 mdp.39015097828308361 mdp.39015093759515362 mdp.39015096363661363 mdp.39015097845724364 nc01.ark:/13960/t15m8wz62365 mdp.39015096413789366 mdp.39015097817525367 mdp.39015096589976368 nc01.ark:/13960/t4wh4cb8j369 mdp.39015046309632370 miua.1546498.0007.001371 mdp.39015096578870372 mdp.39015096551091373 mdp.39015096551836374 mdp.39015097792967375 mdp.39015096559748376 nc01.ark:/13960/t9f50c665377 uiuo.ark:/13960/t73t9n59s378 emu.010000894638379 mdp.39015097841020380 mdp.39015096448215381 nc01.ark:/13960/t6k07vh89382 mdp.39015097786357383 mdp.39015096560662384 nc01.ark:/13960/t81k11k4h385 mdp.39015096460673386 mdp.39015096527257387 mdp.39015096567592388 uiuo.ark:/13960/t05x9ss78389 mdp.39015097837473390 mdp.39015096642403391 nc01.ark:/13960/t87h48t5b392 mdp.39015097814738393 mdp.39015080931515394 mdp.39015097833555395 mdp.39015096363182396 nc01.ark:/13960/t0dv2j38q397 mdp.39015096667806398 mdp.39015080947149399 nc01.ark:/13960/t24b44b2n400 mdp.39015096542389401 mdp.39015096456739402 mdp.39015096364958403 mdp.39015097810140404 mdp.39015097816907405 mdp.39015096532174406 mdp.39015096371730407 mdp.39015096566933408 mdp.39015096359784409 aeu.ark:/13960/t1wd51k25410 mdp.39015096558302411 mdp.39015097784592412 mdp.39015096403103413 mdp.39015096657237414 mdp.39015096417046415 mdp.39015096379451416 mdp.39015096548915417 mdp.39015096532810418 nc01.ark:/13960/t9m33ww2d419 mdp.39015096440196420 mdp.39015096639623421 mdp.39015096561058422 nc01.ark:/13960/t95741w8p423 mdp.39015088974814424 mdp.39015097840998425 mdp.39015097804622426 mdp.39015096666006427 mdp.39015096394765428 nc01.ark:/13960/t22c01q0k429 mdp.39015097803509430 mdp.39015097837374431 mdp.39015097857216432 mdp.39015096395952433 mdp.39015096526184434 mdp.39015096378917435 mdp.39015096466951436 nc01.ark:/13960/t1vd7qv10437 mdp.39015097821931438 mdp.39015097816808439 nc01.ark:/13960/t9961bz9j440 mdp.39015096703197441 mdp.39015096367761442 mdp.39015096539062443 nc01.ark:/13960/t6h14tf6m444 mdp.39015096569333445 mdp.39015080928198446 nc01.ark:/13960/t4gm8zg3s447 mdp.39015096700623448 mdp.39015096565034449 nc01.ark:/13960/t48p87856450 mdp.39015096550341451 aeu.ark:/13960/t57d42b9n452 mdp.39015096654077453 mdp.39015096568731454 mdp.39015096676088455 mdp.39015096557429456 mdp.39015096437283457 mdp.39015097813375458 mdp.39015096589281459 mdp.39015096695518460 mdp.39015080961694461 mdp.39015096640258462 mdp.39015080947776463 nc01.ark:/13960/t22c03h35464 mdp.39015097822335465 dul1.ark:/13960/t5s78dt3x466 mdp.39015096601805467 mdp.39015097814142468 mdp.39015096344778469 mdp.39015088985588470 nc01.ark:/13960/t35150n0x471 mdp.39015097784725472 mdp.39015097792553473 nc01.ark:/13960/t8qc1nw5m474 mdp.39015096538635475 mdp.39015096640183476 mdp.39015097857638477 uc1.31822016299554478 mdp.39015096540599479 uiuo.ark:/13960/t4cn75q7c480 mdp.39015096600278481 mdp.39015097837218482 nc01.ark:/13960/t6nz9st6k483 mdp.39015080946471484 nc01.ark:/13960/t4qj8c90j485 mdp.39015096625937486 nc01.ark:/13960/t2m62h91g487 miua.3905845.0001.001488 uiuc.2432788v1i2489 mdp.39015096466001490 mdp.39015096362648491 mdp.39015096374049492 nc01.ark:/13960/t50g69p7b493 mdp.39015096467116494 mdp.39015097853405495 mdp.39015097804416496 mdp.39015096559094497 mdp.39015096584118498 mdp.39015096548337499 mdp.39015096700490500 mdp.39015096458008 -
other-projects/is-sheet-music-encore/trunk/java-gen-corpus/javaGenFullIDList.java
r33047 r33437 45 45 item = line.split("\t", -1); 46 46 //Check items to be equal 47 if( item[1].equals("allow") && 48 item[2].equals("pd") && 49 item[19].equals(inputType) && 50 (item[24].equals("open")||item[24].equals("page"))){ 47 if( item[1].equals("allow") && //allow - end users can view the item 48 item[2].equals("pd") && //pd - public domain 49 item[19].equals(inputType) && //category defined by user (MU, SE,etc) 50 (item[24].equals("open")||item[24].equals("page"))){ //open - Items with this value do not have any download restrictions. 51 //page - Items with this value can be viewed on the HathiTrust website. Users can download individual pages but cannot download the full pdf, regardless of member affiliation. 51 52 //Encode id 52 53 String idEncoded = item[0]; -
other-projects/is-sheet-music-encore/trunk/java-gen-corpus/javaGenValidIDList.java
r33047 r33437 10 10 11 11 12 //Gets Textfile with all volumes with XX (MU for example) 13 //Checks if item has ten pages, and gets first ten pages. 14 //Writes list of IDs with more than ten pages. 12 15 public class javaGenValidIDList { 13 16 public static void main(String[] args) { 14 17 try{ 15 18 if (args.length != 3){ 16 System.out.println("Usage: TabRndListGen<inputFilename> <outputCount> <outputFilename>");19 System.out.println("Usage: javaGenValidIDList <inputFilename> <outputCount> <outputFilename>"); 17 20 } 18 21 else{
Note:
See TracChangeset
for help on using the changeset viewer.