hor_disp_strength,// final double [][][][] disparity_strengths, // either normal or tilted disparity/strengths
hor_disp_strength,// final double [][][][] disparity_strengths, // either normal or tilted disparity/strengths
...
@@ -2031,35 +2130,40 @@ public class SuperTiles{
...
@@ -2031,35 +2130,40 @@ public class SuperTiles{
null,// final boolean [][][] selected, // tiles OK to be assigned [supertile][measurement layer] [tile index] or null (or null or per-measurement layer)
null,// final boolean [][][] selected, // tiles OK to be assigned [supertile][measurement layer] [tile index] or null (or null or per-measurement layer)
used,// final boolean [][][] prohibited, // already assigned tiles [supertile][measurement layer] [tile index] or null
used,// final boolean [][][] prohibited, // already assigned tiles [supertile][measurement layer] [tile index] or null
stMeasSel,// final int stMeasSel, // = 1; // Select measurements for supertiles : +1 - combo, +2 - quad +4 - hor +8 - vert
stMeasSel,// final int stMeasSel, // = 1; // Select measurements for supertiles : +1 - combo, +2 - quad +4 - hor +8 - vert
((pass<(max_tries-1))?max_diff:Double.NaN),// final double max_diff, // maximal disparity difference (to assign to a cluster (of Double.NaN)
((pass<(max_tries-1))?max_diff_hor:Double.NaN),// final double max_diff, // maximal disparity difference (to assign to a cluster (of Double.NaN)
plMinPoints,// final int plMinPoints, // = 5; // Minimal number of points for plane detection
plMinPoints,// final int plMinPoints, // = 5; // Minimal number of points for plane detection
smallDiff,// final double smallDiff, // = 0.4; // Consider merging initial planes if disparity difference below
smallDiff,// final double smallDiff, // = 0.4; // Consider merging initial planes if disparity difference below
highMix,// final double highMix, //stHighMix = 0.4; // Consider merging initial planes if jumps between ratio above
highMix,// final double highMix, //stHighMix = 0.4; // Consider merging initial planes if jumps between ratio above
debugLevel,
1,// debugLevel,
dbg_X,
dbg_X,
dbg_Y);
dbg_Y);
if(debugLevel>-1){
System.out.println("initialDiscriminateTiles(): before new_planes_vert, pass ="+(pass+1)+" ( of "+max_tries+" )");
vert_disp_strength,// final double [][][][] disparity_strengths, // either normal or tilted disparity/strengths
vert_disp_strength,// final double [][][][] disparity_strengths, // either normal or tilted disparity/strengths
mmm_vert,// final double [][][] hist_max_min_max, // histogram data: per tile array of odd number of disparity/strengths pairs, starting with first maximum
mmm_vert,// final double [][][] hist_max_min_max, // histogram data: per tile array of odd number of disparity/strengths pairs, starting with first maximum
null,// final boolean [][][] selected, // tiles OK to be assigned [supertile][measurement layer] [tile index] or null (or null or per-measurement layer)
null,// final boolean [][][] selected, // tiles OK to be assigned [supertile][measurement layer] [tile index] or null (or null or per-measurement layer)
used,// final boolean [][][] prohibited, // already assigned tiles [supertile][measurement layer] [tile index] or null
used,// final boolean [][][] prohibited, // already assigned tiles [supertile][measurement layer] [tile index] or null
stMeasSel,// final int stMeasSel, // = 1; // Select measurements for supertiles : +1 - combo, +2 - quad +4 - hor +8 - vert
stMeasSel,// final int stMeasSel, // = 1; // Select measurements for supertiles : +1 - combo, +2 - quad +4 - hor +8 - vert
((pass<(max_tries-1))?max_diff:Double.NaN),// final double max_diff, // maximal disparity difference (to assign to a cluster (of Double.NaN)
((pass<(max_tries-1))?max_diff_vert:Double.NaN),// final double max_diff, // maximal disparity difference (to assign to a cluster (of Double.NaN)
plMinPoints,// final int plMinPoints, // = 5; // Minimal number of points for plane detection
plMinPoints,// final int plMinPoints, // = 5; // Minimal number of points for plane detection
smallDiff,// final double smallDiff, // = 0.4; // Consider merging initial planes if disparity difference below
smallDiff,// final double smallDiff, // = 0.4; // Consider merging initial planes if disparity difference below
highMix,// final double highMix, //stHighMix = 0.4; // Consider merging initial planes if jumps between ratio above
highMix,// final double highMix, //stHighMix = 0.4; // Consider merging initial planes if jumps between ratio above
debugLevel,
2,// debugLevel,
dbg_X,
dbg_X,
dbg_Y);
dbg_Y);
// compare which vert or hor provide stronger clusters, add them to selections, recalculate "used"
// compare which vert or hor provide stronger clusters, add them to selections, recalculate "used"
// double px = tileSize*(superTileSize * sTileXY[0] + superTileSize/2) + zxy[1]; // [3] - plane point {disparity, x, y), x=0, y=0 is a 4,4 point of an 8x8 supertile
@@ -3042,9 +3042,38 @@ public class TileProcessor {
...
@@ -3042,9 +3042,38 @@ public class TileProcessor {
// moved here
// moved here
if(clt_parameters.dbg_migrate){
if(clt_parameters.dbg_migrate){
// separate each supertile data into clusters, trying both horizontal and perpendicular to view planes
double[]world_hor={0.0,1.0,0.0};
st.processPlanes5(
clt_parameters.stMeasSel,// = 1 //Select measurements for supertiles : +1 - combo, +2 - quad +4 - hor +8 - vert
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,
clt_parameters.stSmplMode,// final boolean smplMode, // = true; // Use sample mode (false - regular tile mode)
clt_parameters.stSmplSide,// final int smplSide, // = 2; // Sample size (side of a square)
clt_parameters.stSmplNum,// final int smplNum, // = 3; // Number after removing worst
clt_parameters.stSmplRms,// final double smplRms, // = 0.1; // Maximal RMS of the remaining tiles in a sample
clt_parameters.plBlurBinHor,// final double bin_blur_hor, // Blur disparity histograms for horizontal clusters by this sigma (in bins)
clt_parameters.plBlurBinVert,// final double bin_blur_vert, // Blur disparity histograms for constant disparity clusters by this sigma (in bins)
clt_parameters.plMaxDiffHor,// final double max_diff_hor, // maximal disparity difference (to assign to a cluster (of Double.NaN) at first run for horizontal planes
clt_parameters.plMaxDiffVert,// final double max_diff_vert, // maximal disparity difference (to assign to a cluster (of Double.NaN) at first run for vertical plane
clt_parameters.plInitPasses,// final int max_tries, // on last run - assign all rfemaining pixels to some cluster (disregard max_diff)