double[]dd_deriv=newdouble[3];// derivatives by dependent dd_pre_lars, dd_last and nd_last (calculated on demand) with sign according to first/second in a pair
// process ddisp (last camera not used, is equal to minus sum of others to make a sum == 0)
if(lazy_eye){
for(intf=0;f<NUM_CAMS;f++)if(par_map[ddisp_index+f]>=0){// -1 for the last_cam
for(intf=0;f<num_cams;f++)if(par_map[ddisp_index+f]>=0){// -1 for the last_cam
jt[par_map[ddisp_index+f]][ns]=0.0;
jt[par_map[ndisp_index+f]][ns]=0.0;
}
double[]dd_deriv=newdouble[3];// derivatives by dependent dd_pre_lars, dd_last and nd_last (calculated on demand) with sign according to first/second in a pair
// proceed only if CM correlation result is non-null // for compatibility with old code we need it to run regardless of the strength of the normal correlation
if(corr_stat!=null){
// skipping DISPARITY_VARIATIONS_INDEX - it was not used
...
...
@@ -3359,19 +3358,20 @@ public class ImageDttCPU {
}
// debug new LMA correlations
if (debugTile) {
if(debugTile0){// should be debugTile
System.out.println("Will run new LMA for tileX="+tileX+", tileY="+tileY);
corr_wnd,// double [][] corr_wnd, // correlation window to save on re-calculation of the window
corr_wnd_inv_limited,// corr_wnd_limited, // correlation window, limited not to be smaller than threshold - used for finding max/convex areas (or null)
corrs, // double [][] corrs,
corr_tiles,// corrs, // double [][] corrs,
disp_dist,
rXY,// double [][] rXY, // non-distorted X,Y offset per nominal pixel of disparity
imgdtt_params.dbg_pair_mask, // int pair_mask, // which pairs to process
// all that are not null in corr_tiles
correlation2d.selectAll(),// longToArray(imgdtt_params.dbg_pair_mask), // int pair_mask, // which pairs to process
disp_str,//corr_stat[0], // double xcenter, // preliminary center x in pixels for largest baseline
poly_disp,// double[] poly_ds, // null or pair of disparity/strength
imgdtt_params.ortho_vasw_pwr,// double vasw_pwr, // value as weight to this power,
...
...
@@ -3392,6 +3392,8 @@ public class ImageDttCPU {
lma2.printStats(ds,1);
}
}
/*
// disparity_map[DISPARITY_INDEX_CM + 1][tIndex] = // y not available here
// calculate/fill out hor and vert
...
...
@@ -3605,7 +3607,9 @@ public class ImageDttCPU {
}
}
}
*/
}// end of if (corr_stat != null)
/*
if (corr_mode == 0) extra_disparity = disparity_map[DISPARITY_INDEX_INT][tIndex];
else if (corr_mode == 1) extra_disparity = disparity_map[DISPARITY_INDEX_CM][tIndex];
else if (corr_mode == 2) extra_disparity = disparity_map[DISPARITY_INDEX_POLY][tIndex];
...
...
@@ -6973,12 +6977,13 @@ public class ImageDttCPU {