Commit e83cb48d authored by Andrey Filippov's avatar Andrey Filippov

TD interscene averaging

parent 66777c19
...@@ -13144,8 +13144,9 @@ public class OpticalFlow { ...@@ -13144,8 +13144,9 @@ public class OpticalFlow {
double [][][] dcorr_tiles = (fclt_corr != null)? (new double [tp_tasks[0].length][][]):null; double [][][] dcorr_tiles = (fclt_corr != null)? (new double [tp_tasks[0].length][][]):null;
// will use num_acc with variable number of accumulations (e.g. clusters) // will use num_acc with variable number of accumulations (e.g. clusters)
//all_fpn //all_fpn
double min_str = all_fpn ? clt_parameters.imp.min_str_fpn : clt_parameters.imp.min_str; double min_str = all_fpn ? clt_parameters.imp.min_str_fpn : clt_parameters.imp.min_str;
double min_str_sum = all_fpn ? clt_parameters.imp.min_str_sum_fpn : clt_parameters.imp.min_str_sum; double min_str_sum = all_fpn ? clt_parameters.imp.min_str_sum_fpn : clt_parameters.imp.min_str_sum;
double min_str_neib = all_fpn ? clt_parameters.imp.min_str_neib_fpn : clt_parameters.imp.min_str_neib;
double corr_fz_inter = clt_parameters.getGpuFatZeroInter(ref_scene.isMonochrome()); double corr_fz_inter = clt_parameters.getGpuFatZeroInter(ref_scene.isMonochrome());
if (mb_en && (mb_vectors!=null)) { // increase fat zero when there is motion blur if (mb_en && (mb_vectors!=null)) { // increase fat zero when there is motion blur
corr_fz_inter *= 8; corr_fz_inter *= 8;
...@@ -13176,7 +13177,7 @@ public class OpticalFlow { ...@@ -13176,7 +13177,7 @@ public class OpticalFlow {
image_dtt.transform_size - 1, // final int gpu_corr_rad, // = transform_size - 1 ? image_dtt.transform_size - 1, // final int gpu_corr_rad, // = transform_size - 1 ?
// The tp_tasks data should be decoded from GPU to get coordinates // The tp_tasks data should be decoded from GPU to get coordinates
// should it be reference or scene? Or any? // should it be reference or scene? Or any?
tp_tasks[0], // final TpTask [] tp_tasks, // data from the reference frame - will be applied to LMA for the integrated correlations tp_tasks[0], // final TpTask [] tp_tasks, // data from the reference frame - will be applied to LMA for the integrated correlations
// to be converted to float (may be null) // to be converted to float (may be null)
dcorr_tiles, // final double [][][] dcorr_tiles, // [tile][pair_abs, sparse][(2*transform_size-1)*(2*transform_size-1)] // if null - will not calculate dcorr_tiles, // final double [][][] dcorr_tiles, // [tile][pair_abs, sparse][(2*transform_size-1)*(2*transform_size-1)] // if null - will not calculate
pXpYD_ref, // ref_pXpYD, // final double [][] pXpYD, // pXpYD for the reference scene pXpYD_ref, // ref_pXpYD, // final double [][] pXpYD, // pXpYD for the reference scene
...@@ -13188,13 +13189,17 @@ public class OpticalFlow { ...@@ -13188,13 +13189,17 @@ public class OpticalFlow {
use_partial, // final boolean use_partial, // find motion vectors for individual pairs, false - for sum only use_partial, // final boolean use_partial, // find motion vectors for individual pairs, false - for sum only
clt_parameters.imp.centroid_radius,// final double centroid_radius, // 0 - use all tile, >0 - cosine window around local max clt_parameters.imp.centroid_radius,// final double centroid_radius, // 0 - use all tile, >0 - cosine window around local max
clt_parameters.imp.n_recenter, // final int n_recenter, // when cosine window, re-center window this many times clt_parameters.imp.n_recenter, // final int n_recenter, // when cosine window, re-center window this many times
clt_parameters.imp.td_weight, // final double td_weight, // mix correlations accumulated in TD with clt_parameters.imp.td_weight, // final double td_weight, // mix correlations accumulated in TD with
clt_parameters.imp.pd_weight, // final double pd_weight, // correlations (post) accumulated in PD clt_parameters.imp.td_neib_weight, // final double td_neib_weight, // mix correlations accumulated in TD (neibs)
clt_parameters.imp.td_nopd_only, // final boolean td_nopd_only, // only use TD accumulated data if no safe PD is available for the tile. clt_parameters.imp.pd_weight, // final double pd_weight, // correlations (post) accumulated in PD
clt_parameters.imp.td_nopd_only, // final boolean td_nopd_only , // only use TD accumulated data if no safe PD is available for the tile.
clt_parameters.imp.neib_notd_only, // final boolean neib_notd_only, // use neighbors only if individual TD is too weak
min_str, // final double min_str_nofpn, // = 0.25; min_str, // final double min_str_nofpn, // = 0.25;
min_str_sum, // final double min_str_sum_nofpn, // = 0.8; // 5; min_str_sum, // final double min_str_sum_nofpn, // = 0.8; // 5;
min_str_neib, // final double min_str_neib_nofpn,
clt_parameters.imp.min_str_fpn, // final double min_str, // = 0.25; clt_parameters.imp.min_str_fpn, // final double min_str, // = 0.25;
clt_parameters.imp.min_str_sum_fpn,// final double min_str_sum, // = 0.8; // 5; clt_parameters.imp.min_str_sum_fpn,// final double min_str_sum, // = 0.8; // 5;
clt_parameters.imp.min_str_neib_fpn,//final double min_str_neib_fpn,
clt_parameters.imp.min_neibs, // final int min_neibs, // 2; // minimal number of strong neighbors (> min_str) clt_parameters.imp.min_neibs, // final int min_neibs, // 2; // minimal number of strong neighbors (> min_str)
clt_parameters.imp.weight_zero_neibs, // final double weight_zero_neibs,// 0.2; // Reduce weight for no-neib (1.0 for all 8) clt_parameters.imp.weight_zero_neibs, // final double weight_zero_neibs,// 0.2; // Reduce weight for no-neib (1.0 for all 8)
half_disparity, // final double half_disparity, // 5.0; // Reduce weight twice for this disparity half_disparity, // final double half_disparity, // 5.0; // Reduce weight twice for this disparity
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment