Fix issue with FT and MM song identification being swapped.

master
sigonasr2 4 years ago
parent 27d89157bf
commit 3a1bff12f1
  1. BIN
      image.png
  2. 7
      src/main/java/com/example/demo/Controller.java
  3. 4
      src/main/java/com/example/demo/DemoApplication.java

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

@ -231,7 +231,10 @@ public class Controller {
} }
img = img.getSubimage(crop2.x, crop1.y, crop1.x-crop2.x, crop2.y-crop1.y); img = img.getSubimage(crop2.x, crop1.y, crop1.x-crop2.x, crop2.y-crop1.y);
//ImageIO.write(img,"png",new File("test.png")); //ImageIO.write(img,"png",new File("test.png"));
} else {
MyRobot.FUTURETONE=false;
} }
//System.out.println("Future Tone? "+MyRobot.FUTURETONE);
return img; return img;
} }
@ -241,7 +244,7 @@ public class Controller {
SongData matchingSong = null; SongData matchingSong = null;
//There are 2304 pixels total. Once 2188 match, we'll call it good. //There are 2304 pixels total. Once 2188 match, we'll call it good.
if (MyRobot.FUTURETONE) { if (MyRobot.FUTURETONE) {
for (SongData song : DemoApplication.songs) { for (SongData song : DemoApplication.FTsongs) {
float matching = 0; float matching = 0;
for (int y=0;y<288;y++) { for (int y=0;y<288;y++) {
for (int x=0;x<8;x++) { for (int x=0;x<8;x++) {
@ -264,7 +267,7 @@ public class Controller {
} }
} else { } else {
for (SongData song : DemoApplication.FTsongs) { for (SongData song : DemoApplication.songs) {
float matching = 0; float matching = 0;
for (int y=0;y<288;y++) { for (int y=0;y<288;y++) {
for (int x=0;x<8;x++) { for (int x=0;x<8;x++) {

@ -100,6 +100,7 @@ public class DemoApplication {
RunTest("ぽっぴっぽー.jpg",350,46,7,6,3,80.39f,false,"N","",175,263630); RunTest("ぽっぴっぽー.jpg",350,46,7,6,3,80.39f,false,"N","",175,263630);
RunTest("サマーアイドル.jpg",245,19,4,0,2,87.04f,false,"E","",103,179360); RunTest("サマーアイドル.jpg",245,19,4,0,2,87.04f,false,"E","",103,179360);
RunTest("アゲアゲアゲイン_alt.jpg","アゲアゲアゲイン",452,201,20,11,34,71.89f,false,"EX","",115,543240,false); RunTest("アゲアゲアゲイン_alt.jpg","アゲアゲアゲイン",452,201,20,11,34,71.89f,false,"EX","",115,543240,false);
RunTest("test.jpg","1/6 -out of the gravity-",575,26,0,0,0,104.51f,false,"EX","HS",601,698951,false);
RunTest("EiMmwvJUMAEVmaT.jpg","アゲアゲアゲイン",0,0,0,0,89,0.00f,true,"E","",0,0,false); RunTest("EiMmwvJUMAEVmaT.jpg","アゲアゲアゲイン",0,0,0,0,89,0.00f,true,"E","",0,0,false);
//RunTest("test38.jpg","サマーアイドル",345,49,6,2,2,94.53f,false,"H","",232,347990,false); //RunTest("test38.jpg","サマーアイドル",345,49,6,2,2,94.53f,false,"H","",232,347990,false);
//RunTest("ジターバグ_2.jpg","ジターバグ",0,0,0,0,159,0.00f,true,"EX","SD",0,0); //RunTest("ジターバグ_2.jpg","ジターバグ",0,0,0,0,159,0.00f,true,"EX","SD",0,0);
@ -109,7 +110,7 @@ public class DemoApplication {
RunRemoteTest("http://projectdivar.com/files/img3.png","忘却心中",361,89,31,9,28,79.20f,false,"EXEX","HS",55,693650); RunRemoteTest("http://projectdivar.com/files/img3.png","忘却心中",361,89,31,9,28,79.20f,false,"EXEX","HS",55,693650);
RunRemoteTest("http://projectdivar.com/files/img4.png","ロミオとシンデレラ",612,70,7,0,12,88.05f,false,"EX","HS",339,522350); RunRemoteTest("http://projectdivar.com/files/img4.png","ロミオとシンデレラ",612,70,7,0,12,88.05f,false,"EX","HS",339,522350);
RunRemoteTest("http://projectdivar.com/files/img5.png","巨大少女",441,33,0,1,3,102.11f,false,"EXEX","HS",244,673260);*/ RunRemoteTest("http://projectdivar.com/files/img5.png","巨大少女",441,33,0,1,3,102.11f,false,"EXEX","HS",244,673260);*/
RunRemoteTest("http://projectdivar.com/files/146.jpg","アンハッピーリフレイン",942,71,1,0,3,97.02f,false,"EXEX","",714,951020); //RunRemoteTest("http://projectdivar.com/files/146.jpg","アンハッピーリフレイン",942,71,1,0,3,97.02f,false,"EXEX","",714,951020);
System.out.println("All Tests passed!"); System.out.println("All Tests passed!");
} }
@ -188,6 +189,7 @@ public class DemoApplication {
} }
Assert.isTrue(f.exists(),"Expected file to exist: "+f.getAbsoluteFile()); Assert.isTrue(f.exists(),"Expected file to exist: "+f.getAbsoluteFile());
img = ImageIO.read(f); img = ImageIO.read(f);
img = Controller.CropFutureToneImage(img);
Result r = typeface1.getAllData(img,debug); Result r = typeface1.getAllData(img,debug);
if (img.getWidth()!=1200) { if (img.getWidth()!=1200) {
//Resize. //Resize.

Loading…
Cancel
Save