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. 10
      readers/SoundVoltexReader.java
  3. BIN
      result.png

@ -33,7 +33,7 @@ public abstract class Reader{
}
}
protected void init() {
sig_data = new String[sig_data_size];
sig_data = new String[readRegions.size()];
}
String readAllBoxes(Path img) {
try {
@ -58,7 +58,7 @@ public abstract class Reader{
}
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]
//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()];
@ -115,6 +115,11 @@ public abstract class Reader{
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));
interpretResults(finalData);
return null;

@ -158,7 +158,7 @@ public class SoundVoltexReader extends Reader{
}break;
case 21:{
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;
for (int i=0;i<arr.length;i++) {
Color col = new Color(arr[i],true);
@ -334,9 +334,7 @@ public class SoundVoltexReader extends Reader{
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);
String val = interpretImage(subRegion,i);
if (!val.isEmpty()) {
sig_data[counter++]=val;
}
sig_data[counter++]=val;
currentHeight+=readRegions.get(i).h+REGION_PADDING;
}
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(en_data));
System.out.println(Arrays.toString(sig_data));
//interpretOutput(ja_data,en_data);
interpretOutput(ja_data,en_data,sig_data);
g.dispose();
} catch (IOException e) {
e.printStackTrace();
@ -419,7 +417,7 @@ public class SoundVoltexReader extends Reader{
other+="ex:"+Integer.toString(convertToInt("EX SCORE",splitter))+",";
}break;
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;
case 5:{
notes[0]=convertToInt("ERROR",splitter);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Loading…
Cancel
Save