public ArrayList <CLTPass3d> clt_3d_passes = null;
public double [][] rig_disparity_strength = null; // Disparity and strength created by a two-camera rig, with disparity scale and distortions of the main camera
@@ -102,6 +105,22 @@ public class TileProcessor {
public int getNumSensors() {
return numSensors;
}
public static int getStringIndex(String needle, String [] haystack) {
for (int i = 0; i < haystack.length; i++) {
if (haystack[i].equals(needle)) return i;
}
String shaystack = "{";
for (String s:haystack) {
shaystack +="\""+s+"\",";
}
shaystack +="}";
throw new IllegalArgumentException ("Scan title\""+needle+"\" is not found in "+shaystack);
}
public int getScanTitleIndex(String title) {
return getStringIndex(title, scan_titles);
}
public TileProcessor(
int tilesX,
int tilesY,
@@ -128,7 +147,21 @@ public class TileProcessor {
this.trustedCorrelation = trustedCorrelation;
this.maxOverexposure = maxOverexposure;
this.threadsMax = threadsMax;
this.scan_titles = new String[SCAN_TITLES4.length + (this.numSensors-4)*6];
int idiff0 = getStringIndex("diff0", SCAN_TITLES4);
int idiff2max = getStringIndex("diff2max", SCAN_TITLES4);
int ir0 = getStringIndex("r0", SCAN_TITLES4);
int indx = 0;
for (int i = 0; i < idiff0; i++) scan_titles[indx++] = SCAN_TITLES4[i];
for (int i = 0; i < numSensors; i++) scan_titles[indx++] = "diff"+i;
for (int i = idiff2max; i < ir0; i++) scan_titles[indx++] = SCAN_TITLES4[i];
for (int i = 0; i < numSensors; i++) scan_titles[indx++] = "r"+i;
for (int i = 0; i < numSensors; i++) scan_titles[indx++] = "b"+i;
for (int i = 0; i < numSensors; i++) scan_titles[indx++] = "g"+i;
for (int i = 0; i < numSensors; i++) scan_titles[indx++] = "y"+i;
for (int i = 0; i < numSensors; i++) scan_titles[indx++] = "d"+i;
}
public TileProcessor(TileProcessor tp) {
this.tilesX = tp.tilesX;
this.tilesY = tp.tilesY;
@@ -143,6 +176,7 @@ public class TileProcessor {
this.maxOverexposure = tp.maxOverexposure;
this.threadsMax = tp.threadsMax;
this.globalDebugLevel = tp.globalDebugLevel;
this.scan_titles = tp.scan_titles;
// next should not be needed for new instance
/*
@@ -492,7 +526,7 @@ public class TileProcessor {
if ((good_comp == null) || (!good_comp[0] && !good_comp[1] && !good_comp[2])){