Changeset 33304
- Timestamp:
- 2019-07-06T15:45:02+12:00 (5 years ago)
- Location:
- other-projects/is-sheet-music-encore/trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/is-sheet-music-encore/trunk/Makefile
r33243 r33304 125 125 cd image-identification-terminal; less results.txt 126 126 127 run- all:127 run-both-MU: 128 128 #Compile 129 129 cd image-identification-terminal; javac javaAccuracyCalculator.java … … 147 147 cd image-identification-terminal; less log-houghlinesP-refined-MU.txt 148 148 149 run-houghlineP-refined-corpus: 150 cd image-identification-terminal; cd log-all; rm *.txt 151 #Compile 152 cd image-identification-terminal; javac javaAccuracyCalculator.java 153 cd image-identification-terminal; javac -cp /Scratch/cpb16/opencv-3.4.2/build/bin/opencv-342.jar javaImageClassifier.java; 154 #Run javaImageClassifier on all images in Corpus 155 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/download-images/MU houghlinesP-refined log-all/log-houghlinesP-refined-MU.txt -all 156 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/download-images/BK houghlinesP-refined log-all/log-houghlinesP-refined-BK.txt -all 157 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/download-images/MP houghlinesP-refined log-all/log-houghlinesP-refined-MP.txt -all 158 cd image-identification-terminal; ./runClassifer.sh /Scratch/cpb16/is-sheet-music-encore/download-images/SE houghlinesP-refined log-all/log-houghlinesP-refined-SE.txt -all 159 #Calculate the Accuracy of the classifier 160 cd image-identification-terminal; java javaAccuracyCalculator log-all/log-houghlinesP-refined-MU.txt houghlinesP-refined-MU log-all/results.txt 161 cd image-identification-terminal; java javaAccuracyCalculator log-all/log-houghlinesP-refined-BK.txt houghlinesP-refined-BK log-all/results.txt 162 cd image-identification-terminal; java javaAccuracyCalculator log-all/log-houghlinesP-refined-MP.txt houghlinesP-refined-MP log-all/results.txt 163 cd image-identification-terminal; java javaAccuracyCalculator log-all/log-houghlinesP-refined-SE.txt houghlinesP-refined-SE log-all/results.txt 164 #Display the results 165 cd image-identification-terminal; less log-all/results.txt 166 -
other-projects/is-sheet-music-encore/trunk/image-identification-development/.idea/workspace.xml
r33243 r33304 20 20 <entry file="file://$PROJECT_DIR$/src/Main.java"> 21 21 <provider selected="true" editor-type-id="text-editor"> 22 <state relative-caret-position=" -810">23 <caret line=" 126" column="37" lean-forward="true" selection-start-line="126" selection-start-column="37" selection-end-line="126" selection-end-column="37" />22 <state relative-caret-position="801"> 23 <caret line="326" selection-start-line="326" selection-end-line="326" /> 24 24 <folding> 25 25 <element signature="imports" expanded="true" /> 26 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 27 <element signature="method#removeDuplicates#0;class#Main#0" /> 28 <element signature="method#StandardDeviation#0;class#Main#0" /> 29 <element signature="method#toBufferedImage#0;class#Main#0" /> 30 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 31 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 32 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 33 <element signature="e#7430#7439#0" expanded="true" /> 26 34 </folding> 27 35 </state> … … 34 42 <findStrings> 35 43 <find>aeu.ark+=13960=t93787r1w-10.png</find> 44 <find>returnArray</find> 36 45 </findStrings> 37 46 </component> … … 44 53 </component> 45 54 <component name="ProjectFrameBounds" extendedState="6"> 46 <option name="x" value=" 992" />55 <option name="x" value="65" /> 47 56 <option name="y" value="24" /> 48 57 <option name="width" value="928" /> … … 133 142 <component name="ToolWindowManager"> 134 143 <frame x="65" y="24" width="1855" height="1056" extended-state="6" /> 135 <editor active="true" />136 144 <layout> 137 145 <window_info anchor="right" id="Palette" order="4" /> 138 146 <window_info anchor="bottom" id="TODO" order="10" /> 139 <window_info anchor="bottom" id="Messages" order="3" weight="0.32842106" />140 147 <window_info anchor="right" id="Palette	" order="1" /> 141 148 <window_info id="Image Layers" order="4" /> … … 143 150 <window_info anchor="bottom" id="Event Log" order="1" side_tool="true" /> 144 151 <window_info anchor="right" id="Maven Projects" order="3" /> 145 <window_info active="true" anchor="bottom" id="Run" order="6" visible="true" weight="0.21881391" />146 152 <window_info anchor="bottom" id="Version Control" order="2" /> 153 <window_info anchor="bottom" id="Run" order="6" weight="0.22392638" /> 147 154 <window_info anchor="bottom" id="Terminal" order="0" weight="0.42638037" /> 148 155 <window_info id="Capture Tool" order="2" /> … … 153 160 <window_info id="UI Designer" order="1" /> 154 161 <window_info anchor="right" id="Theme Preview" order="2" /> 162 <window_info id="Favorites" order="3" side_tool="true" /> 155 163 <window_info anchor="bottom" id="Debug" order="7" weight="0.39894736" /> 156 <window_info id="Favorites" order="3" side_tool="true" />157 164 <window_info anchor="right" content_ui="combo" id="Hierarchy" order="7" weight="0.25" /> 158 165 <window_info anchor="bottom" id="Inspection" order="9" weight="0.4" /> … … 162 169 <window_info anchor="bottom" id="Cvs" order="8" weight="0.25" /> 163 170 <window_info anchor="bottom" id="Find" order="5" weight="0.32924336" /> 171 <window_info anchor="bottom" id="Messages" order="3" weight="0.32822084" /> 164 172 </layout> 165 173 <layout-to-restore> … … 197 205 <component name="XDebuggerManager"> 198 206 <breakpoint-manager> 199 <option name="time" value=" 3" />207 <option name="time" value="4" /> 200 208 </breakpoint-manager> 201 209 </component> 202 210 <component name="editorHistoryManager"> 211 <entry file="file://$PROJECT_DIR$/src/Main.java"> 212 <provider selected="true" editor-type-id="text-editor"> 213 <state relative-caret-position="4770"> 214 <caret line="318" column="55" selection-start-line="318" selection-start-column="55" selection-end-line="318" selection-end-column="55" /> 215 <folding> 216 <element signature="imports" expanded="true" /> 217 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 218 <element signature="method#removeDuplicates#0;class#Main#0" /> 219 <element signature="method#StandardDeviation#0;class#Main#0" /> 220 <element signature="method#toBufferedImage#0;class#Main#0" /> 221 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 222 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 223 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 224 <element signature="e#7430#7439#0" expanded="true" /> 225 </folding> 226 </state> 227 </provider> 228 </entry> 229 <entry file="file://$PROJECT_DIR$/src/Main.java"> 230 <provider selected="true" editor-type-id="text-editor"> 231 <state relative-caret-position="3600"> 232 <caret line="240" selection-start-line="240" selection-end-line="240" /> 233 <folding> 234 <element signature="imports" expanded="true" /> 235 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 236 <element signature="method#removeDuplicates#0;class#Main#0" /> 237 <element signature="method#StandardDeviation#0;class#Main#0" /> 238 <element signature="method#toBufferedImage#0;class#Main#0" /> 239 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 240 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 241 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 242 <element signature="e#7430#7439#0" expanded="true" /> 243 </folding> 244 </state> 245 </provider> 246 </entry> 247 <entry file="file://$PROJECT_DIR$/src/Main.java"> 248 <provider selected="true" editor-type-id="text-editor"> 249 <state relative-caret-position="2730"> 250 <caret line="182" column="44" lean-forward="true" selection-start-line="182" selection-start-column="44" selection-end-line="182" selection-end-column="44" /> 251 <folding> 252 <element signature="imports" expanded="true" /> 253 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 254 <element signature="method#removeDuplicates#0;class#Main#0" /> 255 <element signature="method#StandardDeviation#0;class#Main#0" /> 256 <element signature="method#toBufferedImage#0;class#Main#0" /> 257 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 258 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 259 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 260 <element signature="e#7430#7439#0" expanded="true" /> 261 </folding> 262 </state> 263 </provider> 264 </entry> 265 <entry file="file://$PROJECT_DIR$/src/Main.java"> 266 <provider selected="true" editor-type-id="text-editor"> 267 <state relative-caret-position="2130"> 268 <caret line="142" column="30" selection-start-line="142" selection-start-column="30" selection-end-line="142" selection-end-column="30" /> 269 <folding> 270 <element signature="imports" expanded="true" /> 271 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 272 <element signature="method#removeDuplicates#0;class#Main#0" /> 273 <element signature="method#StandardDeviation#0;class#Main#0" /> 274 <element signature="method#toBufferedImage#0;class#Main#0" /> 275 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 276 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 277 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 278 <element signature="e#7430#7439#0" expanded="true" /> 279 </folding> 280 </state> 281 </provider> 282 </entry> 283 <entry file="file://$PROJECT_DIR$/src/Main.java"> 284 <provider selected="true" editor-type-id="text-editor"> 285 <state relative-caret-position="2025"> 286 <caret line="135" column="56" lean-forward="true" selection-start-line="135" selection-start-column="56" selection-end-line="135" selection-end-column="56" /> 287 <folding> 288 <element signature="imports" expanded="true" /> 289 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 290 <element signature="method#removeDuplicates#0;class#Main#0" /> 291 <element signature="method#StandardDeviation#0;class#Main#0" /> 292 <element signature="method#toBufferedImage#0;class#Main#0" /> 293 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 294 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 295 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 296 <element signature="e#7430#7439#0" expanded="true" /> 297 </folding> 298 </state> 299 </provider> 300 </entry> 301 <entry file="file://$PROJECT_DIR$/src/Main.java"> 302 <provider selected="true" editor-type-id="text-editor"> 303 <state relative-caret-position="1890"> 304 <caret line="126" column="37" lean-forward="true" selection-start-line="126" selection-start-column="37" selection-end-line="126" selection-end-column="37" /> 305 <folding> 306 <element signature="imports" expanded="true" /> 307 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 308 <element signature="method#removeDuplicates#0;class#Main#0" /> 309 <element signature="method#StandardDeviation#0;class#Main#0" /> 310 <element signature="method#toBufferedImage#0;class#Main#0" /> 311 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 312 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 313 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 314 <element signature="e#7430#7439#0" expanded="true" /> 315 </folding> 316 </state> 317 </provider> 318 </entry> 203 319 <entry file="file://$PROJECT_DIR$/src/Main.java"> 204 320 <provider selected="true" editor-type-id="text-editor"> … … 207 323 <folding> 208 324 <element signature="imports" expanded="true" /> 325 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 326 <element signature="method#removeDuplicates#0;class#Main#0" /> 327 <element signature="method#StandardDeviation#0;class#Main#0" /> 328 <element signature="method#toBufferedImage#0;class#Main#0" /> 329 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 330 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 331 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 332 <element signature="e#7430#7439#0" expanded="true" /> 209 333 </folding> 210 334 </state> … … 217 341 <folding> 218 342 <element signature="imports" expanded="true" /> 343 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 344 <element signature="method#removeDuplicates#0;class#Main#0" /> 345 <element signature="method#StandardDeviation#0;class#Main#0" /> 346 <element signature="method#toBufferedImage#0;class#Main#0" /> 347 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 348 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 349 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 350 <element signature="e#7430#7439#0" expanded="true" /> 219 351 </folding> 220 352 </state> … … 227 359 <folding> 228 360 <element signature="imports" expanded="true" /> 361 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 362 <element signature="method#removeDuplicates#0;class#Main#0" /> 363 <element signature="method#StandardDeviation#0;class#Main#0" /> 364 <element signature="method#toBufferedImage#0;class#Main#0" /> 365 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 366 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 367 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 368 <element signature="e#7430#7439#0" expanded="true" /> 229 369 </folding> 230 370 </state> … … 237 377 <folding> 238 378 <element signature="imports" expanded="true" /> 379 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 380 <element signature="method#removeDuplicates#0;class#Main#0" /> 381 <element signature="method#StandardDeviation#0;class#Main#0" /> 382 <element signature="method#toBufferedImage#0;class#Main#0" /> 383 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 384 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 385 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 386 <element signature="e#7430#7439#0" expanded="true" /> 239 387 </folding> 240 388 </state> … … 247 395 <folding> 248 396 <element signature="imports" expanded="true" /> 397 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 398 <element signature="method#removeDuplicates#0;class#Main#0" /> 399 <element signature="method#StandardDeviation#0;class#Main#0" /> 400 <element signature="method#toBufferedImage#0;class#Main#0" /> 401 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 402 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 403 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 404 <element signature="e#7430#7439#0" expanded="true" /> 249 405 </folding> 250 406 </state> … … 257 413 <folding> 258 414 <element signature="imports" expanded="true" /> 415 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 416 <element signature="method#removeDuplicates#0;class#Main#0" /> 417 <element signature="method#StandardDeviation#0;class#Main#0" /> 418 <element signature="method#toBufferedImage#0;class#Main#0" /> 419 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 420 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 421 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 422 <element signature="e#7430#7439#0" expanded="true" /> 259 423 </folding> 260 424 </state> … … 267 431 <folding> 268 432 <element signature="imports" expanded="true" /> 433 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 434 <element signature="method#removeDuplicates#0;class#Main#0" /> 435 <element signature="method#StandardDeviation#0;class#Main#0" /> 436 <element signature="method#toBufferedImage#0;class#Main#0" /> 437 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 438 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 439 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 440 <element signature="e#7430#7439#0" expanded="true" /> 269 441 </folding> 270 442 </state> … … 277 449 <folding> 278 450 <element signature="imports" expanded="true" /> 451 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 452 <element signature="method#removeDuplicates#0;class#Main#0" /> 453 <element signature="method#StandardDeviation#0;class#Main#0" /> 454 <element signature="method#toBufferedImage#0;class#Main#0" /> 455 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 456 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 457 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 458 <element signature="e#7430#7439#0" expanded="true" /> 279 459 </folding> 280 460 </state> … … 287 467 <folding> 288 468 <element signature="imports" expanded="true" /> 469 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 470 <element signature="method#removeDuplicates#0;class#Main#0" /> 471 <element signature="method#StandardDeviation#0;class#Main#0" /> 472 <element signature="method#toBufferedImage#0;class#Main#0" /> 473 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 474 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 475 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 476 <element signature="e#7430#7439#0" expanded="true" /> 289 477 </folding> 290 478 </state> … … 297 485 <folding> 298 486 <element signature="imports" expanded="true" /> 487 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 488 <element signature="method#removeDuplicates#0;class#Main#0" /> 489 <element signature="method#StandardDeviation#0;class#Main#0" /> 490 <element signature="method#toBufferedImage#0;class#Main#0" /> 491 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 492 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 493 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 494 <element signature="e#7430#7439#0" expanded="true" /> 299 495 </folding> 300 496 </state> … … 307 503 <folding> 308 504 <element signature="imports" expanded="true" /> 505 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 506 <element signature="method#removeDuplicates#0;class#Main#0" /> 507 <element signature="method#StandardDeviation#0;class#Main#0" /> 508 <element signature="method#toBufferedImage#0;class#Main#0" /> 509 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 510 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 511 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 512 <element signature="e#7430#7439#0" expanded="true" /> 309 513 </folding> 310 514 </state> … … 317 521 <folding> 318 522 <element signature="imports" expanded="true" /> 523 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 524 <element signature="method#removeDuplicates#0;class#Main#0" /> 525 <element signature="method#StandardDeviation#0;class#Main#0" /> 526 <element signature="method#toBufferedImage#0;class#Main#0" /> 527 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 528 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 529 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 530 <element signature="e#7430#7439#0" expanded="true" /> 319 531 </folding> 320 532 </state> … … 327 539 <folding> 328 540 <element signature="imports" expanded="true" /> 541 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 542 <element signature="method#removeDuplicates#0;class#Main#0" /> 543 <element signature="method#StandardDeviation#0;class#Main#0" /> 544 <element signature="method#toBufferedImage#0;class#Main#0" /> 545 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 546 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 547 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 548 <element signature="e#7430#7439#0" expanded="true" /> 329 549 </folding> 330 550 </state> … … 337 557 <folding> 338 558 <element signature="imports" expanded="true" /> 559 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 560 <element signature="method#removeDuplicates#0;class#Main#0" /> 561 <element signature="method#StandardDeviation#0;class#Main#0" /> 562 <element signature="method#toBufferedImage#0;class#Main#0" /> 563 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 564 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 565 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 566 <element signature="e#7430#7439#0" expanded="true" /> 339 567 </folding> 340 568 </state> … … 347 575 <folding> 348 576 <element signature="imports" expanded="true" /> 577 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 578 <element signature="method#removeDuplicates#0;class#Main#0" /> 579 <element signature="method#StandardDeviation#0;class#Main#0" /> 580 <element signature="method#toBufferedImage#0;class#Main#0" /> 581 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 582 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 583 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 584 <element signature="e#7430#7439#0" expanded="true" /> 349 585 </folding> 350 586 </state> … … 357 593 <folding> 358 594 <element signature="imports" expanded="true" /> 595 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 596 <element signature="method#removeDuplicates#0;class#Main#0" /> 597 <element signature="method#StandardDeviation#0;class#Main#0" /> 598 <element signature="method#toBufferedImage#0;class#Main#0" /> 599 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 600 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 601 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 602 <element signature="e#7430#7439#0" expanded="true" /> 359 603 </folding> 360 604 </state> … … 367 611 <folding> 368 612 <element signature="imports" expanded="true" /> 613 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 614 <element signature="method#removeDuplicates#0;class#Main#0" /> 615 <element signature="method#StandardDeviation#0;class#Main#0" /> 616 <element signature="method#toBufferedImage#0;class#Main#0" /> 617 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 618 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 619 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 620 <element signature="e#7430#7439#0" expanded="true" /> 369 621 </folding> 370 622 </state> … … 377 629 <folding> 378 630 <element signature="imports" expanded="true" /> 631 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 632 <element signature="method#removeDuplicates#0;class#Main#0" /> 633 <element signature="method#StandardDeviation#0;class#Main#0" /> 634 <element signature="method#toBufferedImage#0;class#Main#0" /> 635 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 636 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 637 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 638 <element signature="e#7430#7439#0" expanded="true" /> 379 639 </folding> 380 640 </state> … … 387 647 <folding> 388 648 <element signature="imports" expanded="true" /> 649 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 650 <element signature="method#removeDuplicates#0;class#Main#0" /> 651 <element signature="method#StandardDeviation#0;class#Main#0" /> 652 <element signature="method#toBufferedImage#0;class#Main#0" /> 653 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 654 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 655 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 656 <element signature="e#7430#7439#0" expanded="true" /> 389 657 </folding> 390 658 </state> … … 397 665 <folding> 398 666 <element signature="imports" expanded="true" /> 667 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 668 <element signature="method#removeDuplicates#0;class#Main#0" /> 669 <element signature="method#StandardDeviation#0;class#Main#0" /> 670 <element signature="method#toBufferedImage#0;class#Main#0" /> 671 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 672 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 673 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 674 <element signature="e#7430#7439#0" expanded="true" /> 399 675 </folding> 400 676 </state> … … 407 683 <folding> 408 684 <element signature="imports" expanded="true" /> 685 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 686 <element signature="method#removeDuplicates#0;class#Main#0" /> 687 <element signature="method#StandardDeviation#0;class#Main#0" /> 688 <element signature="method#toBufferedImage#0;class#Main#0" /> 689 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 690 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 691 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 692 <element signature="e#7430#7439#0" expanded="true" /> 409 693 </folding> 410 694 </state> … … 418 702 </provider> 419 703 </entry> 420 <entry file="file://$PROJECT_DIR$/src/Main.java"> 421 <provider selected="true" editor-type-id="text-editor"> 422 <state relative-caret-position="-810"> 423 <caret line="126" column="37" lean-forward="true" selection-start-line="126" selection-start-column="37" selection-end-line="126" selection-end-column="37" /> 424 <folding> 425 <element signature="imports" expanded="true" /> 704 <entry file="jar:///usr/lib/jvm/java-8-oracle/src.zip!/java/lang/Object.java"> 705 <provider selected="true" editor-type-id="text-editor"> 706 <state relative-caret-position="238"> 707 <caret line="234" column="18" selection-start-line="234" selection-start-column="18" selection-end-line="234" selection-end-column="18" /> 708 <folding> 709 <element signature="e#10065#10066#0" expanded="true" /> 710 <element signature="e#10148#10149#0" expanded="true" /> 711 </folding> 712 </state> 713 </provider> 714 </entry> 715 <entry file="file://$PROJECT_DIR$/src/Main.java"> 716 <provider selected="true" editor-type-id="text-editor"> 717 <state relative-caret-position="801"> 718 <caret line="326" selection-start-line="326" selection-end-line="326" /> 719 <folding> 720 <element signature="imports" expanded="true" /> 721 <element signature="class#StartAndEndPoint#0;class#Main#0" /> 722 <element signature="method#removeDuplicates#0;class#Main#0" /> 723 <element signature="method#StandardDeviation#0;class#Main#0" /> 724 <element signature="method#toBufferedImage#0;class#Main#0" /> 725 <element signature="method#ClassifierPixelCount#0;class#Main#0" /> 726 <element signature="method#ClassifierLineCount#0;class#Main#0" /> 727 <element signature="method#ClassifierLineClusterOLD#0;class#Main#0" /> 728 <element signature="e#7430#7439#0" expanded="true" /> 426 729 </folding> 427 730 </state> -
other-projects/is-sheet-music-encore/trunk/image-identification-development/src/Main.java
r33243 r33304 10 10 import java.io.File; 11 11 import java.util.ArrayList; 12 import java.util.Collection; 13 import java.util.Collections; 12 14 import javax.imageio.ImageIO; 13 15 … … 17 19 //https://www.wikihow.com/Calculate-Percentage-in-Java 18 20 //https://riptutorial.com/opencv/example/21963/converting-an-mat-object-to-an-bufferedimage-object 21 //https://beginnersbook.com/2013/12/java-arraylist-of-object-sort-example-comparable-and-comparator/ 22 //https://www.programiz.com/java-programming/examples/standard-deviation 23 //https://www.geeksforgeeks.org/how-to-remove-duplicates-from-arraylist-in-java/ 24 19 25 20 26 … … 38 44 public class Main { 39 45 46 //DEPENDENT FUNCTIONS AND CLASSES 47 static class StartAndEndPoint { 48 //PRIVATES 49 private Point _p1; 50 private Point _p2; 51 //CONSTRUCTOR 52 public StartAndEndPoint(Point p1, Point p2){ 53 _p1 = p1; 54 _p2 = p2; 55 } 56 //GETTERS 57 public Point getP1(){ 58 return _p1; 59 } 60 public Point getP2(){ 61 return _p2; 62 } 63 //SETTERS 64 public void setP1(Point p1){ 65 _p1 = p1; 66 } 67 public void setP2(Point p2){ 68 _p2 = p2; 69 } 70 71 //ToString 72 public String toString(){ 73 return "Start: " + _p1 + " End: " + _p2; 74 } 75 /* 76 //CompareToOverride 77 //Compares start point y co ordinates of input PointArray 78 //With this. start point y co ordinate 79 @Override 80 public double compareTo(StartAndEndPoint comparePointArray){ 81 Point comparePoint = (comparePointArray.getP1()); 82 return (this.getP1().y) - (comparePoint.y); 83 } 84 */ 85 } 86 public static <T> ArrayList<T> removeDuplicates(ArrayList<T> list) { 87 //DIRECTLY COPIED//DIRECTLY COPIED//DIRECTLY COPIED//DIRECTLY COPIED//DIRECTLY COPIED//DIRECTLY COPIED 88 // Function to remove duplicates from an ArrayList 89 // Create a new ArrayList 90 ArrayList<T> newList = new ArrayList(); 91 // Traverse through the first list 92 for (T element : list) { 93 // If this element is not present in newList 94 // then add it 95 if (!newList.contains(element)) { 96 newList.add(element); 97 } 98 } 99 // return the new list 100 return newList; 101 //DIRECTLY COPIED//DIRECTLY COPIED//DIRECTLY COPIED//DIRECTLY COPIED//DIRECTLY COPIED//DIRECTLY COPIED 102 } 103 public static double StandardDeviation(double parseArray[]) 104 { 105 double mean; 106 double sum =0; 107 double standardDeviation = 0; 108 //calculate sum of array 109 for(int i =0; i > parseArray.length; i++){ 110 sum += parseArray[i]; 111 } 112 //calculate mean of array 113 mean = sum/parseArray.length; 114 //calculate SD of array 115 for(int j =0; j > parseArray.length; j++){ 116 standardDeviation += Math.pow(parseArray[j]-mean, 2); 117 } 118 return Math.sqrt(standardDeviation/parseArray.length); 119 } 120 40 121 //GLOBAL_CONSTANTS 41 122 static int CLASSIFIER_HOUGHLINESP_MIN = 10; … … 43 124 static int HOUGHLINEP_THRESHOLD = 10; 44 125 static int MINLINECOUNT = 40; 45 static double MAXLINEGAP = 4;126 static double MAXLINEGAP = 1; //4 46 127 static double SLOPEGRADIENT = 0.02; 47 128 //SHOULD TURN INTO ARGS 48 129 130 //CLASSIFYING FUNCTIONS 49 131 private static BufferedImage toBufferedImage(Mat mat){ 50 132 //MOSTLY COPY PASTE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 100 182 return false; 101 183 } 102 private static boolean Classifier (int lineCount){184 private static boolean ClassifierLineCount(int lineCount){ 103 185 104 186 if(lineCount>MINLINECOUNT){ … … 109 191 } 110 192 } 193 private static ArrayList ClassifierLineClusterOLD(BufferedImage img){ 194 ArrayList returnArray = new ArrayList(); 195 try { 196 197 //IF THIS WORKS THEN IMPLEMENT A VERSION THAT USES POINTS from the draw line code. 198 //ALSO CHECK OUT K NEAREST NEIGHBOR? 199 //0xFFFF0000 = RED 200 201 //go thru every pixel until find red pixel 202 //get y pos of red pixel 203 //continue with loop until find another red pixel 204 //get y pos of red pixel 205 //compare y pos (if close together then continue loop) else break 206 207 int x = img.getWidth(); 208 int y = img.getHeight(); 209 int closeLineCount = 0; 210 ArrayList<Integer> redPixelYpos = new ArrayList<Integer>(); 211 212 213 214 //Go Thru every pixel 215 for(int i=0; i < y; i++){ 216 for(int j=0;j < x; j++){ 217 //Get value for current pixels RGB value 218 int currPixelRGB = img.getRGB(j, i); 219 //Check if pixel is red (hex value of red) 220 if(currPixelRGB == 0xFFFF0000) { 221 222 //Store y pos of red pixel if there is no duplicate 223 if(!redPixelYpos.contains(i)){ 224 redPixelYpos.add(i); 225 //System.out.println(i ); 226 } 227 } 228 } 229 } 230 //Check if any of the lines found are close together and that there has been more than one line found 231 if(redPixelYpos.size()>1){ 232 //go through list and compare every value 233 for(int i =0; i< redPixelYpos.size(); i++){ 234 //System.out.println("i: " +redPixelYpos.get(i)); 235 for(int j=0; j< redPixelYpos.size(); j++){ 236 //System.out.println("j: "+redPixelYpos.get(j)); 237 //Check if difference is less than 4 and the values are not duplicates. 238 if(Math.abs(redPixelYpos.get(i) - redPixelYpos.get(j)) < 4 && !redPixelYpos.get(j).equals(redPixelYpos.get(i))){ 239 closeLineCount++; 240 } 241 } 242 } 243 } 244 int clusterCount = closeLineCount/4; 245 246 if(closeLineCount >= 4){ 247 returnArray.add(true); 248 returnArray.add(closeLineCount); 249 returnArray.add(clusterCount); 250 } 251 else{ 252 returnArray.add(false); 253 returnArray.add(closeLineCount); 254 returnArray.add(clusterCount); 255 } 256 } 257 catch (Exception e) { 258 System.err.println(e); 259 } 260 return returnArray; 261 } 262 263 private static ArrayList ClassifierLineCluster(ArrayList<StartAndEndPoint> linePointsArray){ 264 ArrayList returnArray = new ArrayList(); 265 ArrayList<Double> closeLineYPos = new ArrayList(); 266 ArrayList<double[]> clusterArray = new ArrayList(); 267 int clusterCount = 0; 268 try { 269 if(linePointsArray.size()> 1) { 270 271 //Display input array TESTING PURPOSES 272 for (int i = 0; i < linePointsArray.size(); i++) { 273 System.out.println(linePointsArray.get(i).toString()); 274 } 275 276 277 //Check if y points are close together 278 //go thru list and compare values against each other 279 for (int i = 0; i < linePointsArray.size(); i++){ 280 //System.out.println("i: "+ linePointsArray.get(i).getP1().y); 281 for (int j = 0; j < linePointsArray.size(); j++) { 282 //System.out.println("j: "+ linePointsArray.get(j).getP1().y); 283 //Check if difference is less than 4 and the values are not duplicates. 284 if(Math.abs(linePointsArray.get(j).getP1().y - linePointsArray.get(i).getP1().y) < 5){ 285 if(linePointsArray.get(j).getP1().y != linePointsArray.get(i).getP1().y){ 286 closeLineYPos.add(linePointsArray.get(j).getP1().y); 287 } 288 } 289 } 290 } 291 292 System.out.println(" "); 293 294 //Have all y coordinates that close to each other. 295 //Now check if there are four of these are close to each other. 296 if(closeLineYPos.size() >= 4) { 297 //Sort array and remove duplicates 298 Collections.sort(closeLineYPos); 299 closeLineYPos = removeDuplicates(closeLineYPos); 300 301 302 /*for (double num : closeLineYPos){ 303 System.out.println(num); 304 } */ 305 306 307 //Check first four items, traverse down a step {0,1,2,3} -> {1,2,3,4} -> {2,3,4,5} 308 for(int i= 0; i< closeLineYPos.size(); i++){ 309 //If last comparator is within the array bounds. 310 if(i + 3 == closeLineYPos.size()){ 311 break; 312 } 313 else{ 314 double[] tempArray = new double[4]; 315 tempArray[0] = closeLineYPos.get(i + 0); 316 tempArray[1] = closeLineYPos.get(i + 1); 317 tempArray[2] = closeLineYPos.get(i + 2); 318 tempArray[3] = closeLineYPos.get(i + 3); 319 System.out.println(tempArray[0] + " , " + tempArray[1] + " , " + tempArray[2] + " , " + tempArray[3]); 320 //Check standard deviation 321 if(StandardDeviation(tempArray) < 5){ 322 //Store array 323 clusterArray.add(tempArray); 324 //Check if more than one item in array 325 if(clusterArray.size() > 1){ 326 //check for duplicate yPos in stored arrays (tempArray) 327 328 } 329 330 331 } 332 } 333 } 334 335 //for (double num : closeLineYPos){ 336 // System.out.println(num); 337 //} 338 } 339 340 //PROBLEM. Definition of cluster. Need to check if cluster. 341 //check if four lines are close to each other.(four for loops) 342 // then store these four items in an array and add one to the counter. 343 // (will need to check if found 5th item. - DONT NEED TO? Value gained from finding the 5th line? The staffline height?) 344 // 345 346 347 348 //SETUP RETURN ARRAY 349 if(closeLineYPos.size() >= 4){ 350 returnArray.add(true); 351 returnArray.add(closeLineYPos.size()); 352 returnArray.add(clusterCount); 353 } 354 else{ 355 returnArray.add(false); 356 returnArray.add(closeLineYPos.size()); 357 returnArray.add(clusterCount); 358 } 359 } 360 } 361 catch (Exception e) { 362 System.err.println(e); 363 } 364 return returnArray; 365 } 366 111 367 112 368 113 369 public static void main(String[] args) { 370 114 371 System.loadLibrary(Core.NATIVE_LIBRARY_NAME); 372 115 373 try { 116 //temp array for terminalversion 117 118 ArrayList returnArray = new ArrayList(); 119 returnArray.add(true); 120 returnArray.add(10); 121 374 ArrayList<StartAndEndPoint> pointArrayList = new ArrayList<>(); 122 375 123 376 //Variables 124 377 Mat edgesDetected = new Mat(); 125 378 Mat edgesDetectedRGB = new Mat(); 126 Mat edgesExtra = new Mat();127 Mat edgesDetectedRGBProb;128 Mat edgeDoesntMakeSense;129 Mat justEdges; //TESTING130 131 379 String directory = "/Scratch/cpb16/is-sheet-music-encore/download-images/MU/"; 132 380 //!!!!!!!!!!!!!!!!!!!!!!!!!!!NOT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 133 381 //mdp.39015097852365-2.png 176 lines Contents page. 134 382 //mdp.39015097852555-3.png 76 lines 135 String default_file = directory+"SheetMusic/ mdp.39015080972303-3.png";383 String default_file = directory+"SheetMusic/coo.31924062612282-9.png"; 136 384 //String default_file ="TestImages/NotNot/mdp.39015080972303-3.png"; 137 385 … … 152 400 Mat original = Imgcodecs.imread(filename, Imgcodecs.IMREAD_GRAYSCALE); 153 401 // Edge detection 154 //01 CANNY 155 //Imgproc.Canny(original, edgesDetected, 50, 200, 3, false); 156 //Imgproc.Canny(original, edgesDetected,0, 100, 3, false ); 157 //Imgproc.Canny(original, edgesDetected,80, 120); 158 //02 BINARYINV 159 Imgproc.adaptiveThreshold(original, edgesDetected,255, Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C,Imgproc.THRESH_BINARY_INV,15, 2); 160 161 //Imgproc.adaptiveThreshold(original, edgesExtra,255, Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C,Imgproc.THRESH_BINARY_INV,15, 2); 162 //Imgproc.medianBlur(edgesExtra, edgesDetected, 3); 163 //03 BINARY 164 //Imgproc.adaptiveThreshold(original, edgesDetected,255, Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C,Imgproc.THRESH_BINARY,15, 2); 165 //04 NO PROC 166 //edgesDetected = original.clone(); 167 //05 OTSU THRESHOLD 168 //Imgproc.threshold(original, edgesDetected,0,255,Imgproc.THRESH_BINARY_INV+Imgproc.THRESH_OTSU); 169 170 171 172 402 Imgproc.adaptiveThreshold(original, edgesDetected,255, Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C,Imgproc.THRESH_BINARY_INV, 15, 4); 173 403 174 404 //Convert to RGB for future use 175 405 Imgproc.cvtColor(edgesDetected, edgesDetectedRGB, Imgproc.COLOR_GRAY2BGR); 176 justEdges = edgesDetectedRGB.clone();//TESTING177 edgesDetectedRGBProb = edgesDetectedRGB.clone();178 edgeDoesntMakeSense = edgesDetectedRGB.clone();179 406 180 407 Mat linesP = new Mat(); // will hold the results of the detection … … 184 411 185 412 Imgproc.HoughLinesP(edgesDetected, linesP, 1, Math.PI / 720, HOUGHLINEP_THRESHOLD, minLineLength,MAXLINEGAP); // runs the actual detection 186 //Imgproc.HoughLinesP(edgesDetected, linesP, 1, Math.PI / 180, HOUGHLINEP_THRESHOLD, minLineLength,MAXLINEGAP); // runs the actual detection 187 System.out.println("Before Graident Filtering num lines: " + linesP.rows()); 188 189 //Imgproc.HoughLinesP(edgesDetected,linesP,1,Math.PI/2, 50, 80, 5); 413 System.out.println("Before Gradient Filtering num lines: " + linesP.rows()); 414 190 415 // Draw the lines 191 416 for (int x = 0; x < linesP.rows(); x++) { 192 417 double[] l = linesP.get(x, 0); 193 194 //Find angle that line is at195 //double rho = linesP.get(x, 0)[0];196 //double theta = linesP.get(x, 0)[1];197 //double cosTheta = Math.cos(theta);198 //double sinTheta = Math.sin(theta);199 //double x0 = cosTheta * rho;200 //double y0 = sinTheta * rho;201 //double xpt1 = x0 + 1000 * (-sinTheta);202 //double ypt1 = y0 + 1000 * (cosTheta);203 //double xpt2 = x0 - 1000 * (-sinTheta);204 //double ypt2 = y0 - 1000 * (cosTheta);205 //double angle = Math.atan2((float)ypt2 - (float)ypt1, (float)xpt2 - (float)xpt1)*(Math.PI);206 //double testAngle = (ypt2 - ypt1)/(xpt2 - xpt1);207 208 //New angles209 418 Point p1 = new Point(l[0], l[1]); 210 419 Point p2 = new Point(l[2], l[3]); 211 420 double m = Math.abs(p2.y - p1.y)/(p2.x - p1.x); 212 //System.out.println(l[0]);213 //System.out.println(l[1]);214 //System.out.println(l[2]);215 //System.out.println(l[3]);216 217 421 218 422 if(m<=SLOPEGRADIENT) { 219 //System.out.println("m: " + m); 220 Imgproc.line(edgesDetectedRGB, new Point(l[0], l[1]), new Point(l[2], l[3]), new Scalar(0, 0, 255), 1, Imgproc.LINE_AA, 0); 423 Imgproc.line(edgesDetectedRGB, p1, p2, new Scalar(0, 0, 255), 1, Imgproc.LINE_4, 0); 221 424 horizontalLineCount++; 425 pointArrayList.add(new StartAndEndPoint(p1, p2)); 222 426 } 223 427 … … 226 430 //Prove by finding number of points from one end to other: 227 431 //Get width of image. 228 System.out.println("every matrix widths: "+edgesDetectedRGB.size().width);229 432 File filenameTest = new File("TestImages/NotSheetMusic02.png"); 230 433 BufferedImage i = ImageIO.read(filenameTest); 231 System.out.println("input image width: "+ i.getWidth());232 233 434 BufferedImage toBeClassifiedImg = toBufferedImage(edgesDetectedRGB); 234 System.out.println("Result: " + Classifier(horizontalLineCount)); 235 236 237 System.out.println(); 435 436 System.out.println("LINE COUNT RESULT: " + ClassifierLineCount(horizontalLineCount) + '\t' +"LineCount: " + horizontalLineCount); //COUNT OF LINES CLASSIFICATION 437 System.out.println("LINE CLUSTER RESULT: " + ClassifierLineClusterOLD(toBeClassifiedImg).get(0) + '\t' + "LinesFound: " + ClassifierLineClusterOLD(toBeClassifiedImg).get(1) + '\t' + "ClustersFound: " + ClassifierLineClusterOLD(toBeClassifiedImg).get(2)); 438 //System.out.println("NEW CLUSTER RESULTS: " + ClassifierLineCluster(pointArrayList).get(0) + '\t' + "LinesFound: " + ClassifierLineCluster(pointArrayList).get(1) + '\t' + "ClustersFound: " + ClassifierLineCluster(pointArrayList).get(2)); 439 System.out.println(ClassifierLineCluster(pointArrayList)); 440 238 441 //Display Results 239 HighGui.imshow("Source", original);442 //HighGui.imshow("Source", original); 240 443 //HighGui.imshow("Just Edges", justEdges); //TESTING 241 444 HighGui.imshow("Detected Lines (in red) - positive", edgesDetectedRGB); -
other-projects/is-sheet-music-encore/trunk/image-identification-terminal/javaAccuracyCalculator.java
r33170 r33304 70 70 71 71 //Correctly identified SheetMusic as SheetMusic 72 trueAccuracyRate = ((float)truePositive/(float)sheetMusicCount)*(float)100; 73 74 //Amount of Correctly identified NotSheetSheetMusic as NotSheetMusic 75 falseAccuracyRate = ((float)trueNegative/(float)notSheetMusicCount)*(float)100; 72 if(sheetMusicCount != 0){ 73 trueAccuracyRate = ((float)truePositive/(float)sheetMusicCount)*(float)100; 74 } 75 else { 76 trueAccuracyRate = 0; 77 } 76 78 77 overallAccuracyRate = (truePositive + trueNegative)/(float)(sheetMusicCount+notSheetMusicCount)*(float)100; 79 if(notSheetMusicCount != 0){ 80 //Amount of Correctly identified NotSheetSheetMusic as NotSheetMusic 81 falseAccuracyRate = ((float)trueNegative/(float)notSheetMusicCount)*(float)100; 82 } 83 else { 84 falseAccuracyRate = 0; 85 } 86 87 if(notSheetMusicCount != 0 && sheetMusicCount != 0) { 88 overallAccuracyRate = (truePositive + trueNegative)/(float)(sheetMusicCount+notSheetMusicCount)*(float)100; 89 } 90 else if (sheetMusicCount = 0) { 91 overallAccuracyRate = falseAccuracyRate/2; 92 } 93 else { 94 overallAccuracyRate = trueAccuracyRate/2; 95 } 78 96 79 97 fw.write("Date: " + d.toString() + '\n' -
other-projects/is-sheet-music-encore/trunk/image-identification-terminal/javaImageClassifier.java
r33243 r33304 33 33 static int CLASSIFIER_HOUGHLINESP_MAX = 65; 34 34 static int HOUGHLINEP_THRESHOLD = 10; 35 static int MINLINECOUNT = 40; //5035 static int MINLINECOUNT = 40; 36 36 static double MAXLINEGAP = 4; 37 static double SLOPEGRADIENT = 0.02; //0.0137 static double SLOPEGRADIENT = 0.02; 38 38 39 39 public static void main(String[] args) { … … 136 136 //Imgproc.Canny(original, edgesDetected, 50, 200, 3, false); 137 137 Imgproc.adaptiveThreshold(original, edgesDetected,255, Imgproc.ADAPTIVE_THRESH_GAUSSIAN_C,Imgproc.THRESH_BINARY_INV,15, 2); 138 //Imgproc.blur(edgesExtra, edgesDetected, new Size(3,1)); 138 139 //Imgproc.medianBlur(edgesExtra, edgesDetected, 3); 139 140 … … 160 161 if(m<SLOPEGRADIENT) { 161 162 //System.out.println("m: " + m); 162 Imgproc.line(edgesDetectedRGB, new Point(l[0], l[1]), new Point(l[2], l[3]), new Scalar(0, 0, 255), 1, Imgproc.LINE_AA, 0);163 //Imgproc.line(edgesDetectedRGB, new Point(l[0], l[1]), new Point(l[2], l[3]), new Scalar(0, 0, 255), 1, Imgproc.LINE_AA, 0); SINCE NOT SAVING IMAGES OR COUNTING PIXELS 163 164 horizontalLineCount++; 164 165 } … … 166 167 167 168 //Convert MAT into a BufferedImage 168 BufferedImage toBeClassifiedImg = toBufferedImage(edgesDetectedRGB);169 //BufferedImage toBeClassifiedImg = toBufferedImage(edgesDetectedRGB); SINCE NOT SAVING IMAGES OR COUNTING PIXELS 169 170 //Calculate if its sheet music or not 170 171 isSheetMusic = classifier_HoughLinesP_refined(horizontalLineCount); -
other-projects/is-sheet-music-encore/trunk/image-identification-terminal/results.txt
r33243 r33304 1 Date: Thu Jun 20 18:40:41 NZST 2019 2 Classifier: houghlinesP 3 truePositive: 3098 4 falseNegative: 63 5 falsePositve: 624 6 trueNegative: 1216 7 SheetMusicAccuracyRate: 98.00696% 8 NotSheetMusicAccuracyRate: 66.08695% 9 OverallAccuracyRate: 86.26274% 1 BEST RESULTS TO DATE 10 2 11 Date: Thu Jun 20 18:40:42 NZST 2019 12 Classifier: houghlinesP-refined 13 truePositive: 1666 14 falseNegative: 1495 15 falsePositve: 123 16 trueNegative: 1717 17 SheetMusicAccuracyRate: 52.70484% 18 NotSheetMusicAccuracyRate: 93.315216% 19 OverallAccuracyRate: 67.64648% 20 21 22 23 24 BEST SO FAR 25 Date: Tue Jun 25 16:02:11 NZST 2019 26 Classifier: houghlinesP-refined 27 truePositive: 80 28 falseNegative: 20 29 falsePositve: 11 30 trueNegative: 89 31 SheetMusicAccuracyRate: 80.0% 32 NotSheetMusicAccuracyRate: 89.0% 33 OverallAccuracyRate: 84.5% 34 35 Date: Tue Jun 25 16:21:55 NZST 2019 36 Classifier: houghlinesP 37 truePositive: 3063 38 falseNegative: 98 39 falsePositve: 596 40 trueNegative: 1244 41 SheetMusicAccuracyRate: 96.89972% 42 NotSheetMusicAccuracyRate: 67.608696% 43 OverallAccuracyRate: 86.12277% 44 45 Date: Tue Jun 25 20:06:21 NZST 2019 46 Classifier: houghlinesP-refined-all 47 truePositive: 1723 48 falseNegative: 1438 49 falsePositve: 86 50 trueNegative: 1754 51 SheetMusicAccuracyRate: 54.508064% 52 NotSheetMusicAccuracyRate: 95.32609% 53 OverallAccuracyRate: 69.52609% 54 55 Date: Tue Jun 25 20:13:22 NZST 2019 56 Classifier: houghlinesP-refined 57 truePositive: 80 58 falseNegative: 20 59 falsePositve: 11 60 trueNegative: 89 61 SheetMusicAccuracyRate: 80.0% 62 NotSheetMusicAccuracyRate: 89.0% 63 OverallAccuracyRate: 84.5% 64 65 Date: Tue Jun 25 22:40:22 NZST 2019 66 Classifier: houghlinesP-refined-all-canny 67 truePositive: 1124 68 falseNegative: 2037 69 falsePositve: 61 70 trueNegative: 1779 71 SheetMusicAccuracyRate: 35.558365% 72 NotSheetMusicAccuracyRate: 96.684784% 73 OverallAccuracyRate: 58.048393% 74 75 MAX 65 76 MIN 10 77 ALL MU 78 RESULT: 79 80 81 Date: Wed Jun 26 20:08:09 NZST 2019 82 Classifier: houghlinesP-refined-all-canny 83 truePositive: 1124 84 falseNegative: 2037 85 falsePositve: 61 86 trueNegative: 1779 87 SheetMusicAccuracyRate: 35.558365% 88 NotSheetMusicAccuracyRate: 96.684784% 89 OverallAccuracyRate: 58.048393% 90 91 Date: Wed Jun 26 20:44:04 NZST 2019 92 Classifier: houghlinesP-refined-all 93 truePositive: 1725 94 falseNegative: 1436 95 falsePositve: 87 96 trueNegative: 1753 97 SheetMusicAccuracyRate: 54.571335% 98 NotSheetMusicAccuracyRate: 95.271736% 99 OverallAccuracyRate: 69.54609% 100 101 BOTH PRE THURSDAY MEETING 102 Date: Wed Jun 26 21:40:37 NZST 2019 3 Date: Tue Jul 02 12:35:16 NZST 2019 103 4 Classifier: houghlinesP 104 5 truePositive: 3103 … … 110 11 OverallAccuracyRate: 85.642876% 111 12 112 Date: Wed Jun 26 21:40:37NZST 201913 Date: Tue Jul 02 12:35:16 NZST 2019 113 14 Classifier: houghlinesP-refined 114 truePositive: 1725115 falseNegative: 1436116 falsePositve: 87117 trueNegative: 1753118 SheetMusicAccuracyRate: 54.571335%119 NotSheetMusicAccuracyRate: 95.271736%120 OverallAccuracyRate: 69.54609%121 122 123 POST MEETING124 125 126 Date: Thu Jun 27 11:56:02 NZST 2019127 Classifier: houghlinesP-refined128 truePositive: 0129 falseNegative: 0130 falsePositve: 0131 trueNegative: 0132 SheetMusicAccuracyRate: 0.0%133 NotSheetMusicAccuracyRate: 0.0%134 OverallAccuracyRate: 0.0%135 136 Date: Thu Jun 27 12:04:40 NZST 2019137 Classifier: houghlinesP-refined-test138 truePositive: 7139 falseNegative: 3140 falsePositve: 5141 trueNegative: 5142 SheetMusicAccuracyRate: 70.0%143 NotSheetMusicAccuracyRate: 50.0%144 OverallAccuracyRate: 60.000004%145 146 LINE GAP OF 10147 148 Date: Thu Jun 27 12:24:59 NZST 2019149 Classifier: houghlinesP-refined-all150 truePositive: 2808151 falseNegative: 353152 falsePositve: 307153 trueNegative: 1533154 SheetMusicAccuracyRate: 88.83265%155 NotSheetMusicAccuracyRate: 83.315216%156 OverallAccuracyRate: 86.802635%157 158 159 LINE GAP OF 4160 161 162 Date: Thu Jun 27 14:35:24 NZST 2019163 Classifier: houghlinesP-refined-all164 truePositive: 2626165 falseNegative: 535166 falsePositve: 77167 trueNegative: 1763168 SheetMusicAccuracyRate: 83.074974%169 NotSheetMusicAccuracyRate: 95.815216%170 OverallAccuracyRate: 87.76244%171 172 MINLINECOUNT=40173 gradient = 0.02174 Date: Thu Jun 27 15:10:14 NZST 2019175 Classifier: houghlinesP-refined-all176 15 truePositive: 2961 177 16 falseNegative: 200 … … 182 21 OverallAccuracyRate: 93.28135% 183 22 23 REFINEMENT IMPROVEMENT TESTS 24 BINARY_INV, 15, 4 25 26 Date: Tue Jul 02 12:56:53 NZST 2019 27 Classifier: houghlinesP-refined-all 28 truePositive: 2952 29 falseNegative: 209 30 falsePositve: 128 31 trueNegative: 1712 32 SheetMusicAccuracyRate: 93.38817% 33 NotSheetMusicAccuracyRate: 93.04348% 34 OverallAccuracyRate: 93.26135% 35 36 BINARY_INV, 15, 4 37 BLUR 3,1 38 39 Date: Tue Jul 02 13:27:00 NZST 2019 40 Classifier: houghlinesP-refined-all 41 truePositive: 2989 42 falseNegative: 172 43 falsePositve: 211 44 trueNegative: 1628 45 SheetMusicAccuracyRate: 94.558685% 46 NotSheetMusicAccuracyRate: 88.526375% 47 OverallAccuracyRate: 92.34% 48
Note:
See TracChangeset
for help on using the changeset viewer.