Commit bdf3d47f authored by Andrey Filippov's avatar Andrey Filippov

splitting planes into pairs

parent 41d614cb
......@@ -2162,6 +2162,10 @@ public class EyesisCorrectionParameters {
public int plIterations = 10; // Maximal number of smoothing iterations for each step
public int plPrecision = 6; // Maximal step difference (1/power of 10)
public double plSplitPull = .5; // Relative weight of center plane when splitting into pairs
public int plSplitMinNeib = 2; // Minimal number of neighbors to split plane in pairs
public boolean plFuse = true; // Fuse planes together (off for debug only)
public boolean plKeepOrphans = true; // Keep unconnected supertiles
public double plMinOrphan = 2.0; // Minimal strength unconnected supertiles to keep
......@@ -2427,6 +2431,10 @@ public class EyesisCorrectionParameters {
properties.setProperty(prefix+"plPull", this.plPull +"");
properties.setProperty(prefix+"plIterations", this.plIterations+"");
properties.setProperty(prefix+"plPrecision", this.plPrecision+"");
properties.setProperty(prefix+"plSplitPull", this.plSplitPull +"");
properties.setProperty(prefix+"plSplitMinNeib", this.plSplitMinNeib+"");
properties.setProperty(prefix+"plFuse", this.plFuse+"");
properties.setProperty(prefix+"plKeepOrphans", this.plKeepOrphans+"");
properties.setProperty(prefix+"plMinOrphan", this.plMinOrphan +"");
......@@ -2680,6 +2688,10 @@ public class EyesisCorrectionParameters {
if (properties.getProperty(prefix+"plPull")!=null) this.plPull=Double.parseDouble(properties.getProperty(prefix+"plPull"));
if (properties.getProperty(prefix+"plIterations")!=null) this.plIterations=Integer.parseInt(properties.getProperty(prefix+"plIterations"));
if (properties.getProperty(prefix+"plPrecision")!=null) this.plPrecision=Integer.parseInt(properties.getProperty(prefix+"plPrecision"));
if (properties.getProperty(prefix+"plSplitPull")!=null) this.plSplitPull=Double.parseDouble(properties.getProperty(prefix+"plSplitPull"));
if (properties.getProperty(prefix+"plSplitMinNeib")!=null) this.plSplitMinNeib=Integer.parseInt(properties.getProperty(prefix+"plSplitMinNeib"));
if (properties.getProperty(prefix+"plFuse")!=null) this.plFuse=Boolean.parseBoolean(properties.getProperty(prefix+"plFuse"));
if (properties.getProperty(prefix+"plKeepOrphans")!=null) this.plKeepOrphans=Boolean.parseBoolean(properties.getProperty(prefix+"plKeepOrphans"));
if (properties.getProperty(prefix+"plMinOrphan")!=null) this.plMinOrphan=Double.parseDouble(properties.getProperty(prefix+"plMinOrphan"));
......@@ -2955,6 +2967,10 @@ public class EyesisCorrectionParameters {
gd.addNumericField("Relative weight of original (measured) plane when combing with neighbors", this.plPull, 6);
gd.addNumericField("Maximal number of smoothing iterations for each step", this.plIterations, 0);
gd.addNumericField("Maximal step difference (1/power of 10)", this.plPrecision, 0);
gd.addNumericField("Relative weight of center plane when splitting into pairs", this.plSplitPull, 6);
gd.addNumericField("Minimal number of neighbors to split plane in pairs", this.plSplitMinNeib, 0);
gd.addCheckbox ("Fuse planes together (off for debug only)", this.plFuse);
gd.addCheckbox ("Keep unconnected supertiles", this.plKeepOrphans);
gd.addNumericField("Minimal strength unconnected supertiles to keep", this.plMinOrphan, 6);
......@@ -3218,6 +3234,10 @@ public class EyesisCorrectionParameters {
this.plPull= gd.getNextNumber();
this.plIterations= (int) gd.getNextNumber();
this.plPrecision= (int) gd.getNextNumber();
this.plSplitPull= gd.getNextNumber();
this.plSplitMinNeib= (int) gd.getNextNumber();
this.plFuse= gd.getNextBoolean();
this.plKeepOrphans= gd.getNextBoolean();
this.plMinOrphan= gd.getNextNumber();
......
This diff is collapsed.
......@@ -204,6 +204,11 @@ public class TilePlanes {
return this.neib_best[dir];
}
public void setNeibBest(int [] vals)
{
this.neib_best = vals;
}
public void setNeibBest(int dir, int val)
{
this.neib_best[dir] = val;
......
......@@ -3039,6 +3039,17 @@ public class TileProcessor {
// save surfaces with SuperTiles instance. They can be used to snap to for the per-tile disparity maps.
st.setSurfaces(surfaces);
TilePlanes.PlaneData[][][] split_planes =
st.breakPlanesToPairs(
st.getPlanes(), // Mod(), // final TilePlanes.PlaneData[][] center_planes, // measured_planes,
st.getPlanes(), // Mod(), // final TilePlanes.PlaneData[][] neib_planes, //mod_planes,
clt_parameters.plSplitPull , // final double center_pull,
clt_parameters.plSplitMinNeib , // min_neibs, // 2
clt_parameters.plPreferDisparity,
1, // final int debugLevel)
clt_parameters.tileX,
clt_parameters.tileY);
if (clt_parameters.show_planes){
int [] wh = st.getShowPlanesWidthHeight();
double [][] plane_data_nonan = st.getShowPlanes(
......
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