publicstaticfinalintRSLT_FL_RANGE=57;// flight log range (meters)
publicstaticfinalintRSLT_FL_RANGE=57;// flight log range (meters)
publicstaticfinalintRSLT_INFINITY=58;// disparity at infinity used for range calculation
publicstaticfinalintRSLT_INFINITY=58;// disparity at infinity used for range calculation
publicstaticfinalintRSLT_TARGET_ID=59;// unique target id for the whole sequence of segments. 1 is reserved for the UAS
publicstaticfinalintRSLT_TARGET_ID=59;// unique target id for the whole sequence of segments. 1 is reserved for the UAS
publicstaticfinalintRSLT_VEL_AXIAL=60;// axial velocity (positive - away), range derivative (m/s), calculated from the difference to the previous/next series range
publicstaticfinalintRSLT_VEL_AWAY=60;// axial velocity (positive - away), range derivative (m/s), calculated from the difference to the previous/next series range
publicstaticfinalintRSLT_VEL_LATERAL=61;// lateral velocity ( calculated from angular and RSLT_GRANGE
publicstaticfinalintRSLT_VEL_RIGHT=61;// lateral velocity, right ( calculated from angular and RSLT_GRANGE
publicstaticfinalintRSLT_RANGE_LIN=62;// range linear interpolated using previous/next series if the same target is present there
publicstaticfinalintRSLT_VEL_UP=62;// lateral velocity, up ( calculated from angular and RSLT_GRANGE
publicstaticfinalintRSLT_RANGE_LIN=63;// range linear interpolated using previous/next series if the same target is present there
Stringdisparity_path=center_CLT.getImageName()+CuasMotion.getParametersSuffixRanging(clt_parameters,TARGET_GLOBALS_SUFFIX);// may later be directly provided (e.g. select specific version)
if(disparity_path.indexOf(Prefs.getFileSeparator())<0){// now always
System.out.println("processMovingTargetsMulti(): FAILED TO READ TARGET DATA FROM "+disparity_path);
returnnull;
}else{
targets=disparity_targets;
System.out.println("processMovingTargetsMulti(): re-using target disparities from "+disparity_path+", generating radar mode images");
}
}else{
cuasMotion.processMovingTargetsMulti(// will remove rendering
batch_mode,// final boolean batch_mode,
fpixels,// final float [][] fpixels,
debugLevel);// final int debugLevel) {
// double[][][]
targets=cuasMotion.getTargets();
if(rng_disp||rng_glob){
if(rng_disp||rng_glob){
double[][][]disparity_targets=null;
double[][][]disparity_targets=null;
if(reuse_disparity){
if(reuse_disparity){
// String disparity_path = model_prefix+TARGET_DISPARITIES_SUFFIX; // may later be directly provided (e.g. select specific version)
// String disparity_path = model_prefix+TARGET_DISPARITIES_SUFFIX; // may later be directly provided (e.g. select specific version)
Stringdisparity_path=center_CLT.getImageName()+CuasMotion.getParametersSuffixRanging(clt_parameters,TARGET_DISPARITIES_SUFFIX);// may later be directly provided (e.g. select specific version)
Stringdisparity_path=center_CLT.getImageName()+CuasMotion.getParametersSuffixRanging(clt_parameters,TARGET_DISPARITIES_SUFFIX);// may later be directly provided (e.g. select specific version)
if(disparity_path.indexOf(Prefs.getFileSeparator())<0){// now always
if(disparity_path.indexOf(Prefs.getFileSeparator())<0){// now always
Stringx3d_path=center_CLT.getX3dDirectory();
Stringx3d_path=center_CLT.getX3dDirectory();
...
@@ -239,7 +264,7 @@ public class CuasRanging {
...
@@ -239,7 +264,7 @@ public class CuasRanging {
System.out.println("processMovingTargetsMulti(): re-using target disparities from "+disparity_path);
System.out.println("processMovingTargetsMulti(): re-using target disparities from "+disparity_path);
}
}
}
}
// if ((disparity_targets == null) || rng_glob) { // for now - always recalculate if
// if ((disparity_targets == null) || rng_glob) { // for now - always recalculate if
saveTargetStats(targets);// final double [][][] targets_single) {
saveTargetStats(targets);// final double [][][] targets_single) {
}
}
}
if(generate_output){
if(generate_output){
cuasMotion.generateExtractFilterMovingTargets(// move parameters to clt_parameters
cuasMotion.generateExtractFilterMovingTargets(// move parameters to clt_parameters
radar_mode,// final boolean radar_mode,
false,// final boolean video_pass, // if clt_parameters.cuas_clean_video=true, video_pass=0 - output TIFFS, but no video. If video_pass==1 - only video with no debug
false,// final boolean video_pass, // if clt_parameters.cuas_clean_video=true, video_pass=0 - output TIFFS, but no video. If video_pass==1 - only video with no debug
batch_mode,// final boolean batch_mode,
batch_mode,// final boolean batch_mode,
fpixels,// final float [][] fpixels,
fpixels,// final float [][] fpixels,
...
@@ -323,6 +350,7 @@ public class CuasRanging {
...
@@ -323,6 +350,7 @@ public class CuasRanging {
debugLevel);// final int debugLevel)
debugLevel);// final int debugLevel)
if(clean_video){
if(clean_video){
cuasMotion.generateExtractFilterMovingTargets(// move parameters to clt_parameters
cuasMotion.generateExtractFilterMovingTargets(// move parameters to clt_parameters
radar_mode,// final boolean radar_mode,
true,// final boolean video_pass, // if clt_parameters.cuas_clean_video=true, video_pass=0 - output TIFFS, but no video. If video_pass==1 - only video with no debug
true,// final boolean video_pass, // if clt_parameters.cuas_clean_video=true, video_pass=0 - output TIFFS, but no video. If video_pass==1 - only video with no debug
"Read previously calculated non-conflict (one per tile) targets with disparities (recalculate ranges).");
"Read previously calculated non-conflict (one per tile) targets with disparities (recalculate ranges).");
gd.addCheckbox("Reuse combined series (Radar mode)",this.cuas_reuse_globals,
"Read target data updated after global processing of scene series \"CUAS Combine\" command. If successful, go directly to output generation with 16:9 and a radar image.");
@@ -6236,10 +6236,14 @@ public class OpticalFlow {
...
@@ -6236,10 +6236,14 @@ public class OpticalFlow {
CuasMotioncuasMotion=cuasRanging.detectTargets(
CuasMotioncuasMotion=cuasRanging.detectTargets(
uasLogReader,// UasLogReader uasLogReader,
uasLogReader,// UasLogReader uasLogReader,
batch_mode);// boolean batch_mode)
batch_mode);// boolean batch_mode)
if(cuasMotion==null){
System.out.println("Failed target detection. Probably, radar mode was selected but target file does not exist (created with \"CUAS Combine\" command)");