tp.clt_3d_passes.size()-1,// final int measured_scan_index, // will not look at higher scans
0,// final int start_scan_index,
disp_index,// final int disp_index,
str_index,// final int str_index,
null,// final double [] tiltXY, // null - free with limit on both absolute (2.0?) and relative (0.2) values
trustedCorrelation,// final double trustedCorrelation,
strength_floor,// final double strength_floor,
strength_pow,// final double strength_pow,
smplSide,// final int smplSide, // = 2; // Sample size (side of a square)
smplNum,// final int smplNum, // = 3; // Number after removing worst (should be >1)
smplRms,// final double smplRms, // = 0.1; // Maximal RMS of the remaining tiles in a sample
smplWnd,// final boolean smplWnd, //
max_abs_tilt,// final double max_abs_tilt, // = 2.0; // pix per tile
max_rel_tilt,// final double max_rel_tilt, // = 0.2; // (pix / disparity) per tile
dbg_x,// final int dbg_x,
dbg_y,// final int dbg_y,
debugLevel);// final int debugLevel)
refine_pass=tp.clt_3d_passes.size();// 1
// refine pass uses hor/vert thresholds inside
tp.refinePassSetup(// prepare tile tasks for the refine pass (re-measure disparities)
// final double [][][] image_data, // first index - number of image in a quad
clt_parameters,
...
...
@@ -6184,12 +5986,20 @@ public class QuadCLT {
clt_parameters.ex_nstrength,// double ex_nstrength, // minimal 4-corr strength divided by channel diff for new (border) tiles
clt_parameters.bgnd_maybe,// double this_maybe, // maximal strength to ignore as non-background
clt_parameters.sure_smth,// sure_smth, // if 2-nd worst image difference (noise-normalized) exceeds this - do not propagate bgnd
clt_parameters.pt_super_trust,// final double super_trust, // If strength exceeds ex_strength * super_trust, do not apply ex_nstrength and plate_ds
// using plates disparity/strength - averaged for small square sets of tiles. If null - just use raw tiles
filtered_disp_strength,// final double [][] plate_ds, // disparity/strength last time measured for the multi-tile squares. Strength =-1 - not measured. May be null
clt_parameters.pt_keep_raw_fg,// final boolean keep_raw_fg, // do not replace raw tiles by the plates, if raw is closer (like poles)
clt_parameters.pt_scale_pre,// final double scale_filtered_strength_pre, // scale plate_ds[1] before comparing to raw strength
clt_parameters.pt_scale_post,// final double scale_filtered_strength_post,// scale plate_ds[1] when replacing raw (generally plate_ds is more reliable if it exists)
ImageDtt.DISPARITY_INDEX_CM,// index of disparity value in disparity_map == 2 (0,2 or 4)
finaldoublehighMix,//stHighMix = 0.4; // Consider merging initial planes if jumps between ratio above
finaldouble[]world_hor,// horizontal plane normal (default [0.0, 1.0, 0.0])
finalbooleanshow_histograms,
finalintdebugLevel,
finalintdbg_X,
finalintdbg_Y)
...
...
@@ -2589,7 +2609,7 @@ public class SuperTiles{
smplSide,// final int smplSide, // = 2; // Sample size (side of a square)
smplNum,// final int smplNum, // = 3; // Number after removing worst
smplRms,// final double smplRms, // = 0.1; // Maximal RMS of the remaining tiles in a sample
smplWnd,// final boolean smplWnd, // use window functions fro the samples
bin_blur_hor,// final double bin_blur_hor, // Blur disparity histograms for horizontal clusters by this sigma (in bins)
bin_blur_vert,// final double bin_blur_vert, // Blur disparity histograms for constant disparity clusters by this sigma (in bins)
max_diff_hor,// final double max_diff_hor, // maximal disparity difference (to assign to a cluster (of Double.NaN) at first run for horizontal planes
...
...
@@ -2598,7 +2618,8 @@ public class SuperTiles{
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
world_hor,// final double [] world_hor, // horizontal plane normal (default [0.0, 1.0, 0.0])
debugLevel+1,// final int debugLevel,
show_histograms,// final boolean show_histograms,
debugLevel+0,// final int debugLevel,
dbg_X,// final int dbg_X,
dbg_Y);// final int dbg_Y)
...
...
@@ -2616,7 +2637,7 @@ public class SuperTiles{
smplSide,// final int smplSide, // = 2; // Sample size (side of a square)
smplNum,// final int smplNum, // = 3; // Number after removing worst
smplRms,// final double smplRms, // = 0.1; // Maximal RMS of the remaining tiles in a sample
smplWnd,// final boolean smplWnd, // use window functions fro the samples
debugLevel,// final int debugLevel,
dbg_X,// final int dbg_X,
dbg_Y);// final int dbg_Y)
...
...
@@ -2639,6 +2660,7 @@ public class SuperTiles{
smplSide,// final int smplSide, // = 2; // Sample size (side of a square)
smplNum,// final int smplNum, // = 3; // Number after removing worst
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+2,// + 2, // 1, // final int debugLevel,
dbg_X,// final int dbg_X,
...
...
@@ -2695,7 +2717,7 @@ public class SuperTiles{
finalintsmplSide,// = 2; // Sample size (side of a square)
finalintsmplNum,// = 3; // Number after removing worst
finaldoublesmplRms,// = 0.1; // Maximal RMS of the remaining tiles in a sample
finalbooleansmplWnd,// use window functions for the samples
finaldoubleplDiscrTolerance,// = 0.4; // Maximal disparity difference from the plane to consider tile
finaldoubleplDiscrDispRange,// = 0.6; // Parallel move known planes around original know value for the best overall fit
finalintplDiscrSteps,// = 3; // Number of steps (each direction) for each plane to search for the best fit (0 - single, 1 - 1 each side)
...
...
@@ -2737,7 +2759,7 @@ public class SuperTiles{
smplSide,// final int smplSide, // = 2; // Sample size (side of a square)
smplNum,// final int smplNum, // = 3; // Number after removing worst
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
plDiscrTolerance,//final double plDiscrTolerance, // = 0.4; // Maximal disparity difference from the plane to consider tile
plDiscrDispRange,// final double plDiscrDispRange, // = 0.6; // Parallel move known planes around original know value for the best overall fit
plDiscrSteps,// final int plDiscrSteps, // = 3; // Number of steps (each direction) for each plane to search for the best fit (0 - single, 1 - 1 each side)
...
...
@@ -2775,7 +2797,7 @@ public class SuperTiles{
smplSide,// final int smplSide, // = 2; // Sample size (side of a square)
smplNum,// final int smplNum, // = 3; // Number after removing worst
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,// final int debugLevel,
dbg_X,// final int dbg_X,
dbg_Y);// final int dbg_Y)
...
...
@@ -2798,7 +2820,7 @@ public class SuperTiles{
smplSide,// final int smplSide, // = 2; // Sample size (side of a square)
smplNum,// final int smplNum, // = 3; // Number after removing worst
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
@@ -2374,6 +2854,25 @@ public class TileProcessor {
// these_tiles[i] = true;
// }
}
// combine with plates if available
if((plate_ds!=null)&&(plate_ds[1][i]>=0)&&(this_strength[i]<ex_strength*super_trust)){// plate_ds[1][i] == -1 - no data, was not measured
if(plate_ds[1][i]>0){
if(// !refined_selected[i] ||
!these_tiles[i]||
(this_disparity[i]<=plate_ds[0][i])||// keep old way detected (including poles) is closer, replace if raw is farther
(this_strength[i]<plate_ds[1][i]*scale_filtered_strength_pre)// keep old way detected (including poles) is closer, replace if raw is farther
){
these_tiles[i]=true;
this_disparity[i]=plate_ds[0][i];
this_strength[i]=plate_ds[1][i];
}
}elseif(these_tiles[i]){// no plates and raw is not reliably
these_tiles[i]=false;
}
}
// see if the second worst variation exceeds sure_smth (like a window), really close object
intimax1=0;
for(intip=1;ip<these_diffs.length;ip++){
...
...
@@ -2895,10 +3394,17 @@ public class TileProcessor {
intbg_scan_index,
doubledisparity_far,//
doubledisparity_near,//
doubleex_strength,// minimal 4-corr strength to trust tile
doubleex_strength,// minimal 4-corr strength to trust raw tile - above will prefer it to multi-tile plates
doubleex_nstrength,// minimal 4-corr strength divided by channel diff for new (border) tiles
doublethis_maybe,// maximal strength to ignore as non-background
doublesure_smth,// if 2-nd worst image difference (noise-normalized) exceeds this - do not propagate bgnd
doublesuper_trust,// If strength exceeds ex_strength * super_trust, do not apply ex_nstrength and plate_ds
double[][]plate_ds,// disparity/strength last time measured for the multi-tile squares. Strength =-1 - not measured. May be null
booleankeep_raw_fg,// do not replace raw tiles by the plates, if raw is closer (like poles)
doublescale_filtered_strength_pre,// scale plate_ds[1] before comparing to raw strength
doublescale_filtered_strength_post,// scale plate_ds[1] when replacing raw (generally plate_ds is more reliable if it exists)
intdisparity_index,// index of disparity value in disparity_map == 2 (0,2 or 4)
GeometryCorrectiongeometryCorrection,
finalintthreadsMax,// maximal number of threads to launch
...
...
@@ -3034,6 +3540,12 @@ public class TileProcessor {
ex_nstrength,// final double ex_nstrength, // minimal 4-corr strength divided by channel diff for new (border) tiles
this_maybe,// final double this_maybe, // maximal strength to ignore as non-background
sure_smth,// final double sure_smth, // if 2-nd worst image difference (noise-normalized) exceeds this - do not propagate bgnd
super_trust,// final double super_trust, // If strength exceeds ex_strength * super_trust, do not apply ex_nstrength and plate_ds
// using plates disparity/strength - averaged for small square sets of tiles. If null - just use raw tiles
plate_ds,// final double [][] plate_ds, // disparity/strength last time measured for the multi-tile squares. Strength =-1 - not measured. May be null
keep_raw_fg,// final boolean keep_raw_fg, // do not replace raw tiles by the plates, if raw is closer (like poles)
scale_filtered_strength_pre,// final double scale_filtered_strength_pre, // scale plate_ds[1] before comparing to raw strength
scale_filtered_strength_post,// final double scale_filtered_strength_post,// scale plate_ds[1] when replacing raw (generally plate_ds is more reliable if it exists)
clt_parameters.stHighMix,// stHighMix = 0.4; // Consider merging initial planes if jumps between ratio above
world_hor,// final double [] world_hor, // horizontal plane normal (default [0.0, 1.0, 0.0])
clt_parameters.show_histograms,// final boolean show_histograms,
0,// -1, // debugLevel, // final int debugLevel)
clt_parameters.tileX,
clt_parameters.tileY);
...
...
@@ -4033,6 +4556,7 @@ public class TileProcessor {
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.stSmplWnd,// final boolean smplWnd, // use window functions for the samples
clt_parameters.plDiscrTolerance,// final double plDiscrTolerance, // = 0.4; // Maximal disparity difference from the plane to consider tile
clt_parameters.plDiscrDispRange,// final double plDiscrDispRange, // = 0.6; // Parallel move known planes around original know value for the best overall fit
...
...
@@ -4147,6 +4671,7 @@ public class TileProcessor {
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.stSmplWnd,// boolean smplWnd, // use window functions for the samples
debugLevel,// 1, // final int debugLevel)
clt_parameters.tileX,
clt_parameters.tileY);
...
...
@@ -4686,6 +5211,8 @@ public class TileProcessor {
doubleex_nstrength,// minimal 4-corr strength divided by channel diff for new (border) tiles
doublethis_maybe,// maximal strength to ignore as non-background
doublesure_smth,// if 2-nd worst image difference (noise-normalized) exceeds this - do not propagate bgnd
doublesuper_trust,// If strength exceeds ex_strength * super_trust, do not apply ex_nstrength and plate_ds
intdisparity_index,// index of disparity value in disparity_map == 2 (0,2 or 4)
GeometryCorrectiongeometryCorrection,
finalintthreadsMax,// maximal number of threads to launch
...
...
@@ -4760,6 +5287,12 @@ public class TileProcessor {
this_maybe,// final double this_maybe, // maximal strength to ignore as non-background
sure_smth,// final double sure_smth, // if 2-nd worst image difference (noise-normalized) exceeds this - do not propagate bgnd
super_trust,// final double super_trust, // If strength exceeds ex_strength * super_trust, do not apply ex_nstrength and plate_ds
// using plates disparity/strength - averaged for small square sets of tiles. If null - just use raw tiles
null,// final double [][] plate_ds, // disparity/strength last time measured for the multi-tile squares. Strength =-1 - not measured. May be null
true,// final boolean keep_raw_fg, // do not replace raw tiles by the plates, if raw is closer (like poles)
0.0,// final double scale_filtered_strength_pre, // scale plate_ds[1] before comparing to raw strength
0.0,// final double scale_filtered_strength_post,// scale plate_ds[1] when replacing raw (generally plate_ds is more reliable if it exists)