publicdouble[][]correlate2DIterate(// returns optical flow and confidence
finalImageDttParametersimgdtt_params,// Now just extra correlation parameters, later will include, most others
// for prepareSceneTiles()
finaldouble[]scene_xyz,// camera center in world coordinates
finaldouble[]scene_atr,// camera orientation relative to world frame
finalQuadCLTscene_QuadClt,
finalQuadCLTreference_QuadClt,
finaldouble[][][]reference_tiles,// prepared with prepareReferenceTiles() + fillTilesNans();
// flowXY should be initialized to all pairs of zeros (or deliberate pixel offset pairs if initial error is too high, will be modified with each iteration
finaldouble[][]flowXY,// per macro tile {mismatch in image pixels in X and Y directions // initialize to [reference_tiles.length][2]
finaldoubletolerance_absolute,// absolute disparity half-range in each tile
finaldoubletolerance_relative,// relative disparity half-range in each tile
finaldoubleoccupancy,// fraction of remaining tiles (<1.0)
finalintnum_passes,
finaldoublemax_change,
// for correlate2DSceneToReference ()
finaldouble[]chn_weights,// absolute, starting from strength (strength,r,b,g)
finaldoublecorr_sigma,
finaldoublefat_zero,
finalbooleanlate_normalize,
// for correlation2DToVectors_CM()
finalintiradius,// half-size of the square to process
intrefine_num=5;// number of iterations to apply weights around new center
intmax_rad=3;
booleancombine_empty_only=true;// false;
doublemagic_scale=0.85;
booleanlate_normalize_iterate=true;
intnum_run_all=2;// run all tiles for few iterations before filtering
intmax_tries=100;
// for recalculateFlowXY()
doublemin_change=0.001;// sqrt (dx*dx + dy*dy) for correction (int tiles)
// double [] abs_change = new double [reference_tiles.length]; // updated
intdebug_level_iterate=1;
inttransform_size=tp.getTileSize();
intmacroTilesX=tilesX/transform_size;
intmacroTilesY=tilesY/transform_size;
// public double [][]
correlate2DIterate(// returns optical flow and confidence
clt_parameters.img_dtt,// final ImageDttParameters imgdtt_params, // Now just extra correlation parameters, later will include, most others
// for prepareSceneTiles()
camera_xyz0,// final double [] scene_xyz, // camera center in world coordinates
camera_atr0,// final double [] scene_atr, // camera orientation relative to world frame
scene_QuadCLT,// final QuadCLT scene_QuadClt,
reference_QuadCLT,// final QuadCLT reference_QuadClt,
reference_tiles,// final double [][][] reference_tiles, // prepared with prepareReferenceTiles() + fillTilesNans();
// flowXY should be initialized to all pairs of zeros (or deliberate pixel offset pairs if initial error is too high, will be modified with each iteration
flowXY,// final double [][] flowXY, // per macro tile {mismatch in image pixels in X and Y directions // initialize to [reference_tiles.length][2]
tolerance_absolute_inter,// final double tolerance_absolute, // absolute disparity half-range in each tile
tolerance_relative_inter,// final double tolerance_relative, // relative disparity half-range in each tile
occupancy_inter,// final double occupancy, // fraction of remaining tiles (<1.0)
num_passes,// final int num_passes,
max_change,// final double max_change,
// for correlate2DSceneToReference ()
chn_weights,// final double [] chn_weights, // absolute, starting from strength (strength,r,b,g)
corr_sigma,// final double corr_sigma,
fat_zero,// final double fat_zero,
late_normalize_iterate,// final boolean late_normalize,
// for correlation2DToVectors_CM()
iradius,// final int iradius, // half-size of the square to process
dradius,// final double dradius, // weight calculation (1/(r/dradius)^2 + 1)
refine_num,// final int refine_num, // number of iterations to apply weights around new center
num_run_all,// final int num_run_all, // run all tiles for few iterations before filtering
max_tries,// final int max_tries,
// for recalculateFlowXY()
// abs_change, // final double [] abs_change, // updated
magic_scale,// final double magic_scale, // 0.85 for CM