Combine the sig data with other data in sdvx reader (#1)

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
sigonasr2, Sig, Sigo 2 years ago
parent 0a160e7081
commit 2f425bc1c0
  1. 9
      readers/Reader.java
  2. 8
      readers/SoundVoltexReader.java
  3. BIN
      result.png

@ -33,7 +33,7 @@ public abstract class Reader{
} }
} }
protected void init() { protected void init() {
sig_data = new String[sig_data_size]; sig_data = new String[readRegions.size()];
} }
String readAllBoxes(Path img) { String readAllBoxes(Path img) {
try { try {
@ -58,7 +58,7 @@ public abstract class Reader{
} }
return ""; return "";
} }
String interpretOutput(String[] jp_data,String[] en_data) { String interpretOutput(String[] jp_data,String[] en_data,String[] sig_data) {
//[6, 0, 218, 0, 218, 48, 6, 48, 32 5 4 1 5, 0.9670235803680689] //[6, 0, 218, 0, 218, 48, 6, 48, 32 5 4 1 5, 0.9670235803680689]
//For each data point we want to first see if it's within the correct rectangular bounds and from there parse it as such. //For each data point we want to first see if it's within the correct rectangular bounds and from there parse it as such.
double[] accuracy = new double[readRegions.size()]; double[] accuracy = new double[readRegions.size()];
@ -115,6 +115,11 @@ public abstract class Reader{
spacing+=readRegions.get(j).h+REGION_PADDING; spacing+=readRegions.get(j).h+REGION_PADDING;
} }
} }
for (int i=0;i<sig_data.length;i++) {
if (!sig_data[i].isEmpty()) {
finalData[i]=sig_data[i];
}
}
System.out.println(Arrays.toString(finalData)); System.out.println(Arrays.toString(finalData));
interpretResults(finalData); interpretResults(finalData);
return null; return null;

@ -158,7 +158,7 @@ public class SoundVoltexReader extends Reader{
}break; }break;
case 21:{ case 21:{
final ColorRange TARGETCOLOR = new ColorRange(200,255,200,255,200,255); final ColorRange TARGETCOLOR = new ColorRange(200,255,200,255,200,255);
final ColorRange SEEKINGCOLOR = new ColorRange(100,255,100,255,100,255); final ColorRange SEEKINGCOLOR = new ColorRange(120,255,120,255,120,255);
final Color FINALCOLOR = Color.MAGENTA; final Color FINALCOLOR = Color.MAGENTA;
for (int i=0;i<arr.length;i++) { for (int i=0;i<arr.length;i++) {
Color col = new Color(arr[i],true); Color col = new Color(arr[i],true);
@ -334,9 +334,7 @@ public class SoundVoltexReader extends Reader{
ImageIO.write(subRegion,"png",new File("sub.png")); ImageIO.write(subRegion,"png",new File("sub.png"));
cutImg.setRGB(0,currentHeight,readRegions.get(i).w,readRegions.get(i).h,arr,0,readRegions.get(i).w); cutImg.setRGB(0,currentHeight,readRegions.get(i).w,readRegions.get(i).h,arr,0,readRegions.get(i).w);
String val = interpretImage(subRegion,i); String val = interpretImage(subRegion,i);
if (!val.isEmpty()) {
sig_data[counter++]=val; sig_data[counter++]=val;
}
currentHeight+=readRegions.get(i).h+REGION_PADDING; currentHeight+=readRegions.get(i).h+REGION_PADDING;
} }
Path output = Paths.get("result.png"); Path output = Paths.get("result.png");
@ -350,7 +348,7 @@ public class SoundVoltexReader extends Reader{
System.out.println(Arrays.toString(ja_data)); System.out.println(Arrays.toString(ja_data));
System.out.println(Arrays.toString(en_data)); System.out.println(Arrays.toString(en_data));
System.out.println(Arrays.toString(sig_data)); System.out.println(Arrays.toString(sig_data));
//interpretOutput(ja_data,en_data); interpretOutput(ja_data,en_data,sig_data);
g.dispose(); g.dispose();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
@ -419,7 +417,7 @@ public class SoundVoltexReader extends Reader{
other+="ex:"+Integer.toString(convertToInt("EX SCORE",splitter))+","; other+="ex:"+Integer.toString(convertToInt("EX SCORE",splitter))+",";
}break; }break;
case 4:{ case 4:{
pct=convertToDouble("EFFECTIVE RATE",splitter);//We're lucky excessive and effective rate have the same number of characters... pct=convertToDouble(splitter);//We're lucky excessive and effective rate have the same number of characters...
}break; }break;
case 5:{ case 5:{
notes[0]=convertToInt("ERROR",splitter); notes[0]=convertToInt("ERROR",splitter);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Loading…
Cancel
Save