Commit d786d9fe authored by Andrey Filippov's avatar Andrey Filippov

Added support of command interruption.

parent 00746159
...@@ -1520,14 +1520,18 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -1520,14 +1520,18 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
String label = e.getActionCommand(); String label = e.getActionCommand();
if (label.equals("Abort")) { if (label.equals("Abort")) {
this.SYNC_COMMAND.stopRequested.set(1); this.SYNC_COMMAND.stopRequested.set(1);
this.SYNC_COMMAND.confirm = true;
return; return;
} else if (label.equals("Stop")) { } else if (label.equals("Stop")) {
this.SYNC_COMMAND.stopRequested.set(2); this.SYNC_COMMAND.stopRequested.set(2);
this.SYNC_COMMAND.confirm = true;
return; return;
} }
// System.out.println("actionPerformed: SwingUtilities.isEventDispatchThread()="+SwingUtilities.isEventDispatchThread()); // System.out.println("actionPerformed: SwingUtilities.isEventDispatchThread()="+SwingUtilities.isEventDispatchThread());
// executed in EDT, so no need to synchronize additionally? // executed in EDT, so no need to synchronize additionally?
if (this.SYNC_COMMAND.isRunning) { if (this.SYNC_COMMAND.isRunning) {
this.SYNC_COMMAND.interruptCommand();
/*
GenericDialog gd = new GenericDialog("Busy"); GenericDialog gd = new GenericDialog("Busy");
gd.addMessage("Command \"" + this.SYNC_COMMAND.buttonLabel + "\" is running. Ask it to stop " gd.addMessage("Command \"" + this.SYNC_COMMAND.buttonLabel + "\" is running. Ask it to stop "
+ ((this.SYNC_COMMAND.stopRequested.get() != 0) ? "(again!) " : "") + "(when possible)?"); + ((this.SYNC_COMMAND.stopRequested.get() != 0) ? "(again!) " : "") + "(when possible)?");
...@@ -1536,6 +1540,7 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -1536,6 +1540,7 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
if (gd.wasCanceled()) if (gd.wasCanceled())
return; return;
this.SYNC_COMMAND.stopRequested.set(gd.wasOKed() ? 1 : 2); this.SYNC_COMMAND.stopRequested.set(gd.wasOKed() ? 1 : 2);
*/
return; return;
} }
synchronized (this.SYNC_COMMAND) { synchronized (this.SYNC_COMMAND) {
...@@ -7742,7 +7747,9 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -7742,7 +7747,9 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
CLT_PARAMETERS.setRGBParameters(RGB_PARAMETERS); CLT_PARAMETERS.setRGBParameters(RGB_PARAMETERS);
try { try {
TWO_QUAD_CLT.batchLwirRig(QUAD_CLT, // QuadCLT quadCLT_main, TWO_QUAD_CLT.batchLwirRig(
SYNC_COMMAND, // SyncCommand sync_command,
QUAD_CLT, // QuadCLT quadCLT_main,
QUAD_CLT_AUX, // QuadCLT quadCLT_aux, QUAD_CLT_AUX, // QuadCLT quadCLT_aux,
CLT_PARAMETERS, // EyesisCorrectionParameters.DCTParameters dct_parameters, CLT_PARAMETERS, // EyesisCorrectionParameters.DCTParameters dct_parameters,
COLOR_PROC_PARAMETERS, // EyesisCorrectionParameters.ColorProcParameters colorProcParameters, COLOR_PROC_PARAMETERS, // EyesisCorrectionParameters.ColorProcParameters colorProcParameters,
...@@ -7829,6 +7836,7 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -7829,6 +7836,7 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
ColorProcParameters colorProcParameters = use_aux ? COLOR_PROC_PARAMETERS_AUX : COLOR_PROC_PARAMETERS; ColorProcParameters colorProcParameters = use_aux ? COLOR_PROC_PARAMETERS_AUX : COLOR_PROC_PARAMETERS;
try { try {
TWO_QUAD_CLT.TestInterScene( TWO_QUAD_CLT.TestInterScene(
SYNC_COMMAND, // SyncCommand sync_command,
// use_aux, // boolean is_aux, // use_aux, // boolean is_aux,
quadCLT, // QUAD_CLT, // QuadCLT quadCLT_main, quadCLT, // QUAD_CLT, // QuadCLT quadCLT_main,
// QUAD_CLT_AUX, // QuadCLT quadCLT_aux, // QUAD_CLT_AUX, // QuadCLT quadCLT_aux,
...@@ -7922,6 +7930,7 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -7922,6 +7930,7 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
try { try {
TwoQuadCLT.buildSeriesTQ( TwoQuadCLT.buildSeriesTQ(
SYNC_COMMAND, // SyncCommand sync_command,
cuas_proc_mode, // int cuas_proc_mode, // 0 - old, 1 combine scene series cuas_proc_mode, // int cuas_proc_mode, // 0 - old, 1 combine scene series
quadCLT, // QUAD_CLT, // QuadCLT quadCLT_main, quadCLT, // QUAD_CLT, // QuadCLT quadCLT_main,
-1, // int ref_index, -1, // int ref_index,
...@@ -8102,7 +8111,9 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -8102,7 +8111,9 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
QuadCLT quadCLT = use_aux ? QUAD_CLT_AUX : QUAD_CLT; QuadCLT quadCLT = use_aux ? QUAD_CLT_AUX : QUAD_CLT;
ColorProcParameters colorProcParameters = use_aux ? COLOR_PROC_PARAMETERS_AUX : COLOR_PROC_PARAMETERS; ColorProcParameters colorProcParameters = use_aux ? COLOR_PROC_PARAMETERS_AUX : COLOR_PROC_PARAMETERS;
try { try {
TWO_QUAD_CLT.TestInterLMA(quadCLT, // QUAD_CLT, // QuadCLT quadCLT_main, TWO_QUAD_CLT.TestInterLMA(
SYNC_COMMAND, // SyncCommand sync_command,
quadCLT, // QUAD_CLT, // QuadCLT quadCLT_main,
CLT_PARAMETERS, // EyesisCorrectionParameters.DCTParameters dct_parameters, CLT_PARAMETERS, // EyesisCorrectionParameters.DCTParameters dct_parameters,
colorProcParameters, // COLOR_PROC_PARAMETERS, //EyesisCorrectionParameters.ColorProcParameters colorProcParameters, // COLOR_PROC_PARAMETERS, //EyesisCorrectionParameters.ColorProcParameters
CHANNEL_GAINS_PARAMETERS, // CorrectionColorProc.ColorGainsParameters channelGainParameters, CHANNEL_GAINS_PARAMETERS, // CorrectionColorProc.ColorGainsParameters channelGainParameters,
...@@ -8187,7 +8198,9 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -8187,7 +8198,9 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
QuadCLT quadCLT = use_aux ? QUAD_CLT_AUX : QUAD_CLT; QuadCLT quadCLT = use_aux ? QUAD_CLT_AUX : QUAD_CLT;
ColorProcParameters colorProcParameters = use_aux ? COLOR_PROC_PARAMETERS_AUX : COLOR_PROC_PARAMETERS; ColorProcParameters colorProcParameters = use_aux ? COLOR_PROC_PARAMETERS_AUX : COLOR_PROC_PARAMETERS;
try { try {
TWO_QUAD_CLT.interPairsLMA(quadCLT, // QUAD_CLT, // QuadCLT quadCLT_main, TWO_QUAD_CLT.interPairsLMA(
SYNC_COMMAND, // SyncCommand sync_command,
quadCLT, // QUAD_CLT, // QuadCLT quadCLT_main,
CLT_PARAMETERS, // EyesisCorrectionParameters.DCTParameters dct_parameters, CLT_PARAMETERS, // EyesisCorrectionParameters.DCTParameters dct_parameters,
colorProcParameters, // COLOR_PROC_PARAMETERS, //EyesisCorrectionParameters.ColorProcParameters colorProcParameters, // COLOR_PROC_PARAMETERS, //EyesisCorrectionParameters.ColorProcParameters
CHANNEL_GAINS_PARAMETERS, // CorrectionColorProc.ColorGainsParameters channelGainParameters, CHANNEL_GAINS_PARAMETERS, // CorrectionColorProc.ColorGainsParameters channelGainParameters,
...@@ -8271,7 +8284,9 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -8271,7 +8284,9 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
QuadCLT quadCLT = use_aux ? QUAD_CLT_AUX : QUAD_CLT; QuadCLT quadCLT = use_aux ? QUAD_CLT_AUX : QUAD_CLT;
ColorProcParameters colorProcParameters = use_aux ? COLOR_PROC_PARAMETERS_AUX : COLOR_PROC_PARAMETERS; ColorProcParameters colorProcParameters = use_aux ? COLOR_PROC_PARAMETERS_AUX : COLOR_PROC_PARAMETERS;
try { try {
TWO_QUAD_CLT.interSeriesLMA(quadCLT, // QUAD_CLT, // QuadCLT quadCLT_main, TWO_QUAD_CLT.interSeriesLMA(
SYNC_COMMAND, // SyncCommand sync_command,
quadCLT, // QUAD_CLT, // QuadCLT quadCLT_main,
-1, // int ref_index, -1, // int ref_index,
0, // int ref_step, 0, // int ref_step,
CLT_PARAMETERS, // EyesisCorrectionParameters.DCTParameters dct_parameters, CLT_PARAMETERS, // EyesisCorrectionParameters.DCTParameters dct_parameters,
...@@ -8358,7 +8373,9 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -8358,7 +8373,9 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
QuadCLT quadCLT = use_aux ? QUAD_CLT_AUX : QUAD_CLT; QuadCLT quadCLT = use_aux ? QUAD_CLT_AUX : QUAD_CLT;
ColorProcParameters colorProcParameters = use_aux ? COLOR_PROC_PARAMETERS_AUX : COLOR_PROC_PARAMETERS; ColorProcParameters colorProcParameters = use_aux ? COLOR_PROC_PARAMETERS_AUX : COLOR_PROC_PARAMETERS;
try { try {
TWO_QUAD_CLT.intersceneAccumulate(quadCLT, // QUAD_CLT, // QuadCLT quadCLT_main, TWO_QUAD_CLT.intersceneAccumulate(
SYNC_COMMAND, // SyncCommand sync_command,
quadCLT, // QUAD_CLT, // QuadCLT quadCLT_main,
CLT_PARAMETERS, // EyesisCorrectionParameters.DCTParameters dct_parameters, CLT_PARAMETERS, // EyesisCorrectionParameters.DCTParameters dct_parameters,
colorProcParameters, // COLOR_PROC_PARAMETERS, //EyesisCorrectionParameters.ColorProcParameters colorProcParameters, // COLOR_PROC_PARAMETERS, //EyesisCorrectionParameters.ColorProcParameters
CHANNEL_GAINS_PARAMETERS, // CorrectionColorProc.ColorGainsParameters channelGainParameters, CHANNEL_GAINS_PARAMETERS, // CorrectionColorProc.ColorGainsParameters channelGainParameters,
...@@ -8442,6 +8459,7 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -8442,6 +8459,7 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
ColorProcParameters colorProcParameters = use_aux ? COLOR_PROC_PARAMETERS_AUX : COLOR_PROC_PARAMETERS; ColorProcParameters colorProcParameters = use_aux ? COLOR_PROC_PARAMETERS_AUX : COLOR_PROC_PARAMETERS;
try { try {
TWO_QUAD_CLT.interIntraExportML( TWO_QUAD_CLT.interIntraExportML(
SYNC_COMMAND, // SyncCommand sync_command,
quadCLT, // QuadCLT quadCLT_main, quadCLT, // QuadCLT quadCLT_main,
-1, // use last // int indx_ref, // = num_scenes - 1; -1, // use last // int indx_ref, // = num_scenes - 1;
0, // int ref_step, 0, // int ref_step,
...@@ -8528,7 +8546,9 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -8528,7 +8546,9 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
try { try {
if (batch_noise) { if (batch_noise) {
TWO_QUAD_CLT.intersceneNoiseBatch(quadCLT, // QuadCLT quadCLT_main, TWO_QUAD_CLT.intersceneNoiseBatch(
SYNC_COMMAND, // SyncCommand sync_command,
quadCLT, // QuadCLT quadCLT_main,
CLT_PARAMETERS, // EyesisCorrectionParameters.DCTParameters dct_parameters, CLT_PARAMETERS, // EyesisCorrectionParameters.DCTParameters dct_parameters,
colorProcParameters, // EyesisCorrectionParameters.ColorProcParameters colorProcParameters, colorProcParameters, // EyesisCorrectionParameters.ColorProcParameters colorProcParameters,
CHANNEL_GAINS_PARAMETERS, // CorrectionColorProc.ColorGainsParameters channelGainParameters, CHANNEL_GAINS_PARAMETERS, // CorrectionColorProc.ColorGainsParameters channelGainParameters,
...@@ -8540,7 +8560,9 @@ public class Eyesis_Correction implements PlugIn, ActionListener { ...@@ -8540,7 +8560,9 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
UPDATE_STATUS, // final boolean updateStatus, UPDATE_STATUS, // final boolean updateStatus,
DEBUG_LEVEL); DEBUG_LEVEL);
} else { } else {
TWO_QUAD_CLT.intersceneNoise(quadCLT, // QuadCLT quadCLT_main, TWO_QUAD_CLT.intersceneNoise(
SYNC_COMMAND, // SyncCommand sync_command,
quadCLT, // QuadCLT quadCLT_main,
CLT_PARAMETERS, // EyesisCorrectionParameters.DCTParameters dct_parameters, CLT_PARAMETERS, // EyesisCorrectionParameters.DCTParameters dct_parameters,
colorProcParameters, // EyesisCorrectionParameters.ColorProcParameters colorProcParameters, colorProcParameters, // EyesisCorrectionParameters.ColorProcParameters colorProcParameters,
CHANNEL_GAINS_PARAMETERS, // CorrectionColorProc.ColorGainsParameters channelGainParameters, CHANNEL_GAINS_PARAMETERS, // CorrectionColorProc.ColorGainsParameters channelGainParameters,
......
...@@ -2,8 +2,48 @@ package com.elphel.imagej.correction; ...@@ -2,8 +2,48 @@ package com.elphel.imagej.correction;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import com.elphel.imagej.common.GenericJTabbedDialog;
public class SyncCommand { public class SyncCommand {
public static final int STOP_NO = 0;
public static final int STOP_ASAP = 1;
public static final int STOP_CONVENIENT = 2;
public boolean isRunning = false; public boolean isRunning = false;
public AtomicInteger stopRequested = new AtomicInteger(0); // 0 - not requested, 1 - ASAP, 2 - gracefully public AtomicInteger stopRequested = new AtomicInteger(0); // 0 - not requested, 1 - ASAP, 2 - gracefully
public String buttonLabel = ""; public String buttonLabel = "";
public boolean confirm = true;
public boolean interruptCommand() {
boolean asap = false;
GenericJTabbedDialog gd = new GenericJTabbedDialog("Interrupt Command",600,300);
gd.addCheckbox ("Ask for confirmation", this.confirm,
"If checked, program will pause at a checkpoint allowing to cancel the stop request and continue.");
gd.addCheckbox ("ASAP", asap,
"Stop ASAP. If uncheked, stop at more convenient stage.");
gd.showDialog();
if (gd.wasCanceled())
return false;
this.confirm= gd.getNextBoolean();
this.stopRequested.set(gd.getNextBoolean() ? STOP_ASAP : STOP_CONVENIENT );
return true;
}
public boolean stopNow(boolean convenient) {
if (stopRequested.get()==STOP_NO){
return false;
}
//if (stopRequested.get() ==)
if (!convenient && (stopRequested.get()==STOP_CONVENIENT)) {
return false;
}
if (!confirm) {
return true;
}
GenericJTabbedDialog gd = new GenericJTabbedDialog("Stop requested, "+(convenient?"convenient point":"ASAP point"),600,300);
gd.addMessage ("OK to stop, Cancel to continue");
stopRequested.set(STOP_NO); // reset pending stop in any case.
gd.showDialog();
if (gd.wasCanceled())
return false;
return true;
}
} }
\ No newline at end of file
...@@ -225,7 +225,8 @@ public class GroundPlane { ...@@ -225,7 +225,8 @@ public class GroundPlane {
final int debugLevel) { final int debugLevel) {
final boolean [] good_tiles = new boolean[ref_scene.getTilesX()*ref_scene.getTilesY()]; final boolean [] good_tiles = new boolean[ref_scene.getTilesX()*ref_scene.getTilesY()];
String dbg_title =ref_scene.getImageName()+"-ground_tilts"; // String dbg_title =ref_scene.getImageName()+"-ground_tilts";
String dbg_title ="-ground_tilts";
double [][] to_ground_xyzatr_frac= getPlaneDualPassMetric( // returns to_ground_xyzatr (rotated around the ground point nadir of teh drone) double [][] to_ground_xyzatr_frac= getPlaneDualPassMetric( // returns to_ground_xyzatr (rotated around the ground point nadir of teh drone)
clt_parameters, // final CLTParameters clt_parameters, clt_parameters, // final CLTParameters clt_parameters,
ref_scene, // final QuadCLT ref_Clt, ref_scene, // final QuadCLT ref_Clt,
...@@ -237,7 +238,6 @@ public class GroundPlane { ...@@ -237,7 +238,6 @@ public class GroundPlane {
if (to_ground_xyzatr_frac == null) { if (to_ground_xyzatr_frac == null) {
to_ground_xyzatr_frac = new double [][] {new double[3], new double[3], new double[1]}; to_ground_xyzatr_frac = new double [][] {new double[3], new double[3], new double[1]};
} }
// To get terrain disparity (until rotation is fixed) use "good_tiles" from getPlaneDualPassMetric and re-calculate ground disparity plane // To get terrain disparity (until rotation is fixed) use "good_tiles" from getPlaneDualPassMetric and re-calculate ground disparity plane
double [][] to_ground_xyzatr = {to_ground_xyzatr_frac[0],to_ground_xyzatr_frac[1]}; double [][] to_ground_xyzatr = {to_ground_xyzatr_frac[0],to_ground_xyzatr_frac[1]};
...@@ -254,18 +254,6 @@ public class GroundPlane { ...@@ -254,18 +254,6 @@ public class GroundPlane {
dbg_title+"-disp", // final String dbg_title, dbg_title+"-disp", // final String dbg_title,
debugLevel); // final int debugLevel) debugLevel); // final int debugLevel)
/*
double [] disparity_plane = getDisparityPlaneDualPass( // returns to_ground_xyzatr (rotated around the ground point nadir of the drone)
clt_parameters, // final CLTParameters clt_parameters,
ref_scene, // final QuadCLT ref_Clt,
ref_scene.getTilesX(),// final int width,
good_tiles, // final boolean [] good_tiles, // null or boolean[data.length] // should all be false
gnd_disp, // final double [] gnd_disp, // if not null
dbg_title+"-disp", // final String dbg_title,
debugLevel); // final int debugLevel)
*/
return new GroundPlane( return new GroundPlane(
to_ground_xyzatr, // double [][] to_ground_xyzatr, to_ground_xyzatr, // double [][] to_ground_xyzatr,
disparity_plane, // double [] disparity_plane, disparity_plane, // double [] disparity_plane,
...@@ -274,8 +262,6 @@ public class GroundPlane { ...@@ -274,8 +262,6 @@ public class GroundPlane {
ref_scene.getQEnu()); // double [] quat_enu) { ref_scene.getQEnu()); // double [] quat_enu) {
} }
public static double [][] getPlaneDualPassMetric( // returns to_ground_xyzatr (rotated around the ground point nadir of teh drone) public static double [][] getPlaneDualPassMetric( // returns to_ground_xyzatr (rotated around the ground point nadir of teh drone)
final CLTParameters clt_parameters, final CLTParameters clt_parameters,
final QuadCLT ref_Clt, final QuadCLT ref_Clt,
...@@ -547,19 +533,43 @@ public class GroundPlane { ...@@ -547,19 +533,43 @@ public class GroundPlane {
double [][] virtual_camera_from_camera = ErsCorrection.combineXYZATR(ground_xyzatr, virtual_camera_from_ground_xyz); double [][] virtual_camera_from_camera = ErsCorrection.combineXYZATR(ground_xyzatr, virtual_camera_from_ground_xyz);
// FIXME: Next is correct (at least approximately, "-"/invert, order,), find out why // FIXME: Next is correct (at least approximately, "-"/invert, order,), find out why
System.out.println("FIXME: Inverted X, Y, kept Z, and ATR. Find out why."); System.out.println("FIXME: Inverted X, Y, kept Z, and ATR. Find out why.");
// double [][] vcfs_test = {
// {-virtual_camera_from_camera[0][0], -virtual_camera_from_camera[0][1], virtual_camera_from_camera[0][2]},
// { virtual_camera_from_camera[1][0], virtual_camera_from_camera[1][1], virtual_camera_from_camera[1][2]}};
double [][] vcfs_test = { double [][] vcfs_test = {
{-virtual_camera_from_camera[0][0], -virtual_camera_from_camera[0][1], virtual_camera_from_camera[0][2]}, {virtual_camera_from_camera[0][0], virtual_camera_from_camera[0][1], virtual_camera_from_camera[0][2]},
{ virtual_camera_from_camera[1][0], virtual_camera_from_camera[1][1], virtual_camera_from_camera[1][2]}}; { to_ground_xyzatr[1][0], to_ground_xyzatr[1][1], to_ground_xyzatr[1][2]}};
if ((dbg_title != null) || (gnd_disp != null)) { if ((dbg_title != null) || (gnd_disp != null)) {
// expand macrotiles results to match tiles // expand macrotiles results to match tiles
// rotate ref_disparity and show // rotate ref_disparity and show
/*
double [][] pXpYD_ground = OpticalFlow.transformToScenePxPyD( double [][] pXpYD_ground = OpticalFlow.transformToScenePxPyD(
null, // final Rectangle full_woi_in, // show larger than sensor WOI (or null) IN TILES null, // final Rectangle full_woi_in, // show larger than sensor WOI (or null) IN TILES
ref_disparity, // final double [] disparity_ref, // invalid tiles - NaN in disparity ref_disparity, // final double [] disparity_ref, // invalid tiles - NaN in disparity
vcfs_test, // virtual_camera_from_camera,// final double [][] scene_xyzatr, // camera center in world coordinates, camera orientation relative to world frame vcfs_test, // virtual_camera_from_camera,// final double [][] scene_xyzatr, // camera center in world coordinates, camera orientation relative to world frame
ref_Clt); // final QuadCLT scene_QuadClt) ref_Clt); // final QuadCLT scene_QuadClt)
*/
double [][] fgnd_pXpYD = OpticalFlow.refDisparityFromGroundDisparity(
ref_disparity, // final double [] ground_disparity,
vcfs_test, // final double [][] ground_xyzatr,
ref_Clt); //final QuadCLT ref_scene)
double [][] pXpYD_ground = OpticalFlow.transformToScenePxPyD(
fgnd_pXpYD, // final double [][] reference_pXpYD,// invalid tiles - NaN in disparity. Should be no nulls, no NaN disparity
ground_xyzatr[0], // final double [] scene_xyz, // camera center in world (reference) coordinates
ground_xyzatr[1], // final double [] scene_atr, // camera orientation relative to world (reference) frame
ref_Clt, // final QuadCLT reference_QuadClt) //
null); // final QuadCLT scene_QuadClt) //
/*
ref_pXpYD = OpticalFlow.transformToScenePxPyD(
fgnd_pXpYD, // final double [][] reference_pXpYD,// invalid tiles - NaN in disparity. Should be no nulls, no NaN disparity
ground_xyzatr[0], // final double [] scene_xyz, // camera center in world (reference) coordinates
ground_xyzatr[1], // final double [] scene_atr, // camera orientation relative to world (reference) frame
ref_scene, // final QuadCLT reference_QuadClt) //
null); // final QuadCLT scene_QuadClt) //
*/
double [] gnd_disparity = (gnd_disp != null) ? gnd_disp.clone() : new double [ref_disparity.length]; double [] gnd_disparity = (gnd_disp != null) ? gnd_disp.clone() : new double [ref_disparity.length];
Arrays.fill(gnd_disparity, Double.NaN); Arrays.fill(gnd_disparity, Double.NaN);
for (int i = 0; i <ref_disparity.length; i++) { for (int i = 0; i <ref_disparity.length; i++) {
......
...@@ -5437,6 +5437,8 @@ LogTee.clearSceneLog(); // stop per‑scene logging ...@@ -5437,6 +5437,8 @@ LogTee.clearSceneLog(); // stop per‑scene logging
} catch (IOException e) { } catch (IOException e) {
System.err.println("startLogging(): failed to start logging to "+x3d_path); System.err.println("startLogging(): failed to start logging to "+x3d_path);
} // when you want to start per‑scene logging } // when you want to start per‑scene logging
System.out.println("\n***** STARTING LOGGING: "+
(new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(Calendar.getInstance().getTime())+" *****\n"));
} }
public void stopLogging() { public void stopLogging() {
......
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