Commit 1b90adae authored by Andrey Filippov's avatar Andrey Filippov

Implemented fast/slow targets

parent 58388314
...@@ -327,13 +327,17 @@ public class Cuas { ...@@ -327,13 +327,17 @@ public class Cuas {
tilesX, // int width, // only used if restored from tiff, ignored for .cuas tilesX, // int width, // only used if restored from tiff, ignored for .cuas
dts, // double dts, // time stamp as double, only used if restored from tiff, ignored for .cuas dts, // double dts, // time stamp as double, only used if restored from tiff, ignored for .cuas
debugLevel); // int debugLevel) debugLevel); // int debugLevel)
if (debugLevel > -3) { if (debugLevel > -4) {
if (cuasData != null) { if (cuasData != null) {
System.out.println("createCenterClt(): read cumulative parent data from "+cumulative_parent_dir_path); System.out.println("createCenterClt(): read cumulative parent data from "+cumulative_parent_dir_path);
} else { } else {
System.out.println("createCenterClt(): FAILED to read cumulative parent data from "+cumulative_parent_dir_path); System.out.println("createCenterClt(): FAILED to read cumulative parent data from "+cumulative_parent_dir_path);
} }
} }
} else {
if (debugLevel > -4) {
System.out.println("createCenterClt(): using new average");
}
} }
CuasData newCuasData = getTDComboSceneSequence( CuasData newCuasData = getTDComboSceneSequence(
......
...@@ -77,8 +77,9 @@ public class CuasMotionLMA { ...@@ -77,8 +77,9 @@ public class CuasMotionLMA {
public static final int RSLT_QMATCH_LEN=34; public static final int RSLT_QMATCH_LEN=34;
public static final int RSLT_QSCORE = 35; public static final int RSLT_QSCORE = 35;
public static final int RSLT_STRONGER =36; // index of stronger neighbor (may be more) public static final int RSLT_STRONGER =36; // index of stronger neighbor (may be more)
public static final int RSLT_WHEN = 37; public static final int RSLT_SLOW = 37; // 1 - slow, 0 - fast
public static final int RSLT_FAIL = 38; public static final int RSLT_WHEN = 38;
public static final int RSLT_FAIL = 39;
public static final int RSLT_LEN = RSLT_FAIL+1; public static final int RSLT_LEN = RSLT_FAIL+1;
......
...@@ -7282,8 +7282,8 @@ public class OpticalFlow { ...@@ -7282,8 +7282,8 @@ public class OpticalFlow {
String [] bkp_sourcePaths = quadCLT_main.correctionsParameters.sourcePaths; String [] bkp_sourcePaths = quadCLT_main.correctionsParameters.sourcePaths;
boolean bkp_use_set_dirs = quadCLT_main.correctionsParameters.use_set_dirs; boolean bkp_use_set_dirs = quadCLT_main.correctionsParameters.use_set_dirs;
String bkp_cuasUasLogs = quadCLT_main.correctionsParameters.cuasSkyMask; // TIFF image 640x512 where 1.0 - sky, 0.0 - ground, blurred with GB (now sigma==2.0) String bkp_cuasUasLogs = quadCLT_main.correctionsParameters.cuasUasLogs; // TIFF image 640x512 where 1.0 - sky, 0.0 - ground, blurred with GB (now sigma==2.0)
String bkp_cuasSkyMask = quadCLT_main.correctionsParameters.cuasUasLogs; // json file path containing UAS logs String bkp_cuasSkyMask = quadCLT_main.correctionsParameters.cuasSkyMask; // json file path containing UAS logs
double bkp_cuasUasTimeStamp = quadCLT_main.correctionsParameters.cuasUasTimeStamp; // 0.0; // timestamp corresponding to the UAS time 0.0 double bkp_cuasUasTimeStamp = quadCLT_main.correctionsParameters.cuasUasTimeStamp; // 0.0; // timestamp corresponding to the UAS time 0.0
double [] bkp_cuasCameraATR = quadCLT_main.correctionsParameters.cuasCameraATR; //{0, 0, 0}; double [] bkp_cuasCameraATR = quadCLT_main.correctionsParameters.cuasCameraATR; //{0, 0, 0};
double [] bkp_cuasUASHome = quadCLT_main.correctionsParameters.cuasUASHome; //{0, 0, 0}; double [] bkp_cuasUASHome = quadCLT_main.correctionsParameters.cuasUASHome; //{0, 0, 0};
......
...@@ -8635,8 +8635,8 @@ if (debugLevel > -100) return true; // temporarily ! ...@@ -8635,8 +8635,8 @@ if (debugLevel > -100) return true; // temporarily !
if (quadCLT_main.correctionsParameters.useCuasSeedDir) { if (quadCLT_main.correctionsParameters.useCuasSeedDir) {
cuas_centers = new String [] {quadCLT_main.correctionsParameters.cuasSeedDir,""}; cuas_centers = new String [] {quadCLT_main.correctionsParameters.cuasSeedDir,""};
} }
if (debugLevel > -4) { if (debugLevel > -4){
System.out.println("cuas_centers="+((cuas_centers != null)?("[\""+cuas_centers[0]+"\",\""+cuas_centers[1]+"\"]"):"null")); System.out.println("2. cuas_centers="+((cuas_centers != null)?("[\""+cuas_centers[0]+"\",\""+cuas_centers[1]+"\"]"):"null"));
} }
/* /*
if ((quadCLT_main.correctionsParameters.cuasSeed != null) && (quadCLT_main.correctionsParameters.cuasSeed.length()>0)) { if ((quadCLT_main.correctionsParameters.cuasSeed != null) && (quadCLT_main.correctionsParameters.cuasSeed.length()>0)) {
...@@ -8685,12 +8685,15 @@ if (debugLevel > -100) return true; // temporarily ! ...@@ -8685,12 +8685,15 @@ if (debugLevel > -100) return true; // temporarily !
// Process UAS logs // Process UAS logs
UasLogReader uasLogReader = null; UasLogReader uasLogReader = null;
String uas_log_path = quadCLT_main.correctionsParameters.getUasLogsPath(); String uas_log_path = quadCLT_main.correctionsParameters.getUasLogsPath();
System.out.println("Using UAS log file: "+uas_log_path);
if ((uas_log_path != null) && (uas_log_path.length() > 0)) { if ((uas_log_path != null) && (uas_log_path.length() > 0)) {
uasLogReader = new UasLogReader(uas_log_path, quadCLT_main.correctionsParameters.cuasUasTimeStamp, null, quadCLT_main); uasLogReader = new UasLogReader(uas_log_path, quadCLT_main.correctionsParameters.cuasUasTimeStamp, null, quadCLT_main);
uasLogReader.setCameraATR(quadCLT_main.correctionsParameters.cuasCameraATR); uasLogReader.setCameraATR(quadCLT_main.correctionsParameters.cuasCameraATR);
uasLogReader.setUASHomeNed(quadCLT_main.correctionsParameters.cuasSetHome? quadCLT_main.correctionsParameters.cuasUASHome : null); uasLogReader.setUASHomeNed(quadCLT_main.correctionsParameters.cuasSetHome? quadCLT_main.correctionsParameters.cuasUASHome : null);
} }
if (debugLevel > -4) {
System.out.println("cuas_centers="+((cuas_centers != null)?("[\""+cuas_centers[0]+"\",\""+cuas_centers[1]+"\"]"):"null"));
}
while ((ref_index < 0) || ((ref_index + 1) >= min_num_scenes)) { while ((ref_index < 0) || ((ref_index + 1) >= min_num_scenes)) {
String model_directory = opticalFlow.buildSeries( String model_directory = opticalFlow.buildSeries(
...@@ -8715,6 +8718,10 @@ if (debugLevel > -100) return true; // temporarily ! ...@@ -8715,6 +8718,10 @@ if (debugLevel > -100) return true; // temporarily !
threadsMax, // final int threadsMax, // maximal number of threads to launch threadsMax, // final int threadsMax, // maximal number of threads to launch
updateStatus, // final boolean updateStatus, updateStatus, // final boolean updateStatus,
debugLevel+2); // final int debugLevel) debugLevel+2); // final int debugLevel)
if (debugLevel > -4){
System.out.println("3. cuas_centers="+((cuas_centers != null)?("[\""+cuas_centers[0]+"\",\""+cuas_centers[1]+"\"]"):"null"));
}
if (model_directory == null) { if (model_directory == null) {
// TODO: Save continuation after failure not to retry each run // TODO: Save continuation after failure not to retry each run
System.out.println("Failed to build sequence for series "+ref_index); System.out.println("Failed to build sequence for series "+ref_index);
...@@ -8784,6 +8791,10 @@ if (debugLevel > -100) return true; // temporarily ! ...@@ -8784,6 +8791,10 @@ if (debugLevel > -100) return true; // temporarily !
link.delete(); link.delete();
} }
Files.createSymbolicLink(link.toPath(), pathRelative); Files.createSymbolicLink(link.toPath(), pathRelative);
if (debugLevel > -4){
System.out.println("createSymbolicLink "+pathRelative+" -> "+link.toPath());
}
} }
// cuas_centers[0] = cuas_centers[1]; // cuas_centers[0] = cuas_centers[1];
// cuas_centers[1] = ""; // cuas_centers[1] = "";
...@@ -8797,7 +8808,14 @@ if (debugLevel > -100) return true; // temporarily ! ...@@ -8797,7 +8808,14 @@ if (debugLevel > -100) return true; // temporarily !
} // while ((ref_index < 0) || ((ref_index + 1) >= min_num_scenes)) { } // while ((ref_index < 0) || ((ref_index + 1) >= min_num_scenes)) {
if ((cuas_centers != null) && (cuas_centers[1] != null) && (cuas_centers[1].length()>0)) { if ((cuas_centers != null) && (cuas_centers[1] != null) && (cuas_centers[1].length()>0)) {
cuas_centers[0] = cuas_centers[1]; cuas_centers[0] = cuas_centers[1];
cuas_centers[1] = ""; cuas_centers[1] = "";
if (debugLevel > -4){
System.out.println("4. cuas_centers="+((cuas_centers != null)?("[\""+cuas_centers[0]+"\",\""+cuas_centers[1]+"\"]"):"null"));
}
}
if (debugLevel > -4){
System.out.println("5. cuas_centers="+((cuas_centers != null)?("[\""+cuas_centers[0]+"\",\""+cuas_centers[1]+"\"]"):"null"));
} }
} // for (int nseq = 0; nseq < num_seq; nseq++) { } // for (int nseq = 0; nseq < num_seq; nseq++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment