@@ -128,6 +128,9 @@ public class BiQuadParameters {
...
@@ -128,6 +128,9 @@ public class BiQuadParameters {
publicdoublepf_boost_low_density=0.8;// Strength assigned to fake tiles from neighbors (the lower - the higher)
publicdoublepf_boost_low_density=0.8;// Strength assigned to fake tiles from neighbors (the lower - the higher)
// Apply when filling gaps, not when growing
// Apply when filling gaps, not when growing
// 9, // clt_parameters.rig.pf_smpl_radius, // smpl_radius, // int smpl_radius,
publicintpf_fourq_radius=9;// How far to look for a plane for the final pass with 4-corners support
publicintpf_fourq_min=1;// Each of the 4 corners should have at least this number of tiles.
publicintpf_fourq_min=1;// Each of the 4 corners should have at least this number of tiles.
publicintpf_fourq_gap=1;// Symmetrical vertical and horizontal center areas that do not belong to any corner
publicintpf_fourq_gap=1;// Symmetrical vertical and horizontal center areas that do not belong to any corner
...
@@ -165,6 +168,25 @@ public class BiQuadParameters {
...
@@ -165,6 +168,25 @@ public class BiQuadParameters {
publicintltavg_max_iter=20;//
publicintltavg_max_iter=20;//
publicdoubleltavg_min_change=0.01;//
publicdoubleltavg_min_change=0.01;//
publicintltavg_ref_smpl_radius=11;// final int smpl_radius,
publicintltavg_ref_smpl_num=40;// final int smpl_num_narrow, // = 3; // Number after removing worst (should be >1)
publicdoubleltavg_ref_max_adiff=0.15;// final double max_adiff, // Maximal absolute difference between the center tile and friends
publicdoubleltavg_ref_max_rdiff=0.04;// final double max_rdiff, // Maximal relative difference between the center tile and friends
publicdoubleltavg_ref_smpl_arms=0.1;// final double smpl_arms, // = 0.1; // Maximal RMS of the remaining tiles in a sample
publicdoubleltavg_ref_smpl_rrms=0.01;// final double smpl_rrms, // = 0.005; // Maximal RMS/disparity in addition to smplRms
publicintltavg_num_lt_refine=20;// Maximal number of iterations with averaged low textures
publicdoubleltavg_strong_tol=0.3;// When combining normal measurements with low texture/correlation averaging use strong normal if they are close to averaged
publicdoubleltavg_weak_tol=0.1;// When combining normal measurements with low texture/correlation averaging use weak normal if they are close to averaged
// expand lt horizontally if it ends with the same or nearer
publicbooleanltavg_expand_lt=true;
publicintltavg_expand_dist=4;
publicdoubleltavg_expand_tol=0.15;// expand LT right and left if it ends with same or nearer tile
publicdoubleltavg_expand_floor=0.5;// multiply single-tile strength floor for correlation-average
publicintltavg_expand_sample_num=5;// minimal number of samples in expansion mode
// Rig ltfar - recovering far objects that could not be resolved with just a single quad camera
// Rig ltfar - recovering far objects that could not be resolved with just a single quad camera
publicbooleanltfar_en=true;// Enable recovering far objects over infinity area
publicbooleanltfar_en=true;// Enable recovering far objects over infinity area
publicbooleanltfar_auto_floor=true;// Automatically detect strength floor (false - use (lt_trusted_strength*lt_strength_rfloor)
publicbooleanltfar_auto_floor=true;// Automatically detect strength floor (false - use (lt_trusted_strength*lt_strength_rfloor)
...
@@ -410,6 +432,8 @@ public class BiQuadParameters {
...
@@ -410,6 +432,8 @@ public class BiQuadParameters {
gd.addNumericField("Strength assigned to fake tiles from neighbors (the lower - the higher)",this.pf_boost_low_density,4,6,"pix",
gd.addNumericField("Strength assigned to fake tiles from neighbors (the lower - the higher)",this.pf_boost_low_density,4,6,"pix",
"Returned strength assigned to the tiles increases with this value - seems to be a bug");
"Returned strength assigned to the tiles increases with this value - seems to be a bug");
gd.addNumericField("How far to look for a plane for the final pass with 4-corners support",this.pf_fourq_radius,0,3,"",
"Plane fitting half-width during filling gaps with tiles required in four corners (to avoid extending areas, only fill inside)");
gd.addNumericField("Each of the 4 corners should have at least this number of tiles",this.pf_fourq_min,0,3,"",
gd.addNumericField("Each of the 4 corners should have at least this number of tiles",this.pf_fourq_min,0,3,"",
"Apply (>0) only for filling gaps, not during expansion. It requires that every of the 4 corners of the sample square has this number of tiles for a plane");
"Apply (>0) only for filling gaps, not during expansion. It requires that every of the 4 corners of the sample square has this number of tiles for a plane");
...
@@ -476,6 +500,38 @@ public class BiQuadParameters {
...
@@ -476,6 +500,38 @@ public class BiQuadParameters {
"Safety limit for smoothing iterations ");
"Safety limit for smoothing iterations ");
gd.addNumericField("Minimal disparity change to continue smoothing",this.ltavg_min_change,4,6,"pix","");
gd.addNumericField("Minimal disparity change to continue smoothing",this.ltavg_min_change,4,6,"pix","");
gd.addNumericField("How far to extend around a tile when refining averaging correlation measuremnts by planes ",this.ltavg_ref_smpl_radius,0,3,"tiles",
"Process a aquare centered at the current tile withthe side of twice this value plus 1 (2*pf_smpl_radius + 1)");
gd.addNumericField("Number after remaining in the sample square after removing worst fitting tiles",this.ltavg_ref_smpl_num,0,3,"",
"When fitting planes the outliers are removed until the number of remaining tiles equals this value");
gd.addNumericField("Maximal absolute disparity difference between the plane and tiles that fit",this.ltavg_ref_max_adiff,4,6,"pix",
"Maximal absolute disparity difference for fitting. Combined with the next one (relative) ");
gd.addNumericField("Maximal relative (to center disparity) difference between the plane and tiles that fit",this.ltavg_ref_max_rdiff,4,6,"pix/pix",
"This value is multipled by the tile disparity and added to the maximal absolute difference");
gd.addNumericField("Maximal absolute RMS of the remaining tiles in a sample",this.ltavg_ref_smpl_arms,4,6,"pix",
"After removing outliers RMS of the remaining tiles must be less than this value");
gd.addNumericField("Maximal relative (to center disparity) RMS of the remaining tiles in a sample",this.ltavg_ref_smpl_rrms,4,6,"pix/pix",
"Relative RMS times disparity is added to the absolute one");
gd.addNumericField("Maximal number of low texture/averaging correlation passes",this.ltavg_num_lt_refine,0,3,"",
"Will also exit when maximal tile disparity change falls below ltavg_min_change (..continue smoothing above)");
gd.addNumericField("Strong tile difference to averaged to be accepted",this.ltavg_strong_tol,4,6,"pix",
"When combining normal measurements with low texture/correlation averaging use strong normal if they are close to averaged");
gd.addNumericField("Weak trusted tile difference to averaged to be accepted",this.ltavg_weak_tol,4,6,"pix",
"When combining normal measurements with low texture/correlation averaging use weak normal if they are close to averaged");
gd.addCheckbox("Try to expand low-texture areas right and left if it borders with same or nearer",this.ltavg_expand_lt,
"Slightly expand (mostly pavement) if there is FG object near");
gd.addNumericField("How far to extend LT area",this.ltavg_expand_dist,0,3,"",
"Consider empty tiles within this distance from the LT processed area");
gd.addNumericField("The limit tiles should not be farther then extended by more than this value",this.ltavg_expand_tol,4,6,"pix",
"Expand LT area horizonatally until it meets non-empty tile if that tile is closer or at the same (to this tolerance) distance");
gd.addNumericField("Fraction of single-tile correlation strength floor for averaged correlation",this.ltavg_expand_floor,4,6,"",
"Strength floor for averaging corre;ation relative to the single-tile correlation");
gd.addNumericField("Number after remaining in the sample during final expansion of LT area",this.ltavg_expand_sample_num,0,3,"",
"Small absoute number is OK here (may overlap with just a quater of teh sample square. This nuber will be combined with fraction of all defined tiles in a sample square");
gd.addTab("Rig Far","Parameters related to the ML files generation for the dual-quad camera rig");
gd.addTab("Rig Far","Parameters related to the ML files generation for the dual-quad camera rig");
gd.addCheckbox("Enable recovering far objects over infinity area",this.ltfar_en,
gd.addCheckbox("Enable recovering far objects over infinity area",this.ltfar_en,
"Try to use tiles that were treated as infinity by a single quad camera");
"Try to use tiles that were treated as infinity by a single quad camera");
...
@@ -654,6 +710,7 @@ public class BiQuadParameters {
...
@@ -654,6 +710,7 @@ public class BiQuadParameters {
this.pf_use_alt=gd.getNextBoolean();
this.pf_use_alt=gd.getNextBoolean();
this.pf_goal_fraction_rms=gd.getNextNumber();
this.pf_goal_fraction_rms=gd.getNextNumber();
this.pf_boost_low_density=gd.getNextNumber();
this.pf_boost_low_density=gd.getNextNumber();
this.pf_fourq_radius=(int)gd.getNextNumber();
this.pf_fourq_min=(int)gd.getNextNumber();
this.pf_fourq_min=(int)gd.getNextNumber();
this.pf_fourq_gap=(int)gd.getNextNumber();
this.pf_fourq_gap=(int)gd.getNextNumber();
...
@@ -689,6 +746,23 @@ public class BiQuadParameters {
...
@@ -689,6 +746,23 @@ public class BiQuadParameters {
afloor,// final double str_floor, // absolute strength floor
afloor,// final double str_floor, // absolute strength floor
clt_parameters.rig.pf_disp_afloor,// final double pf_disp_afloor, // = 0.1; // When selecting the best fit from the alternative disparities, divide by difference increased by this
clt_parameters.rig.pf_disp_afloor,// final double pf_disp_afloor, // = 0.1; // When selecting the best fit from the alternative disparities, divide by difference increased by this
clt_parameters.rig.pf_disp_rfloor);// final double pf_disp_rfloor) // = 0.02; // Increase pf_disp_afloor for large disparities
clt_parameters.rig.pf_disp_rfloor);// final double pf_disp_rfloor) // = 0.02; // Increase pf_disp_afloor for large disparities
intref_smpl_radius=clt_parameters.rig.ltavg_ref_smpl_radius;// 11; // final int smpl_radius,
intref_smpl_num=50;// final int smpl_num_narrow, // = 3; // Number after removing worst (should be >1)
intref_smpl_num=clt_parameters.rig.ltavg_ref_smpl_num;// 40; // final int smpl_num_narrow, // = 3; // Number after removing worst (should be >1)
doubleref_max_adiff=0.15;// final double max_adiff, // Maximal absolute difference between the center tile and friends
doubleref_max_adiff=clt_parameters.rig.ltavg_ref_max_adiff;//0.15; // final double max_adiff, // Maximal absolute difference between the center tile and friends
doubleref_max_rdiff=0.04;// final double max_rdiff, // Maximal relative difference between the center tile and friends
doubleref_max_rdiff=clt_parameters.rig.ltavg_ref_max_rdiff;//0.04; // final double max_rdiff, // Maximal relative difference between the center tile and friends
doubleref_smpl_arms=0.1;// final double smpl_arms, // = 0.1; // Maximal RMS of the remaining tiles in a sample
doubleref_smpl_arms=clt_parameters.rig.ltavg_ref_smpl_arms;//0.1; // final double smpl_arms, // = 0.1; // Maximal RMS of the remaining tiles in a sample
doubleref_smpl_rrms=0.01;// final double smpl_rrms, // = 0.005; // Maximal RMS/disparity in addition to smplRms
doubleref_smpl_rrms=clt_parameters.rig.ltavg_ref_smpl_rrms;//0.01; // final double smpl_rrms, // = 0.005; // Maximal RMS/disparity in addition to smplRms
intnum_lt_refine=clt_parameters.rig.ltavg_num_lt_refine;// 20; // make a parameter
afloor,// final double str_floor, // absolute strength floor
afloor,// final double str_floor, // absolute strength floor
clt_parameters.rig.pf_disp_afloor,// final double pf_disp_afloor, // = 0.1; // When selecting the best fit from the alternative disparities, divide by difference increased by this
clt_parameters.rig.pf_disp_afloor,// final double pf_disp_afloor, // = 0.1; // When selecting the best fit from the alternative disparities, divide by difference increased by this
clt_parameters.rig.pf_disp_rfloor);// final double pf_disp_rfloor) // = 0.02; // Increase pf_disp_afloor for large disparities
clt_parameters.rig.pf_disp_rfloor);// final double pf_disp_rfloor) // = 0.02; // Increase pf_disp_afloor for large disparities
0.0, // only gaps neib_pull, // final double neib_pull, // pull to weighted average relative to pull to the original disparity value. If 0.0 - will only update former NaN-s
max_iter, // final int max_iterations,
// double [][] ds_expanded =
min_change, // final double min_change,
avg_ds=biScan.getLTExpanded(
clt_parameters.tileX, // final int dbg_x,
expand_tol,// final double tolerance, // should be not NaN over lt
clt_parameters.tileY, // final int dbg_y,
ds_preexpanded,// final double [][] ds_lt, // should be not NaN over lt
debugLevel+2); // final int debugLevel
ds_single[0],// final double [] d_single,
lt_select,// final boolean [] lt_sel,
expanded_lt,// final boolean [] exp_sel,
weak);// final boolean [] trusted);
// TODO use fillAndSmooth() to calculate new weights (keeping disparity as it was)