Changeset 33437 for other-projects


Ignore:
Timestamp:
2019-08-26T16:44:52+12:00 (5 years ago)
Author:
cpb16
Message:

made progress with morphology. Need to have a better area dimension threshold setup

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
    15compile:
    26    cd java-gen-corpus; javac *.java;
    3 #*******
    4 
    57
    68download-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   
     11test-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
     16test-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   
     21test-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   
     27run-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
     36run-morph-single:
     37    cd image-identification-terminal; make testrun-classifier-single-morph
    1038#**********
    1139#HI-RES
     
    1644    ./COMPX520-DOWNLOADER-PNG-10PAGES-hi-res.sh java-gen-corpus/BK-500-reconstructed.txt BK
    1745    ./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
     47hi-res-download-map:
     48    ./FirstAndLastTest-DOWNLOADER-PNG.sh java-gen-corpus/gen-5000-Local-MapList.txt MP
    1949
    2050######################################
    2151#CAUTION: run must: source SETUP.bash
    22 #Prior to running the scripts below
     52#Prior to running the gen-* scripts
    2353######################################
    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
     54gen-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
    6260
    6361#***********
    6462#CLASSIFIERS
    65 #***********
     63#***********   
    6664run-cluster-single-test:
    6765    cd image-identification-terminal; make testrun-classifier-single-cluster
    68    
     66
    6967run-count-single-test:
    7068    cd image-identification-terminal; make testrun-classifier-single-count
    71    
     69
    7270run-cluster-corpus-hires:
    7371    #Compile
    7472    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 javaImageClassifier.java;
     73    cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaClassifierComparison.java;
    7674    #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 -allNew
    78     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
    79     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
    80     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
     75    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
    8179    #Calculate accuracy
    8280    cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-cluster-MU.txt cluster-MU log-all-hires-new/results.txt
     
    8684    #Display the results
    8785    cd image-identification-terminal; less log-all-hires-new/results.txt
    88    
     86
    8987run-count-corpus-hires:
    9088    #Compile
    9189    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 javaImageClassifier.java;
     90    cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaClassifierComparison.java;
    9391    #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 -allNew
    95     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
    96     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
    97     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
     92    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
    9896    #Calculate accuracy
    9997    cd image-identification-terminal; java javaAccuracyCalculator log-all-hires-new/log-count-MU.txt count-MU log-all-hires-new/results.txt
     
    103101    #Display the results
    104102    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
     105run-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#**************
    124138#OLDCLASSIFIERS
    125 #***********
     139#**************
    126140run-houghlinesP-refined-corpus:
    127141    #cd image-identification-terminal; cd log-all; rm *.txt
     
    159173        #Display the results
    160174    cd image-identification-terminal; less log-all-hires/results.txt   
     175   
     176#***********
     177#OLDGEN
     178#***********   
     179    #MUSIC, Including Sheet music
     180gen-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
     188gen-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)
     196gen-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
     204gen-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)
     212gen-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  
    152152    print $response->content;
    153153}
    154 exit $success;
     154unless ($success) {
     155    # indicate there was an error to the calling process
     156    exit 1;
     157}
    155158
    156159
  • other-projects/is-sheet-music-encore/trunk/dapiclient2-extended-hi-res.pl

    r33384 r33437  
    154154    print $response->content;
    155155}
    156 exit $success;
    157156
    158157
     158unless ($success) {
     159    # indicate there was an error to the calling process
     160    exit 1;
     161}
    159162
     163
  • other-projects/is-sheet-music-encore/trunk/dapiclient2-extended-size.pl

    r33384 r33437  
    154154    print $response->content;
    155155}
    156 exit $success;
     156unless ($success) {
     157    # indicate there was an error to the calling process
     158    exit 1;
     159}
    157160
    158161
  • other-projects/is-sheet-music-encore/trunk/dapiclient2-extended.pl

    r32952 r33437  
    152152    print $response->content;
    153153}
    154 exit $success;
     154unless ($success) {
     155    # indicate there was an error to the calling process
     156    exit 1;
     157}
    155158
    156159
  • other-projects/is-sheet-music-encore/trunk/image-identification-dev-02/.idea/workspace.xml

    r33418 r33437  
    1515        <entry file="file://$PROJECT_DIR$/image-identification-development/src/Main.java">
    1616          <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" />
    1919              <folding>
    2020                <element signature="imports" expanded="true" />
     
    4040        <entry file="file://$PROJECT_DIR$/image-identification-development/src/MainMorph.java">
    4141          <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" />
    4444              <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" />
    4778              </folding>
    4879            </state>
     
    6596        <option value="$PROJECT_DIR$/../image-identification-terminal/javaImageClassifier.java" />
    6697        <option value="$PROJECT_DIR$/../image-identification-terminal/javaClassifierComparison" />
     98        <option value="$PROJECT_DIR$/image-identification-development/src/Main.java" />
    6799        <option value="$PROJECT_DIR$/../image-identification-terminal/javaClassifierComparison.java" />
    68         <option value="$PROJECT_DIR$/image-identification-development/src/Main.java" />
    69100        <option value="$PROJECT_DIR$/image-identification-development/src/MainMorph.java" />
    70101      </list>
     
    87118      <foldersAlwaysOnTop value="true" />
    88119    </navigator>
    89     <panes />
     120    <panes>
     121      <pane id="ProjectPane" />
     122      <pane id="PackagesPane" />
     123      <pane id="Scope" />
     124    </panes>
    90125  </component>
    91126  <component name="PropertiesComponent">
     
    94129    <property name="project.structure.proportion" value="0.15" />
    95130    <property name="project.structure.side.proportion" value="0.2" />
     131    <property name="run.code.analysis.last.selected.profile" value="pProject Default" />
    96132    <property name="settings.editor.selected.configurable" value="preferences.lookFeel" />
    97133  </component>
     
    146182      <window_info anchor="bottom" id="Message" order="0" />
    147183      <window_info anchor="bottom" id="Find" order="1" />
    148       <window_info anchor="bottom" id="Run" order="2" weight="0.24610245" />
     184      <window_info anchor="bottom" id="Run" order="2" weight="0.2494432" />
    149185      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
    150186      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
     
    191227      </provider>
    192228    </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>
    210229    <entry file="file://$PROJECT_DIR$/image-identification-development/src/Main.java">
    211230      <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" />
    214233          <folding>
    215234            <element signature="imports" expanded="true" />
     
    231250      </provider>
    232251    </entry>
    233     <entry file="file://$PROJECT_DIR$/image-identification-development/src/MainMorph.java">
     252    <entry file="file://$PROJECT_DIR$/../image-identification-terminal/javaClassifierComparison.java">
    234253      <provider selected="true" editor-type-id="text-editor">
    235         <state relative-caret-position="347">
    236           <caret line="306" 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" />
    237256          <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" />
    240270          </folding>
    241271        </state>
    242272      </provider>
    243273    </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>
    244292  </component>
    245293  <component name="masterDetails">
  • other-projects/is-sheet-music-encore/trunk/image-identification-dev-02/image-identification-development/src/Main.java

    r33415 r33437  
    113113    static int MAXLINEGAP                   = 1;  //4
    114114    static double THRESHOLD_C               = 4;
    115     static double SLOPEGRADIENT             = 0.02;
     115    static double SLOPEGRADIENT             = 0.02; //0.02
    116116    static double CLUSTER_DISTANCE_MAX      = 40;
    117117    static double CLUSTER_DISTANCE_MIN      = 2;
     
    757757            //!!!!!!!!!!!!!!!!!!!!!!!!!!!NOTNOT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    758758            //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";
    759763            //String default_file = directory+"NotSheetMusic/coo.31924062612282-9.png";
    760764            //String default_file = directory+"NotSheetMusic/mdp.39015097852365-2.png";
    761765            //String default_file ="TestImages/NotNot/mdp.39015080972303-3.png";
    762766            //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";
    764768            //String default_file =hiresDirectory+"BK/NotSheetMusic/aeu.ark+=13960=t9z03w65z-4.png";
    765769
     
    856860            HighGui.resizeWindow("LINESFOUND", 1000,1000);
    857861           
    858             //HighGui.imshow("CLUSTERS FOUND", clustersFoundRGB);
     862            HighGui.imshow("CLUSTERSFOUND", clustersFoundRGB);
     863            HighGui.resizeWindow("CLUSTERSFOUND", 1000,1000);
    859864
    860865            //HighGui.imshow("Detected Lines (in red) - negative", edgesDetectedRGBProb);
     
    862867            System.out.println("LINE COUNT RESULT:   " +  ClassifierLineCount(horizontalLineCount) + '\t' +"LinesFound: " + horizontalLineCount); //COUNT OF LINES CLASSIFICATION
    863868            //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));
    865870            //System.out.println(ClassifierLineClusterPt(pointArrayList, clustersFoundRGB));
    866871
  • other-projects/is-sheet-music-encore/trunk/image-identification-dev-02/image-identification-development/src/MainMorph.java

    r33418 r33437  
    5959import org.opencv.core.*;
    6060import org.opencv.core.Point;
     61
    6162import org.opencv.highgui.HighGui;
    6263import org.opencv.imgcodecs.Imgcodecs;
    6364import org.opencv.imgproc.Imgproc;
     65import org.opencv.imgproc.Moments;
     66import org.opencv.osgi.OpenCVNativeLoader;
    6467import org.opencv.photo.Photo;
     68
     69import static org.opencv.core.CvType.CV_8UC3;
     70import static org.opencv.highgui.HighGui.imshow;
    6571import static org.opencv.imgcodecs.Imgcodecs.imwrite;
    6672import java.awt.image.BufferedImage;
     
    8591//https://stackoverflow.com/questions/37946482/crop-images-area-with-opencv-java
    8692//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
    8898
    8999
     
    107117    //GLOBAL_CONSTANTS
    108118
    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;
    111122
    112123    //
     
    163174
    164175    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        }
    169188    }
    170189    //MAIN
     
    177196
    178197            //Variables
    179             int codeVersion = 2;
     198            int codeVersion = 5;
    180199            Mat edgesDetected = new Mat();
    181200            Mat mid = new Mat();
    182201            Mat edgesDetectedRGB = new Mat();
    183202            Mat clustersFoundRGB = new Mat();
     203            String testDirectory = "/Scratch/cpb16/is-sheet-music-encore/image-identification-dev-02/image-identification-development/";
    184204            String directory = "/Scratch/cpb16/is-sheet-music-encore/download-images/MU/";
    185205            String hiresDirectory = "/Scratch/cpb16/is-sheet-music-encore/hires-download-images/";
     
    192212            //String default_file = directory+"NotSheetMusic/coo.31924062612282-9.png";
    193213            //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?
    195215            //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";
    197216            //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";
    198218
    199219            //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";
    205227            String filename = ((args.length > 0) ? args[0] : default_file);
    206228            File file = new File(filename);
     
    210232
    211233            // Load an image
    212             Mat original = Imgcodecs.imread(filename, Imgcodecs.IMREAD_GRAYSCALE);
    213             // Edge detection
     234            Mat original1 = Imgcodecs.imread(filename, Imgcodecs.IMREAD_GRAYSCALE);
     235            Mat original = original1.clone();
    214236           
    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);
    216238            //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);
    218240
    219241
     
    275297            //Successful hardcode for morhpology
    276298            if (codeVersion == 2) {
     299
     300                //MAKE SURE BLACK & WHITE
    277301                Mat test = original.clone();
    278                 showWaitDestroy("00 Original", test);
     302                showWaitDestroy("00 Binarized Original", test);
    279303
    280304                Mat kernelErode = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(100,1));
     
    282306                showWaitDestroy("01 Erode", test);
    283307
    284                 Mat kernelDialate = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(100,10));
     308                Mat kernelDialate = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(110,10));
    285309                Imgproc.dilate(test, test, kernelDialate);
    286310                showWaitDestroy("02 Dialate", test);
     
    290314                showWaitDestroy(" 03 Erode Again", test);
    291315
    292                 Mat kernelClose = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(50,30));
     316                Mat kernelClose = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(35,20));
    293317                Imgproc.morphologyEx(test,test,Imgproc.MORPH_CLOSE, kernelClose);
    294318                showWaitDestroy("04 Close", test);
    295319
    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);
    298322
    299323                Mat kernelOpen = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(4,4));
     
    364388                System.exit(0);
    365389            }
    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            }
    367524
    368525
     
    370527            //****************MORPHOLOGY****************************************************************************************
    371528
    372             BufferedImage toBeClassifiedImg = toBufferedImage(edgesDetectedRGB);
    373 
     529            //BufferedImage toBeClassifiedImg = toBufferedImage(edgesDetectedRGB);
    374530
    375531            //Display Results
     
    378534
    379535
    380             HighGui.imshow("LINESFOUND", edgesDetectedRGB);
     536            imshow("LINESFOUND", edgesDetectedRGB);
    381537            HighGui.resizeWindow("LINESFOUND", 1000,1000);
    382538           
  • other-projects/is-sheet-music-encore/trunk/image-identification-terminal/Makefile

    r33415 r33437  
    3434        #Display output
    3535    less logSingle.txt
     36   
     37testrun-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
    3645
    3746
  • other-projects/is-sheet-music-encore/trunk/image-identification-terminal/javaAccuracyCalculator.java

    r33340 r33437  
    4747                            truePositive++;
    4848                        }
    49                         else if(item[3].equals("false")){
     49                        else if(item[3].equals("false") || item[3].equals("null")){
    5050                            falseNegative++;
    5151                        }
     
    5959                            falsePositive++;
    6060                        }
    61                         else if(item[3].equals("false")){
     61                        else if(item[3].equals("false")|| item[3].equals("null")){
    6262                            trueNegative++;
    6363                        }
  • other-projects/is-sheet-music-encore/trunk/image-identification-terminal/javaClassifierComparison.java

    r33415 r33437  
    3434//False =classifierType + 0 + Filename + Status
    3535public class javaClassifierComparison {
     36
     37    //MAKE THIS A PROPERTIES FILE. THIS WILL BE SET AND CHECKED FROM OUTSIDE THE LOOP
    3638    //GLOBALS Constants
    3739    static int CLASSIFIER_HOUGHLINESP_MIN = 10;
     
    4143    static int MINLINECOUNT = 40;
    4244    static int MAXLINEGAP = 1;
    43     static double THRESHOLD_C               = 4;
     45    static double THRESHOLD_C = 4;
    4446    static double SLOPEGRADIENT = 0.02;
    4547    static double CLUSTER_DISTANCE_MAX = 40;
    4648    static double CLUSTER_DISTANCE_MIN = 2;
     49    //MORPHOLOGY
     50    static double THRESHOLD_AREA_SIZE  = 1000;
     51    static double THRESHOLD_AREA_COUNT = 4;
    4752
    4853
     
    113118                System.out.println("Usage: imageClassifier <inputFilename> <classifierType> <outputFilename>");
    114119            } else {
    115                 Pair houghlinesPResult = new Pair();
     120                Pair algorithmResult = new Pair();
    116121
    117122                Boolean result = null;
     
    132137                    case "count":
    133138                        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');
    136141                        break;
    137142                    case "cluster":
    138143                        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');
    141150                        break;
    142151                    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');
    145154                        break;
    146155                    default:
     
    148157                        break;
    149158                }
    150 
    151159                bw.close();
    152160            }
     
    159167    //ALGORITHM FUNCTIONS
    160168    //******************
    161     private static Pair Algorithm_HoughLinesP(String filename, Boolean enableLineClusterDetection){
     169    private static Pair Algorithm_HoughLinesP_Single(String filename, Boolean enableLineClusterDetection){
    162170        System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
    163171        Boolean isSheetMusic = null;
     
    170178            Mat edgesExtra = new Mat();
    171179            Mat edgesDetectedRGBProb;
    172             ArrayList<StartAndEndPoint> pointArrayList = new ArrayList<>();
     180            ArrayList<StartAndEndPoint> pointArrayList = new ArrayList<StartAndEndPoint>();
    173181
    174182            //****************EXPLANATION**************************************************
     
    204212                returnVariables.setBoolean(isSheetMusic);
    205213                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);
    206320            }
    207321        }
  • other-projects/is-sheet-music-encore/trunk/image-identification-terminal/runClassifer.sh

    r33415 r33437  
    22
    33if [ $# != 4 ] ; then
    4   echo "Usage: ./testClassifier.sh folder/file_name classifier_type output_filename  type(-a:all -test:100 -single:1)" 1>&2
     4  echo "Usage: ./testClassifier.sh folder/file classifier_type output_filename  type(-a:all -test:100 -single:1)" 1>&2
    55  exit 1
    66fi
    77
    8 folder_name=$1
     8source=$1
    99classifier_type=$2
    1010output=$3
     
    1212j=0
    1313case "$4" in
     14#________________________________________________________________________________________________________________________________________________________________________________________
     15
    1416    -all)
    1517        #Runs javaImageClassifier on ALL images
    16         for file_name in $folder_name/*/*.png; do
    17             echo $file_name
     18        for file in $source/*/*.png; do
     19            echo $file
    1820            echo $output
    1921            echo $i
    2022            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 $output
     23            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
    2224            i=$[$i+1]
    2325        done
    2426        ;;
     27#________________________________________________________________________________________________________________________________________________________________________________________
    2528   
    2629    -allNew)
    27         for file_name in $folder_name/*/*.png; do
    28         echo $file_name
     30        for file in $source/*/*.png; do
     31        echo $file
    2932        echo $output
    30         echo $i
     33        #echo $i
    3134        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
    3337        i=$[$i+1]
    3438        done
    3539        ;;
    36        
     40#________________________________________________________________________________________________________________________________________________________________________________________
     41
    3742    -test)
    3843        #Runs javaImageClassifier on 100 images of each
    39         for file_name in $folder_name/SheetMusic/*.png; do
     44        for file in $source/SheetMusic/*.png; do
    4045            if [ $i -lt 10 ] ; then
    41                 echo $file_name
     46                echo $file
    4247                echo $output
    4348                echo $i
    4449                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 $output
     50                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
    4651                i=$[$i+1]       
    4752            fi
    4853        done
    49         for file_name in $folder_name/NotSheetMusic/*.png; do
     54        for file in $source/NotSheetMusic/*.png; do
    5055            if [ $j -lt 10 ] ; then
    51                 echo $file_name
     56                echo $file
    5257                echo $output
    5358                echo $j
    5459                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 $output
     60                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
    5661                j=$[$j+1]       
    5762            fi
    5863        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   
    6093    -single)
    6194        #Runs javaImagesClassifier on ONE image
    6295        javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaImageClassifier.java;
    63         echo $folder_name
     96        echo $source
    6497        echo $output
    6598        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#________________________________________________________________________________________________________________________________________________________________________________________
    68102   
    69103    -singleNew)
    70104        #Runs javaImagesClassifier on ONE image
    71105        javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar -Xlint javaClassifierComparison.java;
    72         echo $file_name
     106        echo $source
    73107        echo $output
    74108        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 $output
    76            
     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        ;; 
    77111esac       
  • other-projects/is-sheet-music-encore/trunk/java-gen-corpus/download_metadata_temp.sh

    r33044 r33437  
    1111output_cmp_file="compact_metadata_temp.xml"
    1212echo "Retrieving metadata: $doc_id -> $output_file"
    13 echo ""
     13echo "$"
     14#sleep 2
    1415
    1516../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/t4xh15j02
    2 mdp.39015096355709
    3 mdp.39015097853314
    4 mdp.39015096696524
    5 mdp.39015096379261
    6 mdp.39015096652899
    7 mdp.39015096575884
    8 mdp.39015096559383
    9 mdp.39015097810900
    10 mdp.39015096571321
    11 mdp.39015097851557
    12 mdp.39015097853801
    13 mdp.39015097812914
    14 mdp.39015096611853
    15 mdp.39015096700235
    16 mdp.39015096378800
    17 mdp.39015096640068
    18 mdp.39015096690022
    19 mdp.39015096343762
    20 mdp.39015080961942
    21 mdp.39015097833837
    22 nc01.ark:/13960/t50g5wb1m
    23 mdp.39015096694156
    24 nc01.ark:/13960/t4sj2t73t
    25 mdp.39015096695336
    26 nc01.ark:/13960/t6f19v52s
    27 mdp.39015096346666
    28 mdp.39015096567550
    29 mdp.39015096354926
    30 mdp.39015097809233
    31 mdp.39015096424836
    32 mdp.39015097851672
    33 mdp.39015097848538
    34 mdp.39015096372134
    35 mdp.39015096611861
    36 mdp.39015096610715
    37 mdp.39015097826054
    38 aeu.ark:/13960/t50g4rs6t
    39 mdp.39015096605277
    40 mdp.39015080945762
    41 mdp.39015096539591
    42 mdp.39015097828803
    43 mdp.39015097783230
    44 mdp.39015080965588
    45 mdp.39015097810041
    46 mdp.39015096449965
    47 mdp.39015096356707
    48 mdp.39015096378081
    49 nc01.ark:/13960/t5cc2n475
    50 mdp.39015096352201
    51 mdp.39015096411932
    52 mdp.39015096355220
    53 mdp.39015097785714
    54 mdp.39015097794989
    55 mdp.39015096582815
    56 nc01.ark:/13960/t48p7tq7n
    57 mdp.39015096343994
    58 mdp.39015080964060
    59 mdp.39015097782307
    60 mdp.39015097797420
    61 wau.39352026303560
    62 mdp.39015096356129
    63 mdp.39015097806411
    64 mdp.39015097845526
    65 nc01.ark:/13960/t6d22f88f
    66 nc01.ark:/13960/t3vt3f86n
    67 mdp.39015096450708
    68 mdp.39015096345379
    69 mdp.39015096414860
    70 mdp.39015097831203
    71 mdp.39015097831930
    72 mdp.39015096395200
    73 mdp.39015096459485
    74 mdp.39015096701993
    75 mdp.39015096565091
    76 mdp.39015096556017
    77 mdp.39015096551398
    78 mdp.39015096539880
    79 mdp.39015080932513
    80 mdp.39015096449742
    81 mdp.39015096374007
    82 nc01.ark:/13960/t06x1kg14
    83 mdp.39015096356079
    84 mdp.39015096557452
    85 mdp.39015096689982
    86 nc01.ark:/13960/t9087wj9z
    87 mdp.39015097795986
    88 mdp.39015080947339
    89 mdp.39015096581700
    90 miua.5399937.0001.001
    91 mdp.39015096528925
    92 mdp.39015097843232
    93 mdp.39015097831070
    94 mdp.39015096548386
    95 mdp.39015096606622
    96 mdp.39015080947099
    97 mdp.39015097839073
    98 mdp.39015096431070
    99 mdp.39015097784162
    100 mdp.39015097820545
    101 wau.39352027329804
    102 nc01.ark:/13960/t2x35vt55
    103 mdp.39015097809340
    104 mdp.39015096462844
    105 dul1.ark:/13960/t2x41569k
    106 mdp.39015097820495
    107 mdp.39015096373579
    108 nc01.ark:/13960/t9281zr6c
    109 wau.39352026655274
    110 coo.31924062612282
    111 mdp.39015096358240
    112 mdp.39015096541480
    113 mdp.39015096465953
    114 mdp.39015097793007
    115 mdp.39015096538957
    116 mdp.39015097840279
    117 mdp.39015096640589
    118 mdp.39015088980407
    119 mdp.39015096380566
    120 miua.1542298.0001.001
    121 miua.5256125.0002.001
    122 uma.ark:/13960/t8pc3vs56
    123 mdp.39015096535441
    124 mdp.39015080932125
    125 mdp.39015096381572
    126 mdp.39015097843844
    127 mdp.39015097796653
    128 mdp.39015096542207
    129 mdp.39015097809373
    130 aeu.ark:/13960/t1kh1qw26
    131 mdp.39015096472348
    132 mdp.39015096352276
    133 uiuo.ark:/13960/t7kp82m95
    134 nc01.ark:/13960/t78s6zb0g
    135 mdp.39015097808631
    136 nc01.ark:/13960/t1wd6jt79
    137 mdp.39015096429835
    138 mdp.39015097842929
    139 mdp.39015097814027
    140 mdp.39015097790607
    141 mdp.39015096698009
    142 mdp.39015097819794
    143 mdp.39015096550978
    144 mdp.39015093756677
    145 mdp.39015096529931
    146 mdp.39015096565588
    147 mdp.39015096406585
    148 mdp.39015096355923
    149 mdp.39015096639938
    150 mdp.39015097819919
    151 miua.1305273.0001.001
    152 mdp.39015080972238
    153 mdp.39015096534261
    154 nc01.ark:/13960/t0dv3bb97
    155 mdp.39015097837929
    156 mdp.39015097794005
    157 mdp.39015096533180
    158 nc01.ark:/13960/t5db8xq8t
    159 mdp.39015096562486
    160 mdp.39015096398279
    161 miua.5095954.0001.001
    162 nc01.ark:/13960/t7gq7zm51
    163 mdp.39015097785623
    164 mdp.39015097847274
    165 mdp.39015096348837
    166 mdp.39015096369445
    167 mdp.39015096548634
    168 mdp.39015096406551
    169 mdp.39015096547636
    170 mdp.39015096642684
    171 mdp.39015097831047
    172 mdp.39015096371797
    173 mdp.39015096456994
    174 nc01.ark:/13960/t38067v5w
    175 mdp.39015096445104
    176 mdp.39015096374569
    177 mdp.39015097857711
    178 mdp.39015097780798
    179 mdp.39015096580801
    180 mdp.39015096350676
    181 emu.010001066823
    182 mdp.39015096344109
    183 uiuo.ark:/13960/t1cj8g40m
    184 uiuo.ark:/13960/t6451wq4w
    185 mdp.39015096530848
    186 mdp.39015097831963
    187 mdp.39015096697050
    188 mdp.39015097848447
    189 mdp.39015096654259
    190 mdp.39015097854684
    191 mdp.39015096607653
    192 mdp.39015097835022
    193 mdp.39015096526002
    194 mdp.39015096560126
    195 mdp.39015096450682
    196 mdp.39015096456309
    197 mdp.39015097793189
    198 mdp.39015096548832
    199 mdp.39015096552214
    200 aeu.ark:/13960/t0dv28v9r
    201 mdp.39015096457851
    202 nc01.ark:/13960/t81k0np8v
    203 mdp.39015097787785
    204 mdp.39015096703452
    205 bc.ark:/13960/t8md3j87f
    206 mdp.39015096559862
    207 uiuo.ark:/13960/t20d2f44b
    208 mdp.39015096565828
    209 mdp.39015097839750
    210 mdp.39015080942090
    211 mdp.39015096401792
    212 mdp.39015096572303
    213 ucbk.ark:/28722/h27b48
    214 mdp.39015096455848
    215 mdp.39015097820792
    216 mdp.39015097822764
    217 mou.010103825522
    218 mdp.39015097824935
    219 mdp.39015096580041
    220 mdp.39015096437119
    221 mdp.39015096475648
    222 mdp.39015096363802
    223 mdp.39015096527778
    224 mdp.39015080945804
    225 mdp.39015097838455
    226 mdp.39015096582823
    227 mdp.39015097817228
    228 mdp.39015097834900
    229 nc01.ark:/13960/t6g17sw99
    230 mdp.39015096667665
    231 mdp.39015096530822
    232 nc01.ark:/13960/t8bg3kj08
    233 mdp.39015080921482
    234 nc01.ark:/13960/t0gt71681
    235 mdp.39015097845013
    236 mdp.39015097784543
    237 nc01.ark:/13960/t6xw5cd8g
    238 mdp.39015080947537
    239 mdp.39015080941894
    240 uiuo.ark:/13960/t3wt52q8z
    241 nc01.ark:/13960/t1fj39k41
    242 mdp.39015097806015
    243 mdp.39015097840618
    244 mdp.39015096537181
    245 mdp.39015096371912
    246 mdp.39015080921458
    247 mdp.39015088981066
    248 mdp.39015080947032
    249 mdp.39015096454163
    250 mdp.39015096534345
    251 nc01.ark:/13960/t6m05694c
    252 mdp.39015080942108
    253 mdp.39015096666972
    254 miua.3905855.0001.001
    255 mdp.39015096575488
    256 mdp.39015096454304
    257 mdp.39015096544385
    258 nc01.ark:/13960/t96703b08
    259 mdp.39015096365930
    260 mdp.39015097817194
    261 mdp.39015096574523
    262 mdp.39015096381275
    263 mdp.39015093764010
    264 mdp.39015096584134
    265 mdp.39015080940805
    266 mdp.39015088985158
    267 mdp.39015096406304
    268 mdp.39015096563732
    269 mdp.39015096531978
    270 nc01.ark:/13960/t50g5g180
    271 nc01.ark:/13960/t2r50pf9b
    272 nc01.ark:/13960/t81k09h51
    273 nc01.ark:/13960/t4fn1xq0f
    274 mdp.39015096538445
    275 nc01.ark:/13960/t6xw6w20q
    276 mdp.39015096530673
    277 mdp.39015096696482
    278 mdp.39015096615979
    279 mdp.39015096552230
    280 mdp.39015096466274
    281 mdp.39015096363950
    282 mdp.39015097828902
    283 mdp.39015097843711
    284 miua.5399934.0001.001
    285 mdp.39015096543866
    286 mdp.39015096582799
    287 mdp.69015000002812
    288 mdp.39015096653046
    289 mdp.39015096434041
    290 mdp.39015097857158
    291 mdp.39015096450195
    292 mdp.39015096566214
    293 mdp.39015096443935
    294 mdp.39015096546265
    295 mdp.39015096563724
    296 mdp.39015096574010
    297 mdp.39015080963765
    298 mdp.39015097836376
    299 mdp.39015096701597
    300 mdp.39015080933115
    301 nc01.ark:/13960/t8sb52z77
    302 mdp.39015070661817
    303 mdp.39015096639953
    304 mdp.39015080969580
    305 nc01.ark:/13960/t14n0tc92
    306 mdp.39015096546687
    307 mdp.39015097821972
    308 uiuo.ark:/13960/t9p32390j
    309 mdp.39015097837838
    310 mdp.39015096545861
    311 mdp.39015097803434
    312 mdp.39015080933198
    313 mdp.39015096458438
    314 mdp.39015097820453
    315 mdp.39015080947883
    316 nc01.ark:/13960/t8rb82131
    317 mdp.39015096581981
    318 mdp.39015080933040
    319 mdp.39015096641744
    320 mdp.39015096349256
    321 dul1.ark:/13960/t3wt0b675
    322 mdp.39015096548741
    323 mdp.39015096688729
    324 mdp.39015097814613
    325 mdp.39015096445658
    326 nc01.ark:/13960/t5z61hv0q
    327 mdp.39015096694719
    328 mdp.39015096355857
    329 nc01.ark:/13960/t8gf3f09p
    330 mdp.39015096377752
    331 mdp.39015097806619
    332 mdp.39015097787843
    333 mdp.39015096368868
    334 mdp.39015097810686
    335 mdp.39015096343614
    336 mdp.39015007864112
    337 miua.5253957.0001.001
    338 mdp.39015097783750
    339 mdp.39015088980480
    340 miun.anf5594.0001.001
    341 mdp.39015080937348
    342 mdp.39015096641298
    343 mdp.39015096379345
    344 nc01.ark:/13960/t0sq9qq15
    345 mdp.39015096567295
    346 mdp.39015096349462
    347 mdp.39015097843257
    348 mdp.39015096578755
    349 mdp.39015096688265
    350 nc01.ark:/13960/t54f2pk4g
    351 mdp.39015096699619
    352 mdp.39015096452886
    353 mdp.39015080968848
    354 mdp.39015096523868
    355 nc01.ark:/13960/t6rz0m12s
    356 nc01.ark:/13960/t6wx00z87
    357 nc01.ark:/13960/t1pg4b252
    358 mdp.39015096607786
    359 mdp.39015097789732
    360 mdp.39015097828308
    361 mdp.39015093759515
    362 mdp.39015096363661
    363 mdp.39015097845724
    364 nc01.ark:/13960/t15m8wz62
    365 mdp.39015096413789
    366 mdp.39015097817525
    367 mdp.39015096589976
    368 nc01.ark:/13960/t4wh4cb8j
    369 mdp.39015046309632
    370 miua.1546498.0007.001
    371 mdp.39015096578870
    372 mdp.39015096551091
    373 mdp.39015096551836
    374 mdp.39015097792967
    375 mdp.39015096559748
    376 nc01.ark:/13960/t9f50c665
    377 uiuo.ark:/13960/t73t9n59s
    378 emu.010000894638
    379 mdp.39015097841020
    380 mdp.39015096448215
    381 nc01.ark:/13960/t6k07vh89
    382 mdp.39015097786357
    383 mdp.39015096560662
    384 nc01.ark:/13960/t81k11k4h
    385 mdp.39015096460673
    386 mdp.39015096527257
    387 mdp.39015096567592
    388 uiuo.ark:/13960/t05x9ss78
    389 mdp.39015097837473
    390 mdp.39015096642403
    391 nc01.ark:/13960/t87h48t5b
    392 mdp.39015097814738
    393 mdp.39015080931515
    394 mdp.39015097833555
    395 mdp.39015096363182
    396 nc01.ark:/13960/t0dv2j38q
    397 mdp.39015096667806
    398 mdp.39015080947149
    399 nc01.ark:/13960/t24b44b2n
    400 mdp.39015096542389
    401 mdp.39015096456739
    402 mdp.39015096364958
    403 mdp.39015097810140
    404 mdp.39015097816907
    405 mdp.39015096532174
    406 mdp.39015096371730
    407 mdp.39015096566933
    408 mdp.39015096359784
    409 aeu.ark:/13960/t1wd51k25
    410 mdp.39015096558302
    411 mdp.39015097784592
    412 mdp.39015096403103
    413 mdp.39015096657237
    414 mdp.39015096417046
    415 mdp.39015096379451
    416 mdp.39015096548915
    417 mdp.39015096532810
    418 nc01.ark:/13960/t9m33ww2d
    419 mdp.39015096440196
    420 mdp.39015096639623
    421 mdp.39015096561058
    422 nc01.ark:/13960/t95741w8p
    423 mdp.39015088974814
    424 mdp.39015097840998
    425 mdp.39015097804622
    426 mdp.39015096666006
    427 mdp.39015096394765
    428 nc01.ark:/13960/t22c01q0k
    429 mdp.39015097803509
    430 mdp.39015097837374
    431 mdp.39015097857216
    432 mdp.39015096395952
    433 mdp.39015096526184
    434 mdp.39015096378917
    435 mdp.39015096466951
    436 nc01.ark:/13960/t1vd7qv10
    437 mdp.39015097821931
    438 mdp.39015097816808
    439 nc01.ark:/13960/t9961bz9j
    440 mdp.39015096703197
    441 mdp.39015096367761
    442 mdp.39015096539062
    443 nc01.ark:/13960/t6h14tf6m
    444 mdp.39015096569333
    445 mdp.39015080928198
    446 nc01.ark:/13960/t4gm8zg3s
    447 mdp.39015096700623
    448 mdp.39015096565034
    449 nc01.ark:/13960/t48p87856
    450 mdp.39015096550341
    451 aeu.ark:/13960/t57d42b9n
    452 mdp.39015096654077
    453 mdp.39015096568731
    454 mdp.39015096676088
    455 mdp.39015096557429
    456 mdp.39015096437283
    457 mdp.39015097813375
    458 mdp.39015096589281
    459 mdp.39015096695518
    460 mdp.39015080961694
    461 mdp.39015096640258
    462 mdp.39015080947776
    463 nc01.ark:/13960/t22c03h35
    464 mdp.39015097822335
    465 dul1.ark:/13960/t5s78dt3x
    466 mdp.39015096601805
    467 mdp.39015097814142
    468 mdp.39015096344778
    469 mdp.39015088985588
    470 nc01.ark:/13960/t35150n0x
    471 mdp.39015097784725
    472 mdp.39015097792553
    473 nc01.ark:/13960/t8qc1nw5m
    474 mdp.39015096538635
    475 mdp.39015096640183
    476 mdp.39015097857638
    477 uc1.31822016299554
    478 mdp.39015096540599
    479 uiuo.ark:/13960/t4cn75q7c
    480 mdp.39015096600278
    481 mdp.39015097837218
    482 nc01.ark:/13960/t6nz9st6k
    483 mdp.39015080946471
    484 nc01.ark:/13960/t4qj8c90j
    485 mdp.39015096625937
    486 nc01.ark:/13960/t2m62h91g
    487 miua.3905845.0001.001
    488 uiuc.2432788v1i2
    489 mdp.39015096466001
    490 mdp.39015096362648
    491 mdp.39015096374049
    492 nc01.ark:/13960/t50g69p7b
    493 mdp.39015096467116
    494 mdp.39015097853405
    495 mdp.39015097804416
    496 mdp.39015096559094
    497 mdp.39015096584118
    498 mdp.39015096548337
    499 mdp.39015096700490
    500 mdp.39015096458008
  • other-projects/is-sheet-music-encore/trunk/java-gen-corpus/javaGenFullIDList.java

    r33047 r33437  
    4545                    item = line.split("\t", -1);
    4646                    //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.
    5152                        //Encode id
    5253                        String idEncoded = item[0];
  • other-projects/is-sheet-music-encore/trunk/java-gen-corpus/javaGenValidIDList.java

    r33047 r33437  
    1010
    1111
     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.
    1215public class javaGenValidIDList {
    1316    public static void main(String[] args) {
    1417    try{
    1518        if (args.length != 3){
    16         System.out.println("Usage: TabRndListGen <inputFilename> <outputCount> <outputFilename>");
     19        System.out.println("Usage: javaGenValidIDList <inputFilename> <outputCount> <outputFilename>");
    1720        }
    1821        else{
Note: See TracChangeset for help on using the changeset viewer.