Commit 6237b540 authored by Andrey Filippov's avatar Andrey Filippov

refactoring

parent 5ab65126
......@@ -36,7 +36,7 @@ public class CLTPass3d{
double [] calc_disparity_hor = null; // composite disparity, calculated from "disparity", and "disparity_map" fields
double [] calc_disparity_vert = null; // composite disparity, calculated from "disparity", and "disparity_map" fields
double [] calc_disparity_combo = null; // composite disparity, calculated from "disparity", and "disparity_map" fields
double [] strength = null; // composite strength, initially uses a copy of raw 4-sensor correleation strength
double [] strength = null; // composite strength, initially uses a copy of raw 4-sensor correlation strength
double [] strength_hor = null; // updated hor strength, initially uses a copy of raw measured
double [] strength_vert = null; // updated hor strength, initially uses a copy of raw measured
// Bg disparity & strength is calculated from the supertiles and used instead of the tile disparity if it is too weak. Assuming, that
......@@ -333,7 +333,7 @@ public class CLTPass3d{
}
/**
* Get one of the line-scan per-tile correlation data.
* @param mode 0 - final data (initially copy FPGA generated 4-pair correation)
* @param mode 0 - final data (initially copy FPGA generated 4-pair correlation)
* 1 - original FPGA generated 4-sensor correlation
* 2 - 2 - horizontal pairs correlation, detecting vertical features
* 3 - 2 - vertical pairs correlation, detecting horizontal features
......
......@@ -2182,6 +2182,7 @@ public class EyesisCorrectionParameters {
public boolean replaceWeakOutlayers = true; // false;
public boolean dbg_migrate = true;
// other debug images
public boolean show_ortho_combine = false; // Show 'ortho_combine'
......@@ -2452,6 +2453,8 @@ public class EyesisCorrectionParameters {
properties.setProperty(prefix+"plSnapDispWeight", this.plSnapDispWeight +"");
properties.setProperty(prefix+"plSnapZeroMode", this.plSnapZeroMode+"");
properties.setProperty(prefix+"dbg_migrate", this.dbg_migrate+"");
properties.setProperty(prefix+"show_ortho_combine", this.show_ortho_combine+"");
properties.setProperty(prefix+"show_refine_supertiles", this.show_refine_supertiles+"");
properties.setProperty(prefix+"show_bgnd_nonbgnd", this.show_bgnd_nonbgnd+"");
......@@ -2712,6 +2715,8 @@ public class EyesisCorrectionParameters {
if (properties.getProperty(prefix+"plSnapDispWeight")!=null) this.plSnapDispWeight=Double.parseDouble(properties.getProperty(prefix+"plSnapDispWeight"));
if (properties.getProperty(prefix+"plSnapZeroMode")!=null) this.plPrecision=Integer.parseInt(properties.getProperty(prefix+"plSnapZeroMode"));
if (properties.getProperty(prefix+"dbg_migrate")!=null) this.dbg_migrate=Boolean.parseBoolean(properties.getProperty(prefix+"dbg_migrate"));
if (properties.getProperty(prefix+"show_ortho_combine")!=null) this.show_ortho_combine=Boolean.parseBoolean(properties.getProperty(prefix+"show_ortho_combine"));
if (properties.getProperty(prefix+"show_refine_supertiles")!=null) this.show_refine_supertiles=Boolean.parseBoolean(properties.getProperty(prefix+"show_refine_supertiles"));
if (properties.getProperty(prefix+"show_bgnd_nonbgnd")!=null) this.show_bgnd_nonbgnd=Boolean.parseBoolean(properties.getProperty(prefix+"show_bgnd_nonbgnd"));
......@@ -2995,6 +3000,8 @@ public class EyesisCorrectionParameters {
gd.addNumericField("Maximal disparity diff. by weight product to snap to plane", this.plSnapDispWeight, 6);
gd.addNumericField("Zero strength snap mode: 0: no special treatment, 1 - strongest, 2 - farthest",this.plSnapZeroMode, 0);
gd.addCheckbox ("Test new mode after migration", this.dbg_migrate);
gd.addMessage ("--- Other debug images ---");
gd.addCheckbox ("Show 'ortho_combine'", this.show_ortho_combine);
gd.addCheckbox ("Show 'refine_disparity_supertiles'", this.show_refine_supertiles);
......@@ -3264,6 +3271,8 @@ public class EyesisCorrectionParameters {
this.plSnapDispWeight= gd.getNextNumber();
this.plSnapZeroMode= (int) gd.getNextNumber();
this.dbg_migrate= gd.getNextBoolean();
this.show_ortho_combine= gd.getNextBoolean();
this.show_refine_supertiles=gd.getNextBoolean();
this.show_bgnd_nonbgnd= gd.getNextBoolean(); // first on second pass
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -2945,6 +2945,23 @@ public class TileProcessor {
SuperTiles st = scan_prev.getSuperTiles();
// moved here
if (clt_parameters.dbg_migrate) {
st.processPlanes3(
null, // final boolean [] selected, // or null
0.3, // final double min_disp,
false, // final boolean invert_disp, // use 1/disparity
clt_parameters.plDispNorm, // = 2.0; // Normalize disparities to the average if above
clt_parameters.plMinPoints, // = 5; // Minimal number of points for plane detection
clt_parameters.plTargetEigen, // = 0.1; // Remove outliers until main axis eigenvalue (possibly scaled by plDispNorm) gets below
clt_parameters.plFractOutliers, // = 0.3; // Maximal fraction of outliers to remove
clt_parameters.plMaxOutliers, // = 20; // Maximal number of outliers to remove\
clt_parameters.plPreferDisparity,
geometryCorrection,
clt_parameters.correct_distortions,
0, // -1, // debugLevel, // final int debugLevel)
clt_parameters.tileX,
clt_parameters.tileY);
} else {
st.processPlanes2(
null, // final boolean [] selected, // or null
0.3, // final double min_disp,
......@@ -2960,7 +2977,7 @@ public class TileProcessor {
0, // -1, // debugLevel, // final int debugLevel)
clt_parameters.tileX,
clt_parameters.tileY);
}
showDoubleFloatArrays sdfa_instance = null;
if (debugLevel > -1) sdfa_instance = new showDoubleFloatArrays(); // just for debugging?
......
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