clt_parameters.fcorr_radius,// final double fcorr_radius,
clt_parameters.fcorr_radius,// final double fcorr_radius,
clt_parameters.fcorr_inf_strength,// final double min_strenth,
clt_parameters.fcorr_inf_strength,// final double min_strenth,
clt_parameters.fcorr_inf_diff,// final double max_diff,
clt_parameters.fcorr_inf_diff,// final double max_diff,
...
@@ -4702,7 +4410,7 @@ public class QuadCLT {
...
@@ -4702,7 +4410,7 @@ public class QuadCLT {
tilesX,// int tilesX,
tilesX,// int tilesX,
clt_parameters.corr_magic_scale,// double magic_coeff, // still not understood coefficent that reduces reported disparity value. Seems to be around 8.5
clt_parameters.corr_magic_scale,// double magic_coeff, // still not understood coefficent that reduces reported disparity value. Seems to be around 8.5
debugLevel+(clt_parameters.fine_dbg?1:0));// int debugLevel)
debugLevel+(clt_parameters.fine_dbg?1:0));// int debugLevel)
// includes both infinity correction and mismatch correction for the same infinity tiles
// includes both infinity correction and mismatch correction for the same infinity tiles
double[][][]new_corr=ac.infinityCorrection(
double[][][]new_corr=ac.infinityCorrection(
clt_parameters.ly_poly,// final boolean use_poly,
clt_parameters.fcorr_inf_strength,// final double min_strenth,
clt_parameters.fcorr_inf_strength,// final double min_strenth,
clt_parameters.fcorr_inf_diff,// final double max_diff,
clt_parameters.fcorr_inf_diff,// final double max_diff,
clt_parameters.inf_iters,// 20, // 0, // final int max_iterations,
clt_parameters.inf_iters,// 20, // 0, // final int max_iterations,
...
@@ -4876,6 +4585,7 @@ public class QuadCLT {
...
@@ -4876,6 +4585,7 @@ public class QuadCLT {
double[][][]new_corr=ac.lazyEyeCorrection(
double[][][]new_corr=ac.lazyEyeCorrection(
clt_parameters.ly_poly,// final boolean use_poly,
clt_parameters.fcorr_radius,// final double fcorr_radius,
clt_parameters.fcorr_radius,// final double fcorr_radius,
clt_parameters.fcorr_inf_strength,// final double min_strenth,
clt_parameters.fcorr_inf_strength,// final double min_strenth,
clt_parameters.fcorr_inf_diff,// final double max_diff,
clt_parameters.fcorr_inf_diff,// final double max_diff,
...
@@ -4908,7 +4618,7 @@ public class QuadCLT {
...
@@ -4908,7 +4618,7 @@ public class QuadCLT {
clt_parameters.corr_magic_scale,// double magic_coeff, // still not understood coefficent that reduces reported disparity value. Seems to be around 8.5
clt_parameters.corr_magic_scale,// double magic_coeff, // still not understood coefficent that reduces reported disparity value. Seems to be around 8.5
debugLevel+(clt_parameters.fine_dbg?1:0));// int debugLevel)
debugLevel+(clt_parameters.fine_dbg?1:0));// int debugLevel)
if(!dry_run){
if(!dry_run&&(new_corr!=null)){
apply_fine_corr(
apply_fine_corr(
new_corr,
new_corr,
debugLevel+2);
debugLevel+2);
...
@@ -5419,7 +5129,7 @@ public class QuadCLT {
...
@@ -5419,7 +5129,7 @@ public class QuadCLT {
ImageDtt.DISPARITY_INDEX_CM,// index of disparity value in disparity_map == 2 (0,2 or 4)
ImageDtt.DISPARITY_INDEX_CM,// index of disparity value in disparity_map == 2 (0,2 or 4)
tp.clt_3d_passes,// final ArrayList <CLTPass3d> passes,// List, first, last - to search for the already tried disparity
if(use_zMapExpansionStep){
clt_parameters,//final EyesisCorrectionParameters.CLTParameters clt_parameters, // for refinePassSetup()
num_extended=zMapExpansionStep(
0,// final int firstPass,
tp.clt_3d_passes,// final ArrayList <CLTPass3d> passes,// List, first, last - to search for the already tried disparity
tp.clt_3d_passes.size(),// final int lastPassPlus1,
clt_parameters,//final EyesisCorrectionParameters.CLTParameters clt_parameters, // for refinePassSetup()
bg_pass,// final int bg_index,
0,// final int firstPass,
tp.clt_3d_passes.size(),// final int lastPassPlus1,
true,// final boolean refine, // now always should be true ?
bg_pass,// final int bg_index,
clt_parameters.gr_new_expand,// final boolean expand_neibs, // expand from neighbors
!clt_parameters.gr_new_expand,// final boolean expand_legacy, // old mode of growing tiles (using max scanned). If both true, will try only if expand_neibs fails
true,// final boolean refine, // now always should be true ?
clt_parameters.gr_new_expand,// final boolean expand_neibs, // expand from neighbors
// Filtering by background data:
!clt_parameters.gr_new_expand,// final boolean expand_legacy, // old mode of growing tiles (using max scanned). If both true, will try only if expand_neibs fails
filtered_bgnd_disp_strength,// final double [][] filtered_bgnd_ds, // if not null, will filter results not to have low disparity new tiles over supposed bgnd
// for legacy expansion it is not used, but just checked for null, so double [0][] should work too
// Filtering by background data:
clt_parameters.ex_min_over,// final double ex_min_over, // when expanding over previously detected (by error) background, disregard far tiles
filtered_bgnd_disp_strength,// final double [][] filtered_bgnd_ds, // if not null, will filter results not to have low disparity new tiles over supposed bgnd
clt_parameters.gr_ovrbg_filtered,// final double str_over_bg, // Minimal filtered strength when replacing background data
// for legacy expansion it is not used, but just checked for null, so double [0][] should work too
clt_parameters.gr_ovrbg_cmb,// final double str_over_bg_combo, // Minimal combined strength when replacing background data
clt_parameters.ex_min_over,// final double ex_min_over, // when expanding over previously detected (by error) background, disregard far tiles
clt_parameters.gr_ovrbg_cmb_hor,// final double str_over_bg_combo_hor, // Minimal combined strength when replacing background data
clt_parameters.gr_ovrbg_filtered,// final double str_over_bg, // Minimal filtered strength when replacing background data
clt_parameters.gr_ovrbg_cmb_vert,// final double str_over_bg_combo_vert, // Minimal combined strength when replacing background data
clt_parameters.gr_ovrbg_cmb,// final double str_over_bg_combo, // Minimal combined strength when replacing background data
clt_parameters.gr_ovrbg_cmb_hor,// final double str_over_bg_combo_hor, // Minimal combined strength when replacing background data
// Refine parameters use directly some clt_parameters, others below
clt_parameters.gr_ovrbg_cmb_vert,// final double str_over_bg_combo_vert, // Minimal combined strength when replacing background data
clt_parameters.stUseRefine,// final boolean stUseRefine, // use supertiles (now false)
clt_parameters.bgnd_maybe,// final double bgnd_maybe, // double this_maybe, // maximal strength to ignore as non-background
clt_parameters.ex_strength,// final double ex_strength, // double this_sure, // minimal strength to be considered definitely good
clt_parameters.sure_smth,// final double sure_smth, // sure_smth, // if 2-nd worst image difference (noise-normalized) exceeds this - do not propagate bgnd
clt_parameters.ex_nstrength,//final double ex_nstrength, // double ex_nstrength, // minimal 4-corr strength divided by channel diff for new (border) tiles
clt_parameters.pt_super_trust,//final double pt_super_trust, // final double super_trust, // If strength exceeds ex_strength * super_trust, do not apply ex_nstrength and plate_ds
clt_parameters.bgnd_maybe,// final double bgnd_maybe, // double this_maybe, // maximal strength to ignore as non-background
// using plates disparity/strength - averaged for small square sets of tiles. If null - just use raw tiles
clt_parameters.sure_smth,// final double sure_smth, // sure_smth, // if 2-nd worst image difference (noise-normalized) exceeds this - do not propagate bgnd
clt_parameters.pt_keep_raw_fg,// final boolean 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_super_trust,//final double pt_super_trust, // final double super_trust, // If strength exceeds ex_strength * super_trust, do not apply ex_nstrength and plate_ds
clt_parameters.pt_scale_pre,// final double pt_scale_pre, // final double scale_filtered_strength_pre, // scale plate_ds[1] before comparing to raw strength
// using plates disparity/strength - averaged for small square sets of tiles. If null - just use raw tiles
clt_parameters.pt_scale_post,// final double 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)
clt_parameters.pt_keep_raw_fg,// final boolean 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 pt_scale_pre, // final double scale_filtered_strength_pre, // scale plate_ds[1] before comparing to raw strength
// Composite scan parameters
clt_parameters.pt_scale_post,// final double 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)
clt_parameters.combine_min_strength,// final double combine_min_strength, // final double minStrength,
clt_parameters.combine_min_hor,// final double combine_min_hor, // final double minStrengthHor,
// Composite scan parameters
clt_parameters.combine_min_vert,// final double combine_min_vert, // final double minStrengthVert,
clt_parameters.combine_min_strength,// final double combine_min_strength, // final double minStrength,
clt_parameters.combine_min_hor,// final double combine_min_hor, // final double minStrengthHor,
//getFilteredDisparityStrength parameters
clt_parameters.combine_min_vert,// final double combine_min_vert, // final double minStrengthVert,
// Consider separate parameters for FDS?
//getFilteredDisparityStrength parameters
clt_parameters.fds_str_floor,// final double fds_str_floor,
clt_parameters.fds_str_pow,// final double fds_str_pow,
// Consider separate parameters for FDS?
clt_parameters.fds_smpl_side,// final int fds_smpl_size, // == 5
clt_parameters.fds_str_floor,// final double fds_str_floor,
clt_parameters.fds_smpl_num,// final int fds_smpl_points, // == 3
clt_parameters.fds_str_pow,// final double fds_str_pow,
clt_parameters.fds_smpl_rms,// final double fds_abs_rms,
clt_parameters.fds_smpl_side,// final int fds_smpl_size, // == 5
clt_parameters.fds_smpl_rel_rms,// final double fds_rel_rms,
clt_parameters.fds_smpl_num,// final int fds_smpl_points, // == 3
clt_parameters.fds_smpl_wnd,// final boolean fds_use_wnd, // use window function fro the neighbors
clt_parameters.fds_smpl_rms,// final double fds_abs_rms,
0.001,// final double fds_tilt_damp,
clt_parameters.fds_smpl_rel_rms,// final double fds_rel_rms,
clt_parameters.fds_abs_tilt,// final double fds_abs_tilt, // = 2.0; // pix per tile
clt_parameters.fds_smpl_wnd,// final boolean fds_use_wnd, // use window function fro the neighbors
clt_parameters.fds_rel_tilt,// final double fds_rel_tilt, // = 0.2; // (pix / disparity) per tile
0.001,// final double fds_tilt_damp,
clt_parameters.fds_abs_tilt,// final double fds_abs_tilt, // = 2.0; // pix per tile
// expansion from neighbors parameters:
clt_parameters.fds_rel_tilt,// final double fds_rel_tilt, // = 0.2; // (pix / disparity) per tile
clt_parameters.gr_min_new,// final int gr_min_new, // discard variant if there are less new tiles
clt_parameters.gr_steps_over,// final int gr_steps_over, // how far to extend
// expansion from neighbors parameters:
clt_parameters.gr_var_new_sngl,// final boolean gr_var_new_sngl,
clt_parameters.gr_min_new,// final int gr_min_new, // discard variant if there are less new tiles
clt_parameters.gr_var_new_fg,// final boolean gr_var_new_fg,
clt_parameters.gr_steps_over,// final int gr_steps_over, // how far to extend
clt_parameters.gr_var_all_fg,// final boolean gr_var_all_fg,
clt_parameters.gr_var_new_sngl,// final boolean gr_var_new_sngl,
clt_parameters.gr_var_new_bg,// final boolean gr_var_new_bg,
clt_parameters.gr_var_new_fg,// final boolean gr_var_new_fg,
clt_parameters.gr_var_all_bg,// final boolean gr_var_all_bg,
clt_parameters.gr_var_all_fg,// final boolean gr_var_all_fg,
clt_parameters.gr_var_next,// final boolean gr_var_next,
clt_parameters.gr_var_new_bg,// final boolean gr_var_new_bg,
clt_parameters.gr_var_all_bg,// final boolean gr_var_all_bg,
clt_parameters.gr_smpl_size,// final int gr_smpl_size , // 5, // final int smpl_size, // == 5
clt_parameters.gr_var_next,// final boolean gr_var_next,
clt_parameters.gr_min_pnts,// final int gr_min_pnts , // 5, // 4, // 3, // final int min_points, // == 3
clt_parameters.gr_use_wnd,// final boolean gr_use_wnd , // true, // final boolean use_wnd, // use window function fro the neighbors
clt_parameters.gr_smpl_size,// final int gr_smpl_size , // 5, // final int smpl_size, // == 5
clt_parameters.gr_tilt_damp,// final double gr_tilt_damp , // 0.001, // final double tilt_cost,
clt_parameters.gr_min_pnts,// final int gr_min_pnts , // 5, // 4, // 3, // final int min_points, // == 3
clt_parameters.gr_split_rng,// final double gr_split_rng , // 5.0, // final double split_threshold, // if full range of the values around the cell higher, need separate fg, bg
clt_parameters.gr_use_wnd,// final boolean gr_use_wnd , // true, // final boolean use_wnd, // use window function fro the neighbors
clt_parameters.gr_same_rng,// final double gr_same_rng , // 3.0, // final double same_range, // modify
clt_parameters.gr_tilt_damp,// final double gr_tilt_damp , // 0.001, // final double tilt_cost,
clt_parameters.gr_diff_cont,// final double gr_diff_cont , // 2.0, // final double diff_continue, // maximal difference from the old value (for previously defined tiles
clt_parameters.gr_split_rng,// final double gr_split_rng , // 5.0, // final double split_threshold, // if full range of the values around the cell higher, need separate fg, bg
clt_parameters.gr_abs_tilt,// final double gr_abs_tilt , // 2.0, // final double max_abs_tilt, // = 2.0; // pix per tile
clt_parameters.gr_same_rng,// final double gr_same_rng , // 3.0, // final double same_range, // modify
clt_parameters.gr_rel_tilt,// final double gr_rel_tilt , // 0.2, // final double max_rel_tilt, // = 0.2; // (pix / disparity) per tile
clt_parameters.gr_diff_cont,// final double gr_diff_cont , // 2.0, // final double diff_continue, // maximal difference from the old value (for previously defined tiles
clt_parameters.gr_smooth,// final int gr_smooth , // 50, // final int max_tries, // maximal number of smoothing steps
clt_parameters.gr_abs_tilt,// final double gr_abs_tilt , // 2.0, // final double max_abs_tilt, // = 2.0; // pix per tile
clt_parameters.gr_fin_diff,// final double gr_fin_diff , // 0.01, // final double final_diff, // maximal change to finish iterations
clt_parameters.gr_rel_tilt,// final double gr_rel_tilt , // 0.2, // final double max_rel_tilt, // = 0.2; // (pix / disparity) per tile
clt_parameters.gr_unique_pretol,// final double gr_unique_pretol , // 1.0, // final double unique_pre_tolerance, // usually larger than clt_parameters.unique_tolerance
clt_parameters.gr_smooth,// final int gr_smooth , // 50, // final int max_tries, // maximal number of smoothing steps
clt_parameters.gr_fin_diff,// final double gr_fin_diff , // 0.01, // final double final_diff, // maximal change to finish iterations
// legacy expansion
clt_parameters.gr_unique_pretol,// final double gr_unique_pretol , // 1.0, // final double unique_pre_tolerance, // usually larger than clt_parameters.unique_tolerance
clt_parameters.grow_min_diff,// final double grow_min_diff, // = 0.5; // Grow more only if at least one channel has higher variance from others for the tile
clt_parameters.grow_retry_far,// final boolean grow_retry_far, // final boolean grow_retry_far, // Retry tiles around known foreground that have low max_tried_disparity
// legacy expansion
clt_parameters.grow_pedantic,// final boolean grow_pedantic, // final boolean grow_pedantic, // Scan full range between max_tried_disparity of the background and known foreground
clt_parameters.grow_min_diff,// final double grow_min_diff, // = 0.5; // Grow more only if at least one channel has higher variance from others for the tile
clt_parameters.grow_retry_inf,// final boolean grow_retry_inf, // final boolean grow_retry_inf, // Retry border tiles that were identified as infinity earlier
clt_parameters.grow_retry_far,// final boolean grow_retry_far, // final boolean grow_retry_far, // Retry tiles around known foreground that have low max_tried_disparity
clt_parameters.grow_pedantic,// final boolean grow_pedantic, // final boolean grow_pedantic, // Scan full range between max_tried_disparity of the background and known foreground
// common expansion
clt_parameters.grow_retry_inf,// final boolean grow_retry_inf, // final boolean grow_retry_inf, // Retry border tiles that were identified as infinity earlier
clt_parameters.gr_num_steps,// final int gr_num_steps, // how far to extend
clt_parameters.gr_unique_tol,// final double gr_unique_tol,
// common expansion
0.0,// clt_parameters.grow_disp_min , // final double grow_disp_min, // final double disp_near,
clt_parameters.gr_num_steps,// final int gr_num_steps, // how far to extend
clt_parameters.grow_disp_max,// final double grow_disp_max, // final double disp_near,
clt_parameters.gr_unique_tol,// final double gr_unique_tol,
clt_parameters.grow_disp_step,// final double grow_disp_step, // = 6.0; // Increase disparity (from maximal tried) if nothing found in that tile // TODO: handle enclosed dips?
0.0,// clt_parameters.grow_disp_min , // final double grow_disp_min, // final double disp_near,
clt_parameters.grow_disp_max,// final double grow_disp_max, // final double disp_near,
// for debug level > 1, just corresponding clt_parameters.* will work, otherwise following 3 can override
clt_parameters.grow_disp_step,// final double grow_disp_step, // = 6.0; // Increase disparity (from maximal tried) if nothing found in that tile // TODO: handle enclosed dips?
last_pass,// final boolean last_pass, // just for more debug?
true,// final boolean remove_non_measurement, // save memory, true is OK
// for debug level > 1, just corresponding clt_parameters.* will work, otherwise following 3 can override
show_expand,// final boolean show_expand,
last_pass,// final boolean last_pass, // just for more debug?
clt_parameters.show_unique,// final boolean show_unique,
true,// final boolean remove_non_measurement, // save memory, true is OK
show_retry_far,// final boolean show_retry_far,
show_expand,// final boolean show_expand,
clt_parameters.show_unique,// final boolean show_unique,
dbg_x,
show_retry_far,// final boolean show_retry_far,
dbg_y,// final int dbg_y,
debugLevel+1);// final int debugLevel)
dbg_x,
dbg_y,// final int dbg_y,
debugLevel+1);// final int debugLevel)
}else{// if (use_zMapExpansionStep) {
// Temporarily mixing results of refinePassSetup() and tp.getFilteredDisparityStrength(). The Later needs measurement pass, not refined
clt_parameters.ex_strength,// double this_sure, // minimal strength to be considered definitely good
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)