@@ -120,6 +120,15 @@ public class BiQuadParameters {
...
@@ -120,6 +120,15 @@ public class BiQuadParameters {
publicdoublepf_damp_tilt=0.001;// Tilt cost for damping insufficient plane data
publicdoublepf_damp_tilt=0.001;// Tilt cost for damping insufficient plane data
publicdoublepf_rwsigma=0.7;// influence of far neighbors diminish as a Gaussian with this sigma
publicdoublepf_rwsigma=0.7;// influence of far neighbors diminish as a Gaussian with this sigma
publicdoublepf_rwsigma_narrow=0.2;// used to determine initial tilt ( 1/radius)
publicdoublepf_rwsigma_narrow=0.2;// used to determine initial tilt ( 1/radius)
publicbooleanpf_use_alt=false;// When fitting for the best plane - look for alernative measured tiles too
publicdoublepf_goal_fraction_rms=0.5;// Try to make rms to be this fraction of maximal acceptable by removing outliers
publicdoublepf_boost_low_density=0.8;// Strength assigned to fake tiles from neighbors (the lower - the higher)
// Apply when filling gaps, not when growing
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
// int trimWeakFG(
// int trimWeakFG(
publicbooleanpf_en_trim_fg=false;// Trim weak FZG
publicbooleanpf_en_trim_fg=false;// Trim weak FZG
...
@@ -371,6 +380,20 @@ public class BiQuadParameters {
...
@@ -371,6 +380,20 @@ public class BiQuadParameters {
"Sigma is relative to selection radius (square half-side)");
"Sigma is relative to selection radius (square half-side)");
gd.addNumericField("Weight function Gaussian sigma (relative to radius) for initial plane fitting",this.pf_rwsigma_narrow,4,6,"",
gd.addNumericField("Weight function Gaussian sigma (relative to radius) for initial plane fitting",this.pf_rwsigma_narrow,4,6,"",
"Weight function Gaussian sigma (relative to selection radius) for initial plane fitting. May be ~=1/radius");
"Weight function Gaussian sigma (relative to selection radius) for initial plane fitting. May be ~=1/radius");
gd.addCheckbox("When fitting for the best plane - look for alernative measured tiles too",this.pf_use_alt,
"When selecting tiles that fit best to the plane, try alternative (weaker) disparities too");
gd.addNumericField("Try to make rms to be this fraction of maximal acceptable by removing outliers",this.pf_goal_fraction_rms,4,6,"pix",
"When removing outliers to fit planes, stop removing when the RMS of the remaining drops below this fraction of the maxium allowed RMS (should be < 1.0");
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");
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");
gd.addNumericField("Four corners center gap half-width (1 - 1 tile, 2 - 3 tiles, 3 - 5 tiles, ...",this.pf_fourq_gap,0,3,"",
"Specifies corners of the sample square that should have tiles remain, after removing centre columns and center rows");
@@ -181,7 +189,16 @@ public class ImageDttParameters {
...
@@ -181,7 +189,16 @@ public class ImageDttParameters {
gd.addCheckbox("Always select 3x3 cells around integer maximum",this.cnvx_add3x3,
gd.addCheckbox("Always select 3x3 cells around integer maximum",this.cnvx_add3x3,
"Add 3x3 cells selection around the original argmax, regardless of bi-convex property");
"Add 3x3 cells selection around the original argmax, regardless of bi-convex property");
gd.addMessage("Window for pole detection mode");
gd.addNumericField("Strip height for pole detection",this.corr_strip_notch,0,3,"half-pix",
"Number of rows to combine/interpolate correlation results. Rows are twice denser than pixels correponding to largest baseline disparity");
gd.addNumericField("50% correlation window cutoff height for poles (0 in the center)",this.corr_notch_hwidth,3,6,"half-pix",
"Correlation window height argument for 50% value");
gd.addNumericField("0% to 100 % transition range for poles",this.corr_notch_blur,3,6,"half-pix",
"Transition range, shifted sine is used");
gd.addMessage("Window for niormal correlations");
gd.addNumericField("Number of rows to calculate CM disparity",this.corr_wndy_size,0,3,"",
gd.addNumericField("Number of rows to calculate CM disparity",this.corr_wndy_size,0,3,"",
"Number of rows to calculate maximum. Normally should be equal to the previous parameter");
"Number of rows to calculate maximum. Normally should be equal to the previous parameter");
...
@@ -233,6 +250,9 @@ public class ImageDttParameters {
...
@@ -233,6 +250,9 @@ public class ImageDttParameters {
gd.addCheckbox("Use new correlation methods compatible with x8 camera",this.corr_var_cam,
gd.addCheckbox("Use new correlation methods compatible with x8 camera",this.corr_var_cam,
"Debug feature to compare old/new methods");
"Debug feature to compare old/new methods");
gd.addNumericField("Normalization for the CM correlation strength",this.cm_max_normalization,6,8,"",
"Fraction of correlation maximum radius, being squared multiplied by maximum to have the same total mass. ~= 0.5, the lower the value, the higher strength reported by the CM");
// public double cm_max_normalization = 0.55; //
}
}
publicvoiddialogAnswers(GenericJTabbedDialoggd){
publicvoiddialogAnswers(GenericJTabbedDialoggd){
...
@@ -285,6 +305,10 @@ public class ImageDttParameters {
...
@@ -285,6 +305,10 @@ public class ImageDttParameters {
this.cnvx_weight=gd.getNextNumber();
this.cnvx_weight=gd.getNextNumber();
this.cnvx_add3x3=gd.getNextBoolean();
this.cnvx_add3x3=gd.getNextBoolean();
this.corr_strip_notch=(int)gd.getNextNumber();
this.corr_notch_hwidth=gd.getNextNumber();
this.corr_notch_blur=gd.getNextNumber();
this.corr_wndy_size=(int)gd.getNextNumber();
this.corr_wndy_size=(int)gd.getNextNumber();
this.corr_wndy_hwidth=gd.getNextNumber();
this.corr_wndy_hwidth=gd.getNextNumber();
...
@@ -314,6 +338,7 @@ public class ImageDttParameters {
...
@@ -314,6 +338,7 @@ public class ImageDttParameters {
this.lma_num_iter=(int)gd.getNextNumber();
this.lma_num_iter=(int)gd.getNextNumber();
this.lma_debug_level=(int)gd.getNextNumber();
this.lma_debug_level=(int)gd.getNextNumber();
this.corr_var_cam=gd.getNextBoolean();
this.corr_var_cam=gd.getNextBoolean();
this.cm_max_normalization=gd.getNextNumber();
}
}
...
@@ -366,6 +391,11 @@ public class ImageDttParameters {
...
@@ -366,6 +391,11 @@ public class ImageDttParameters {
finalintnum_full_cycles=3;// Number of full low-texture cycles that include growing flat LT and trimmin weak FG over BG
finalintnum_tries_strongest_by_fittest=5;
finalintnum_full_cycles=clt_parameters.rig.pf_en_trim_fg?3:1;// Number of full low-texture cycles that include growing flat LT and trimmin weak FG over BG
finalintnum_cross_gaps_cycles=20;// maximalnumger of adding new tiles cycles while "crossing the gaps)
finalintnum_cross_gaps_cycles=20;// maximalnumger of adding new tiles cycles while "crossing the gaps)
finalintmin_cross_gaps_new=20;// minimal number of the new added tiles
finalintmin_cross_gaps_new=20;// minimal number of the new added tiles
clt_parameters.rig.pf_rwsigma_narrow,// final double rwsigma_narrow, // = used to determine initial tilt
clt_parameters.rig.pf_rwsigma_narrow,// final double rwsigma_narrow, // = used to determine initial tilt
clt_parameters.rig.pf_new_diff,// final double new_diff, // minimal difference between the new suggested and the already tried/measured one
clt_parameters.rig.pf_new_diff,// final double new_diff, // minimal difference between the new suggested and the already tried/measured one
true,// final boolean remove_all_tried, // remove from suggested - not only disabled, but all tried
true,// final boolean remove_all_tried, // remove from suggested - not only disabled, but all tried
0.0,// final double center_weight, // use center tile too (0.0 - do not use)
clt_parameters.rig.pf_use_alt,// final boolean use_alt, // use tiles from other scans if they fit better
clt_parameters.rig.pf_goal_fraction_rms,// final double goal_fraction_rms, // Try to make rms to be this fraction of maximal acceptable by removing outliers
clt_parameters.rig.pf_boost_low_density,// NOT USED HERE, MAY BE 0, // final double boost_low_density, // 0 - strength is proportional to 1/density, 1.0 - same as remaining tiles
null,// final double [] smooth_strength, // optionally fill strength array when used for smoothing DSI
0,// final int fourq_min, // each of the 4 corners should have at least this number of tiles.
0,// final int fourq_gap, // symmetrical vertical and horizontal center areas that do not belong to any corner
clt_parameters.rig.pf_rwsigma_narrow,// final double rwsigma_narrow, // = used to determine initial tilt
clt_parameters.rig.pf_rwsigma_narrow,// final double rwsigma_narrow, // = used to determine initial tilt
clt_parameters.rig.pf_new_diff,// final double new_diff, // minimal difference between the new suggested and the already tried/measured one
clt_parameters.rig.pf_new_diff,// final double new_diff, // minimal difference between the new suggested and the already tried/measured one
true,// final boolean remove_all_tried, // remove from suggested - not only disabled, but all tried
true,// final boolean remove_all_tried, // remove from suggested - not only disabled, but all tried
0.0,// final double center_weight, // use center tile too (0.0 - do not use)
clt_parameters.rig.pf_use_alt,// final boolean use_alt, // use tiles from other scans if they fit better
clt_parameters.rig.pf_goal_fraction_rms,// final double goal_fraction_rms, // Try to make rms to be this fraction of maximal acceptable by removing outliers
clt_parameters.rig.pf_boost_low_density,// NOT USED HERE, MAY BE 0, // final double boost_low_density, // 0 - strength is proportional to 1/density, 1.0 - same as remaining tiles
null,// final double [] smooth_strength, // optionally fill strength array when used for smoothing DSI
0,// final int fourq_min, // each of the 4 corners should have at least this number of tiles.
0,// final int fourq_gap, // symmetrical vertical and horizontal center areas that do not belong to any corner
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
gd.addNumericField("Scan index (0..."+(biCamDSI_persistent.biScans.size()-1),scan_index,0,2,"","Display scan by index");
gd.addCheckbox("Show smooth disparity/strength for the selected scan",show_smooth,"Unchecked - just as is");
gd.addCheckbox("Keep unreliable tiles",keep_unreliable,"Unchecked - overwrite with smooth data");
gd.addCheckbox("Keep weak (but trusted) tiles",keep_weak,"Unchecked - overwrite with smooth data");
gd.addCheckbox("Keep strng trusted tiles",keep_strong,"Unchecked - overwrite with smooth data");
gd.addNumericField("Center weight - relative weight of the existing tile ",center_weight,4,6,"",
"0.0 - suggest new disparity over existing tiles without ant regard to the original value, 1.0 - same influence as any other tile");
gd.addNumericField("Minimal disparity to apply filter",min_disparity,4,6,"pix",
"Farther objects will not be filtered");
gd.addMessage("Parameters that are copied from the CLT parameters");
gd.addNumericField("Strength sufficient without neighbors",trusted_strength,4,6,"",
"Unconditionally trusted tile. Other stength values are referenceds as fraction of this value (after strength floor subtraction)");
gd.addNumericField("Strength sufficient with neighbors support, fraction of the trusted strength",cond_rtrusted,4,6,"",
"Strength that may be valid for the tile if there are neighbors in the same possibly tilted plane of the DSI (floor corrected)");
gd.addNumericField("Fraction of trusted strength to subtract",strength_rfloor,4,6,"",
"Strength floor to subtract from all strength values");
gd.addNumericField("Raise strength-floor to this power",strength_pow,4,6,"",
"Currently just 1.0 - lenear");
gd.addNumericField("How far to extend around known tiles (probably should increase this value up to?",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",smpl_num,0,3,"",
"When fitting planes the outliers are removed until the number of remaining tiles equals this value");
gd.addNumericField("Number of remaining tiles when using narrow selection",smpl_num_narrow,0,3,"",
"Number of remaining tiles during initial palne fitting to the center pixels (it is later extended to include farther tiles)");
gd.addNumericField("Fraction of the reamining tiles of all non-zero tiles?",smpl_fract,4,6,"",
"This value is combined to the previous one (absilute). Maximal of absolute and relative times number of all non-empty tiles is used");
gd.addNumericField("Maximal absolute disparity difference between the plane and tiles that fit",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",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 tile tilt in DSI space",max_atilt,4,6,"pix/tile",
"Maximal disparity difference betweeing neighbor tiles for the tilted plane. Combined with the relative one (next), min of both limits applies");
gd.addNumericField("Maximal relative (per pixel of disparity) tile tilt in DSI space",max_rtilt,4,6,"1/tile",
"Maximal relative (to center disparity) tilt. Near tiles (larger disparity may have larger differnce.");
gd.addNumericField("Maximal absolute RMS of the remaining tiles in a sample",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",smpl_rrms,4,6,"pix/pix",
"Relative RMS times disparity is added to the absolute one");
gd.addNumericField("Tilt cost for damping insufficient plane data",damp_tilt,4,6,"",
"Regularisation to handle co-linear and even single-point planes, forcing fronto-parallel for single point, and minimal tilt for co-linear set");
gd.addNumericField("Influence of far neighbors is reduced as a Gaussian with this sigma",rwsigma,4,6,"",
"Sigma is relative to selection radius (square half-side)");
gd.addNumericField("Weight function Gaussian sigma (relative to radius) for initial plane fitting",rwsigma_narrow,4,6,"",
"Weight function Gaussian sigma (relative to selection radius) for initial plane fitting. May be ~=1/radius");
gd.addCheckbox("When fitting planes, look for alternative measure tiles",use_alt,"Unchecked - only use the latest (current) tile");
gd.addNumericField("Try to make rms to be this fraction of maximal acceptable by removing outliers",goal_fraction_rms,4,6,"pix",
"When removing outliers to fit planes, stop removing when the RMS of the remaining drops below this fraction of the maxium allowed RMS (should be < 1.0");
gd.addNumericField("Strength assigned to fake tiles from neighbors (the lower - the higher)",boost_low_density,4,6,"pix",
"Returned strength assigned to the tiles increases with this value - seems to be a bug");
gd.addNumericField("Each of the 4 corners should have at least this number of tiles",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");
gd.addNumericField("Four corners center gap half-width (1 - 1 tile, 2 - 3 tiles, 3 - 5 tiles, ...",fourq_gap,0,3,"",
"Specifies corners of the sample square that should have tiles remain, after removing centre columns and center rows");
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_rfloor);// final double pf_disp_rfloor) // = 0.02; // Increase pf_disp_afloor for large disparities
null,// double [][] ml_data, // data for ML - 10 layers - 4 center areas (3x3, 5x5,..) per camera-per direction, 1 - composite, and 1 with just 1 data (target disparity)
null,// double [][] ml_data, // data for ML - 10 layers - 4 center areas (3x3, 5x5,..) per camera-per direction, 1 - composite, and 1 with just 1 data (target disparity)
null,// double [][] ml_data, // data for ML - 10 layers - 4 center areas (3x3, 5x5,..) per camera-per direction, 1 - composite, and 1 with just 1 data (target disparity)
null,// double [][] ml_data, // data for ML - 10 layers - 4 center areas (3x3, 5x5,..) per camera-per direction, 1 - composite, and 1 with just 1 data (target disparity)
null,// double [][] ml_data, // data for ML - 10 layers - 4 center areas (3x3, 5x5,..) per camera-per direction, 1 - composite, and 1 with just 1 data (target disparity)
null,// double [][] ml_data, // data for ML - 10 layers - 4 center areas (3x3, 5x5,..) per camera-per direction, 1 - composite, and 1 with just 1 data (target disparity)
null,// double [][] ml_data, // data for ML - 10 layers - 4 center areas (3x3, 5x5,..) per camera-per direction, 1 - composite, and 1 with just 1 data (target disparity)
null,// double [][] ml_data, // data for ML - 10 layers - 4 center areas (3x3, 5x5,..) per camera-per direction, 1 - composite, and 1 with just 1 data (target disparity)
null,// double [][] ml_data, // data for ML - 10 layers - 4 center areas (3x3, 5x5,..) per camera-per direction, 1 - composite, and 1 with just 1 data (target disparity)
null,// double [][] ml_data, // data for ML - 10 layers - 4 center areas (3x3, 5x5,..) per camera-per direction, 1 - composite, and 1 with just 1 data (target disparity)
double[][]ml_data,// data for ML - 10 layers - 4 center areas (3x3, 5x5,..) per camera-per direction, 1 - composite, and 1 with just 1 data (target disparity)
double[][]ml_data,// data for ML - 10 layers - 4 center areas (3x3, 5x5,..) per camera-per direction, 1 - composite, and 1 with just 1 data (target disparity)
ml_data,// double [][] ml_data, // data for ML - 10 layers - 4 center areas (3x3, 5x5,..) per camera-per direction, 1 - composite, and 1 with just 1 data (target disparity)
ml_data,// double [][] ml_data, // data for ML - 10 layers - 4 center areas (3x3, 5x5,..) per camera-per direction, 1 - composite, and 1 with just 1 data (target disparity)