Commit fabeb071 authored by Andrey Filippov's avatar Andrey Filippov

improving fine adjustment

parent 92f321f5
This diff is collapsed.
......@@ -2046,11 +2046,12 @@ public class EyesisCorrectionParameters {
public int ly_smpl_side = 3; // Sample size (side of a square)
public int ly_smpl_num = 5; // Number after removing worst (should be >1)
public double ly_meas_disp = 1.5; // Maximal measured relative disparity
public double ly_smpl_rms = 0.1; // Maximal RMS of the remaining tiles in a sample
public double ly_disp_var = 0.2; // Maximal full disparity difference to 8 neighbors
public double ly_smpl_rms = 0.2; // 1; // Maximal RMS of the remaining tiles in a sample
public double ly_disp_var = 0.5; // 2; // Maximal full disparity difference to 8 neighbors
public double ly_inf_frac = 0.5; // Relative weight of infinity calibration data
public boolean ly_on_scan = true; // Calculate and apply lazy eye correction after disparity scan
public boolean ly_inf_en = true; // Simultaneously correct disparity at infinity
public boolean ly_poly = false; // Use polynomial correction, false - correct tilt/azimuth/roll of each sensor
// old fcorr parameters, reuse?
// public int fcorr_sample_size = 32; // Use square this size side to detect outliers
......@@ -2674,6 +2675,7 @@ public class EyesisCorrectionParameters {
properties.setProperty(prefix+"ly_inf_frac", this.ly_inf_frac +"");
properties.setProperty(prefix+"ly_on_scan", this.ly_on_scan+"");
properties.setProperty(prefix+"ly_inf_en", this.ly_inf_en+"");
properties.setProperty(prefix+"ly_poly", this.ly_poly+"");
properties.setProperty(prefix+"corr_magic_scale", this.corr_magic_scale +"");
......@@ -3249,6 +3251,7 @@ public class EyesisCorrectionParameters {
if (properties.getProperty(prefix+"ly_inf_frac")!=null) this.ly_inf_frac=Double.parseDouble(properties.getProperty(prefix+"ly_inf_frac"));
if (properties.getProperty(prefix+"ly_on_scan")!=null) this.ly_on_scan=Boolean.parseBoolean(properties.getProperty(prefix+"ly_on_scan"));
if (properties.getProperty(prefix+"ly_inf_en")!=null) this.ly_inf_en=Boolean.parseBoolean(properties.getProperty(prefix+"ly_inf_en"));
if (properties.getProperty(prefix+"ly_poly")!=null) this.ly_poly=Boolean.parseBoolean(properties.getProperty(prefix+" "));
if (properties.getProperty(prefix+"corr_magic_scale")!=null) this.corr_magic_scale=Double.parseDouble(properties.getProperty(prefix+"corr_magic_scale"));
......@@ -3839,6 +3842,7 @@ public class EyesisCorrectionParameters {
gd.addNumericField("Relative weight of infinity calibration data", this.ly_inf_frac, 3);
gd.addCheckbox ("Calculate and apply lazy eye correction after disparity scan (need to repeat)",this.ly_on_scan);
gd.addCheckbox ("Use infinity disparity (disable if there is not enough of infinity data)", this.ly_inf_en);
gd.addCheckbox ("*Use polynomial correction, false - correct tilt/azimuth/roll of each sensor)", this.ly_poly);
gd.addMessage ("---");
// gd.addNumericField("Use square this size side to detect outliers", this.fcorr_sample_size, 0);
// gd.addNumericField("Keep tiles only if there are more in each square", this.fcorr_mintiles, 0);
......@@ -4451,6 +4455,7 @@ public class EyesisCorrectionParameters {
this.ly_inf_frac= gd.getNextNumber();
this.ly_on_scan= gd.getNextBoolean();
this.ly_inf_en= gd.getNextBoolean();
this.ly_poly= gd.getNextBoolean();
// this.fcorr_sample_size= (int)gd.getNextNumber();
// this.fcorr_mintiles= (int) gd.getNextNumber();
......
......@@ -531,6 +531,7 @@ private Panel panel1,
addButton("CLT process corr", panelClt2, color_conf_process);
addButton("CLT disparity scan", panelClt2, color_conf_process);
addButton("CLT reset fine corr", panelClt2, color_stop);
addButton("CLT reset extrinsic corr", panelClt2, color_stop);
addButton("CLT show fine corr", panelClt2, color_configure);
addButton("CLT apply fine corr", panelClt2, color_process);
addButton("CLT test fine corr", panelClt2, color_process);
......@@ -4586,6 +4587,18 @@ private Panel panel1,
}
QUAD_CLT.reset_fine_corr();
return;
} else if (label.equals("CLT reset extrinsic corr")) {
if (QUAD_CLT == null){
QUAD_CLT = new QuadCLT (
PROPERTIES,
EYESIS_CORRECTIONS,
CORRECTION_PARAMETERS);
if (DEBUG_LEVEL > 0){
System.out.println("Created new QuadCLT instance, will need to read CLT kernels");
}
}
QUAD_CLT.resetExtrinsicCorr();
return;
} else if (label.equals("CLT show fine corr")) {
if (QUAD_CLT == null){
QUAD_CLT = new QuadCLT (
......
This diff is collapsed.
This diff is collapsed.
......@@ -2726,7 +2726,7 @@ public class SuperTiles{
smplRms, // final double smplRms, // = 0.1; // Maximal RMS of the remaining tiles in a sample
smplWnd, // final boolean smplWnd, // use window functions for the samples
debugLevel + 1, // + 2, // 1, // final int debugLevel,
debugLevel + 0, // 1, // + 2, // 1, // final int debugLevel,
dbg_X, // final int dbg_X,
dbg_Y); // final int dbg_Y)
this.planes = new_planes; // save as "measured" (as opposed to "smoothed" by neighbors) planes
......
......@@ -955,7 +955,7 @@ diff_best= 0.06731 diff9= 1.09087 weak_fgnd= 0.22250 flaps= 0.07229 ml_mismatch
// now diff is for the center, weight needs to be re-calculated
if (strengthDiffPwr > 0.0) {
if ((dispStrength[ml] == null) || (dispStrength[ml][nSurfTile] == null)){
System.out.println("getTileCosts() nSurfTile = "+nSurfTile+" ml = "+ml+" BUG - null pointer");
System.out.println("getTileCosts() nSurfTile = "+nSurfTile+" ml = "+ml+" is it really a BUG - null pointer here?");
weight = 1.0;
} else {
weight = dispStrength[ml][nSurfTile][1]; // null pointer
......
......@@ -5235,7 +5235,7 @@ public class TileProcessor {
lp.conditionSuperTiles(
st.planes, // final TilePlanes.PlaneData [][] planes,
10, // final int max_num_merge_try,
1); // debugLevel); // final int debugLevel);
0); // 1); // debugLevel); // final int debugLevel);
// Used only by conflicts (not processed currently)
lp.calcStarValueStrength(
true, // boolean set_start_planes,
......
......@@ -114,6 +114,7 @@ public class X3dOutput {
public void addCluster(
String url,
String id,
String class_name,
double [][] texCoord,
double [][] coordinate,
int [][] triangles)
......@@ -159,7 +160,8 @@ public class X3dOutput {
Element el_shape = x3dDoc.createElement("Shape");
el_Scene.appendChild(el_shape);
el_shape.setAttribute("id",id);
if (id != null) el_shape.setAttribute("id",id);
if (class_name != null) el_shape.setAttribute("class",class_name);
Element el_appearance = x3dDoc.createElement("Appearance");
el_shape.appendChild(el_appearance);
......
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