double[][][]input_data=CLTMacroSetData(// perform single pass according to prepared tiles operations and disparity
src_scan,// final CLTPass3d src_scan, // results of the normal correlations (now expecting infinity)
null);// final double [][][] other_channels, // other channels to correlate, such as average RGB (first index - subcamera, 2-nd - channel, 3-rd - pixel)
8,// final int macro_scale, // to correlate tile data instead of the pixel data: 1 - pixels, 8 - tiles
macro_scan.tile_op,// per-tile operation bit codes
macro_scan.disparity,// clt_parameters.disparity, // final double disparity,
input_data,// final double [][][] imade_data, // first index - number of image in a quad
// correlation results - final and partial
clt_corr_combo,// [tp.tilesY][tp.tilesX][(2*transform_size-1)*(2*transform_size-1)] // if null - will not calculate
clt_corr_partial,// clt_corr_partial, // [tp.tilesY][tp.tilesX][quad]color][(2*transform_size-1)*(2*transform_size-1)] // if null - will not calculate
null,// [tp.tilesY][tp.tilesX][pair]{dx,dy,weight}[(2*transform_size-1)*(2*transform_size-1)] // transpose unapplied. null - do not calculate
// Use it with disparity_maps[scan_step]? clt_mismatch, // [tp.tilesY][tp.tilesX][pair]{dx,dy,weight}[(2*transform_size-1)*(2*transform_size-1)] // transpose unapplied. null - do not calculate
double[][][]input_data=mc.CLTMacroSetData(// perform single pass according to prepared tiles operations and disparity
bgnd_data,// final CLTPass3d src_scan, // results of the normal correlations (now expecting infinity)
null);// final double [][][] other_channels, // other channels to correlate, such as average RGB (first index - subcamera, 2-nd - channel, 3-rd - pixel)
TileProcessormtp=mc.CLTMacroScan(// perform single pass according to prepared tiles operations and disparity
bgnd_data,// final CLTPass3d src_scan, // results of the normal correlations (now expecting infinity)
tp.clt_3d_passes,// final ArrayList <CLTPass3d> passes,// List, first, last - to search for the already tried disparity
clt_parameters,//final EyesisCorrectionParameters.CLTParameters clt_parameters, // for refinePassSetup()
0,// final int firstPass,
tp.clt_3d_passes.size(),// final int lastPassPlus1,
bg_pass,// final int bg_index,
true,// final boolean refine, // now always should be true ?
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
// Filtering by background data:
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
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_filtered,// final double str_over_bg, // Minimal filtered 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
clt_parameters.gr_ovrbg_cmb_vert,// final double str_over_bg_combo_vert, // Minimal combined strength when replacing background data
// Refine parameters use directly some clt_parameters, others below
clt_parameters.stUseRefine,// final boolean stUseRefine, // use supertiles (now false)
clt_parameters.ex_strength,// final double ex_strength, // double this_sure, // minimal strength to be considered definitely good
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.bgnd_maybe,// final double bgnd_maybe, // double this_maybe, // maximal strength to ignore as non-background
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_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
// using plates disparity/strength - averaged for small square sets of tiles. If null - just use raw tiles
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
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)
// Composite scan parameters
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,
clt_parameters.combine_min_vert,// final double combine_min_vert, // final double minStrengthVert,
//getFilteredDisparityStrength parameters
// Consider separate parameters for FDS?
clt_parameters.fds_str_floor,// final double fds_str_floor,
clt_parameters.fds_str_pow,// final double fds_str_pow,
clt_parameters.fds_smpl_side,// final int fds_smpl_size, // == 5
clt_parameters.fds_smpl_num,// final int fds_smpl_points, // == 3
clt_parameters.fds_smpl_rms,// final double fds_abs_rms,
clt_parameters.fds_smpl_rel_rms,// final double fds_rel_rms,
clt_parameters.fds_smpl_wnd,// final boolean fds_use_wnd, // use window function fro the neighbors
0.001,// final double fds_tilt_damp,
clt_parameters.fds_abs_tilt,// final double fds_abs_tilt, // = 2.0; // pix per tile
clt_parameters.fds_rel_tilt,// final double fds_rel_tilt, // = 0.2; // (pix / disparity) per tile
// expansion from neighbors parameters:
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
clt_parameters.gr_var_new_sngl,// final boolean gr_var_new_sngl,
clt_parameters.gr_var_new_fg,// final boolean gr_var_new_fg,
clt_parameters.gr_var_all_fg,// final boolean gr_var_all_fg,
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_var_next,// final boolean gr_var_next,
clt_parameters.gr_smpl_size,// final int gr_smpl_size , // 5, // final int smpl_size, // == 5
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_tilt_damp,// final double gr_tilt_damp , // 0.001, // final double tilt_cost,
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_same_rng,// final double gr_same_rng , // 3.0, // final double same_range, // modify
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_abs_tilt,// final double gr_abs_tilt , // 2.0, // final double max_abs_tilt, // = 2.0; // pix per tile
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_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
clt_parameters.gr_unique_pretol,// final double gr_unique_pretol , // 1.0, // final double unique_pre_tolerance, // usually larger than clt_parameters.unique_tolerance
// legacy expansion
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
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_retry_inf,// final boolean grow_retry_inf, // final boolean grow_retry_inf, // Retry border tiles that were identified as infinity earlier
// common expansion
clt_parameters.gr_num_steps,// final int gr_num_steps, // how far to extend
clt_parameters.gr_unique_tol,// final double gr_unique_tol,
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,
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?
// for debug level > 1, just corresponding clt_parameters.* will work, otherwise following 3 can override
last_pass,// final boolean last_pass, // just for more debug?
true,// final boolean remove_non_measurement, // save memory, true is OK
show_expand,// final boolean show_expand,
clt_parameters.show_unique,// final boolean show_unique,