// corr_wndy, // double [] window_y, // (half) window function in y-direction(perpendicular to disparity: for row0 ==1
// corr_wndx, // double [] window_x, // half of a window function in x (disparity) direction
(tile_lma_debug_level>0));// boolean debug);
}
// 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(disparity_map!=null){
if(corr_stat[cTile]!=null){
disparity_map[DISPARITY_INDEX_CM][tIndex]=-corr_stat[cTile][0];// disp_str[cTile][0]; // disparity is negative X
disparity_map[DISPARITY_INDEX_INT+1][tIndex]=-corr_stat[cTile][0]/.85+disparity_array[tileY][tileX]+disparity_corr;// disp_str[cTile][0]; // disparity is negative X
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[cTile],// corrs, // double [][] corrs,
disp_dist[cTile],
rXY,// double [][] rXY, // non-distorted X,Y offset per nominal pixel of disparity
// all that are not null in corr_tiles
correlation2d.selectAll(),// longToArray(imgdtt_params.dbg_pair_mask), // int pair_mask, // which pairs to process
null,// 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,
tdl,// tile_lma_debug_level, // +2, // int debug_level,
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,// corrs, // double [][][] corrs,
disp_dist,
rXY,// double [][] rXY, // non-distorted X,Y offset per nominal pixel of disparity
// 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
imgdtt_params.ortho_vasw_pwr,// double vasw_pwr, // value as weight to this power,
clust_lma_debug_level+0,// // +2, // int debug_level,
// 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){
...
...
@@ -4231,8 +4044,6 @@ public class ImageDttCPU {
}// end of if (corr_stat != null)
}// if (disparity_map != null){ // not null - calculate correlations
// only debug is left
if(texture_tiles!=null){
if((extra_disparity!=0)&&!getForcedDisparity(tile_op[tileY][tileX])){// 0 - adjust disparity, 1 - use provided
...
...
@@ -4242,7 +4053,6 @@ public class ImageDttCPU {
if(clt_data[i][ncol]!=null){
fract_shift(// fractional shift in transform domain. Currently uses sin/cos - change to tables with 2? rotations
image_data,// final double [][][] imade_data, // first index - number of image in a quad
saturation_imp,// final boolean [][] saturation_imp, // (near) saturated pixels or null
tilesX*image_dtt.transform_size,// final int width,
clt_parameters.getFatZero(isMonochrome()),// final double corr_fat_zero, // add to denominator to modify phase correlation (same units as data1, data2). <0 - pure sum
clt_parameters.corr_red,// final double corr_red,
clt_parameters.corr_blue,// final double corr_blue,
clt_parameters.getCorrSigma(image_dtt.isMonochrome()),// final double corr_sigma,
min_corr_selected,// 0.0001; //final double min_corr, // 0.02; // minimal correlation value to consider valid
geometryCorrection,// final GeometryCorrection geometryCorrection,
null,// final GeometryCorrection geometryCorrection_main, // if not null correct this camera (aux) to the coordinates of the main
clt_kernels,// final double [][][][][][] clt_kernels, // [channel_in_quad][color][tileY][tileX][band][pixel] , size should match image (have 1 tile around)
clt_parameters.kernel_step,// final int kernel_step,
clt_parameters.clt_window,// final int window_type,
shiftXY,// final double [][] shiftXY, // [port]{shiftX,shiftY}
disparity_corr,// final double disparity_corr, // disparity at infinity
clt_parameters.shift_x,// final double shiftX, // shift image horizontally (positive - right) - just for testing
clt_parameters.corr_magic_scale,// still not understood coefficient that reduces reported disparity value. Seems to be around 0.85
clt_parameters.shift_x,// final int shiftX, // shift image horizontally (positive - right) - just for testing
clt_parameters.shift_y,// final int shiftY, // shift image vertically (positive - down)
mcorr_sel,// final int mcorr_sel, // Which pairs to correlate // +1 - all, +2 - dia, +4 - sq, +8 - neibs, +16 - hor + 32 - vert
clt_parameters.img_dtt.mcorr_comb_width,// final int mcorr_comb_width, // combined correlation tile width
clt_parameters.img_dtt.mcorr_comb_height,// final int mcorr_comb_height, // combined correlation tile full height
clt_parameters.img_dtt.mcorr_comb_offset,// final int mcorr_comb_offset, // combined correlation tile height offset: 0 - centered (-height/2 to height/2), height/2 - only positive (0 to height)
...
...
@@ -6215,6 +6223,7 @@ public class QuadCLTCPU {
z_correction+=clt_parameters.z_corr_map.get(name);// not used in lwir
image_data,// final double [][][] imade_data, // first index - number of image in a quad
saturation_imp,// final boolean [][] saturation_imp, // (near) saturated pixels or null
tilesX*image_dtt.transform_size,// final int width,
clt_parameters.getFatZero(isMonochrome()),// final double corr_fat_zero, // add to denominator to modify phase correlation (same units as data1, data2). <0 - pure sum
clt_parameters.corr_red,// final double corr_red,
clt_parameters.corr_blue,// final double corr_blue,
clt_parameters.getCorrSigma(image_dtt.isMonochrome()),// final double corr_sigma,
min_corr_selected,// 0.0001; //final double min_corr, // 0.02; // minimal correlation value to consider valid
geometryCorrection,// final GeometryCorrection geometryCorrection,
null,// final GeometryCorrection geometryCorrection_main, // if not null correct this camera (aux) to the coordinates of the main
clt_kernels,// final double [][][][][][] clt_kernels, // [channel_in_quad][color][tileY][tileX][band][pixel] , size should match image (have 1 tile around)
clt_parameters.kernel_step,// final int kernel_step,
clt_parameters.clt_window,// final int window_type,
shiftXY,// final double [][] shiftXY, // [port]{shiftX,shiftY}
disparity_corr,// final double disparity_corr, // disparity at infinity
clt_parameters.shift_x,// final double shiftX, // shift image horizontally (positive - right) - just for testing
image_data,// final double [][][] imade_data, // first index - number of image in a quad
saturation_imp,// final boolean [][] saturation_imp, // (near) saturated pixels or null
tilesX*image_dtt.transform_size,// final int width,
clt_parameters.getFatZero(isMonochrome()),// final double corr_fat_zero, // add to denominator to modify phase correlation (same units as data1, data2). <0 - pure sum
clt_parameters.corr_red,// final double corr_red,
clt_parameters.corr_blue,// final double corr_blue,
clt_parameters.getCorrSigma(image_dtt.isMonochrome()),// final double corr_sigma,
min_corr_selected,// 0.0001; //final double min_corr, // 0.02; // minimal correlation value to consider valid
geometryCorrection,// final GeometryCorrection geometryCorrection,
null,// final GeometryCorrection geometryCorrection_main, // if not null correct this camera (aux) to the coordinates of the main
clt_kernels,// final double [][][][][][] clt_kernels, // [channel_in_quad][color][tileY][tileX][band][pixel] , size should match image (have 1 tile around)
clt_parameters.kernel_step,// final int kernel_step,
clt_parameters.clt_window,// final int window_type,
shiftXY,// final double [][] shiftXY, // [port]{shiftX,shiftY}
disparity_corr,// final double disparity_corr, // disparity at infinity
clt_parameters.shift_x,// final double shiftX, // shift image horizontally (positive - right) - just for testing