Commit 347ad4b0 authored by Andrey Filippov's avatar Andrey Filippov

Added CT scan, fixed average slice

parent 9982a7ba
...@@ -1089,6 +1089,7 @@ public class GroundPlane { ...@@ -1089,6 +1089,7 @@ public class GroundPlane {
final CLTParameters clt_parameters, final CLTParameters clt_parameters,
final QuadCLT ref_Clt, final QuadCLT ref_Clt,
final boolean tilted_plane, // if true, use tilted ground plane. If false - use horizontal plane and apply rotation final boolean tilted_plane, // if true, use tilted ground plane. If false - use horizontal plane and apply rotation
final double offset,
final double test_bottom, final double test_bottom,
final int debugLevel) { final int debugLevel) {
...@@ -1103,7 +1104,7 @@ public class GroundPlane { ...@@ -1103,7 +1104,7 @@ public class GroundPlane {
return null; return null;
} }
double [][] ground_xyzatr = ErsCorrection.invertXYZATR(to_ground_xyzatr); // straight down from the camera, then rotated double [][] ground_xyzatr = ErsCorrection.invertXYZATR(to_ground_xyzatr); // straight down from the camera, then rotated
double altitude = ground_xyzatr[0][2]; double altitude = ground_xyzatr[0][2] - offset; // offset to the ground level (negative)
double true_disparity = ref_Clt.getGeometryCorrection().getDisparityFromZ(-altitude); double true_disparity = ref_Clt.getGeometryCorrection().getDisparityFromZ(-altitude);
double corrected_disparity = true_disparity+ref_Clt.getDispInfinityRef(); double corrected_disparity = true_disparity+ref_Clt.getDispInfinityRef();
int tilesX = ref_Clt.getTilesX(); int tilesX = ref_Clt.getTilesX();
......
...@@ -1068,6 +1068,15 @@ min_str_neib_fpn 0.35 ...@@ -1068,6 +1068,15 @@ min_str_neib_fpn 0.35
public int fgnd_min_macro_tiles = 3; // Minimal number of macrotiles for high outliers. Minimal number of remaining macrotiles before removing high outpliers. public int fgnd_min_macro_tiles = 3; // Minimal number of macrotiles for high outliers. Minimal number of remaining macrotiles before removing high outpliers.
public double fgnd_normal_damping = 0.001; // Damping parameter for planes. Pull planes to horizontal when there is not enough data for tilts. public double fgnd_normal_damping = 0.001; // Damping parameter for planes. Pull planes to horizontal when there is not enough data for tilts.
public boolean fgnd_gen_optho = true; // generate orthogonal to the ground view
public boolean fgnd_gen_tilted = true; // generate tilted ground disparity view
public boolean fgnd_gen_scan = false; // generate "CT scan" views
public double fgnd_ct_low = -1.0; // lowest CT level relative to the ground
public double fgnd_ct_high = 1.0; // highest CT level relative to the ground
public double fgnd_ct_step = 0.2; // CT step
// TODO: move next parameters elsewhere - they are not the motion blur ones. // TODO: move next parameters elsewhere - they are not the motion blur ones.
public int mb_gain_index_pose = 5; // pose readjust pass to switch to full mb_max_gain from mb_max_gain_inter public int mb_gain_index_pose = 5; // pose readjust pass to switch to full mb_max_gain from mb_max_gain_inter
public int mb_gain_index_depth = 5; // depth map refine pass (SfM) to switch to full mb_max_gain from mb_max_gain_inter public int mb_gain_index_depth = 5; // depth map refine pass (SfM) to switch to full mb_max_gain from mb_max_gain_inter
...@@ -3139,6 +3148,19 @@ min_str_neib_fpn 0.35 ...@@ -3139,6 +3148,19 @@ min_str_neib_fpn 0.35
gd.addMessage ("Common to all plane fitting"); gd.addMessage ("Common to all plane fitting");
gd.addNumericField("Damping parameter for planes", this.fgnd_normal_damping, 5,7,"", gd.addNumericField("Damping parameter for planes", this.fgnd_normal_damping, 5,7,"",
"Pull planes to horizontal when there is not enough data for tilts."); "Pull planes to horizontal when there is not enough data for tilts.");
gd.addMessage ("Output files generation related to ground planes");
gd.addCheckbox ("Generate orthogonal to the ground view", this.fgnd_gen_optho,
"Generate relative to the ground plane view, minimizing anisotropic distortions.");
gd.addCheckbox ("Generate tilted-ground view", this.fgnd_gen_tilted,
"Generate view in the same directionm as the camera reference scene with tilted disparity matchin ground plane.");
gd.addCheckbox ("Generate \"CT scan\" view", this.fgnd_gen_scan,
"Generate multiple views vith varying offset to the ground plane view.");
gd.addNumericField("CT scan low level", this.fgnd_ct_low, 5,7,"m",
"Lowest scan level relative to the ground plane.");
gd.addNumericField("CT scan high level", this.fgnd_ct_high, 5,7,"m",
"Highest scan level relative to the ground plane.");
gd.addNumericField("CT scan step", this.fgnd_ct_step, 5,7,"m",
"CT scan step.");
gd.addTab("LMA sequence","Interscene LMA sequence control"); gd.addTab("LMA sequence","Interscene LMA sequence control");
gd.addMessage("Parameters for control of the LMA pose adjustment sequence"); gd.addMessage("Parameters for control of the LMA pose adjustment sequence");
...@@ -4451,6 +4473,13 @@ min_str_neib_fpn 0.35 ...@@ -4451,6 +4473,13 @@ min_str_neib_fpn 0.35
this.fgnd_min_macro_tiles=(int) gd.getNextNumber(); this.fgnd_min_macro_tiles=(int) gd.getNextNumber();
this.fgnd_normal_damping = gd.getNextNumber(); this.fgnd_normal_damping = gd.getNextNumber();
this.fgnd_gen_optho = gd.getNextBoolean();
this.fgnd_gen_tilted = gd.getNextBoolean();
this.fgnd_gen_scan = gd.getNextBoolean();
this.fgnd_ct_low = gd.getNextNumber();
this.fgnd_ct_high = gd.getNextNumber();
this.fgnd_ct_step = gd.getNextNumber();
this.mb_gain_index_pose = (int) gd.getNextNumber(); this.mb_gain_index_pose = (int) gd.getNextNumber();
this.mb_gain_index_depth =(int) gd.getNextNumber(); this.mb_gain_index_depth =(int) gd.getNextNumber();
...@@ -5654,6 +5683,13 @@ min_str_neib_fpn 0.35 ...@@ -5654,6 +5683,13 @@ min_str_neib_fpn 0.35
properties.setProperty(prefix+"fgnd_min_macro_tiles", this.fgnd_min_macro_tiles+"");// int properties.setProperty(prefix+"fgnd_min_macro_tiles", this.fgnd_min_macro_tiles+"");// int
properties.setProperty(prefix+"fgnd_normal_damping", this.fgnd_normal_damping+""); // double properties.setProperty(prefix+"fgnd_normal_damping", this.fgnd_normal_damping+""); // double
properties.setProperty(prefix+"fgnd_gen_optho", this.fgnd_gen_optho+""); // boolean
properties.setProperty(prefix+"fgnd_gen_tilted", this.fgnd_gen_tilted+""); // boolean
properties.setProperty(prefix+"fgnd_gen_scan", this.fgnd_gen_scan+""); // boolean
properties.setProperty(prefix+"fgnd_ct_low", this.fgnd_ct_low+""); // double
properties.setProperty(prefix+"fgnd_ct_high", this.fgnd_ct_high+""); // double
properties.setProperty(prefix+"fgnd_ct_step", this.fgnd_ct_step+""); // double
properties.setProperty(prefix+"mb_gain_index_pose", this.mb_gain_index_pose+""); // int properties.setProperty(prefix+"mb_gain_index_pose", this.mb_gain_index_pose+""); // int
properties.setProperty(prefix+"mb_gain_index_depth", this.mb_gain_index_depth+""); // int properties.setProperty(prefix+"mb_gain_index_depth", this.mb_gain_index_depth+""); // int
...@@ -6841,6 +6877,13 @@ min_str_neib_fpn 0.35 ...@@ -6841,6 +6877,13 @@ min_str_neib_fpn 0.35
if (properties.getProperty(prefix+"fgnd_min_macro_tiles")!=null) this.fgnd_min_macro_tiles=Integer.parseInt(properties.getProperty(prefix+"fgnd_min_macro_tiles")); if (properties.getProperty(prefix+"fgnd_min_macro_tiles")!=null) this.fgnd_min_macro_tiles=Integer.parseInt(properties.getProperty(prefix+"fgnd_min_macro_tiles"));
if (properties.getProperty(prefix+"fgnd_normal_damping")!=null) this.fgnd_normal_damping=Double.parseDouble(properties.getProperty(prefix+"fgnd_normal_damping")); if (properties.getProperty(prefix+"fgnd_normal_damping")!=null) this.fgnd_normal_damping=Double.parseDouble(properties.getProperty(prefix+"fgnd_normal_damping"));
if (properties.getProperty(prefix+"fgnd_gen_optho")!=null) this.fgnd_gen_optho=Boolean.parseBoolean(properties.getProperty(prefix+"fgnd_gen_optho"));
if (properties.getProperty(prefix+"fgnd_gen_tilted")!=null) this.fgnd_gen_tilted=Boolean.parseBoolean(properties.getProperty(prefix+"fgnd_gen_tilted"));
if (properties.getProperty(prefix+"fgnd_gen_scan")!=null) this.fgnd_gen_scan=Boolean.parseBoolean(properties.getProperty(prefix+"fgnd_gen_scan"));
if (properties.getProperty(prefix+"fgnd_ct_low")!=null) this.fgnd_ct_low=Double.parseDouble(properties.getProperty(prefix+"fgnd_ct_low"));
if (properties.getProperty(prefix+"fgnd_ct_high")!=null) this.fgnd_ct_high=Double.parseDouble(properties.getProperty(prefix+"fgnd_ct_high"));
if (properties.getProperty(prefix+"fgnd_ct_step")!=null) this.fgnd_ct_step=Double.parseDouble(properties.getProperty(prefix+"fgnd_ct_step"));
if (properties.getProperty(prefix+"mb_gain_index_pose")!=null) this.mb_gain_index_pose=Integer.parseInt(properties.getProperty(prefix+"mb_gain_index_pose")); if (properties.getProperty(prefix+"mb_gain_index_pose")!=null) this.mb_gain_index_pose=Integer.parseInt(properties.getProperty(prefix+"mb_gain_index_pose"));
if (properties.getProperty(prefix+"mb_ers_index")!=null) this.mb_ers_index=Integer.parseInt(properties.getProperty(prefix+"mb_ers_index")); if (properties.getProperty(prefix+"mb_ers_index")!=null) this.mb_ers_index=Integer.parseInt(properties.getProperty(prefix+"mb_ers_index"));
if (properties.getProperty(prefix+"mb_ers_y_index")!=null) this.mb_ers_y_index=Integer.parseInt(properties.getProperty(prefix+"mb_ers_y_index")); if (properties.getProperty(prefix+"mb_ers_y_index")!=null) this.mb_ers_y_index=Integer.parseInt(properties.getProperty(prefix+"mb_ers_y_index"));
...@@ -8005,6 +8048,13 @@ min_str_neib_fpn 0.35 ...@@ -8005,6 +8048,13 @@ min_str_neib_fpn 0.35
imp.fgnd_min_macro_tiles = this.fgnd_min_macro_tiles; imp.fgnd_min_macro_tiles = this.fgnd_min_macro_tiles;
imp.fgnd_normal_damping = this.fgnd_normal_damping; imp.fgnd_normal_damping = this.fgnd_normal_damping;
imp.fgnd_gen_optho = this.fgnd_gen_optho;
imp.fgnd_gen_tilted = this.fgnd_gen_tilted;
imp.fgnd_gen_scan = this.fgnd_gen_scan;
imp.fgnd_ct_low = this.fgnd_ct_low;
imp.fgnd_ct_high = this.fgnd_ct_high;
imp.fgnd_ct_step = this.fgnd_ct_step;
imp.mb_gain_index_pose = this.mb_gain_index_pose; imp.mb_gain_index_pose = this.mb_gain_index_pose;
imp.mb_gain_index_depth = this.mb_gain_index_depth; imp.mb_gain_index_depth = this.mb_gain_index_depth;
......
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