// 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
disp_str[0]=-corr_stat[0];
disparity_map[DISPARITY_INDEX_CM][tIndex]=disp_str[0];// disparity is negative X
if(disparity_map!=null){
disparity_map[DISPARITY_INDEX_CM][tIndex]=disp_str[0];// disparity is negative X
}
if(tile_lma_debug_level>0){
System.out.println("Will run getMaxXSOrtho( ) for tileX="+tileX+", tileY="+tileY);
}
...
...
@@ -1277,16 +1323,20 @@ public class ImageDtt extends ImageDttCPU {
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,
tile_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
null,// disp_str[cTile], //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,
tileX,// int tileX, // just for debug output
tileY);// int tileY
if(lma2!=null){
// was for single tile
disp_str=lma2.lmaDisparityStrength(
imgdtt_params.lmas_max_rel_rms,// maximal relative (to average max/min amplitude LMA RMS) // May be up to 0.3)
imgdtt_params.lmas_min_strength,// minimal composite strength (sqrt(average amp squared over absolute RMS)
imgdtt_params.lmas_min_ac,// minimal of A and C coefficients maximum (measures sharpest point/line)
clt_corr_combo, // [tp.tilesY][tp.tilesX][(2*transform_size-1)*(2*transform_size-1)] // if null - will not calculate
clt_corr_partial, // null, // 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
clt_parameters.getGpuFatZero(isMonochrome()),// final double gpu_fat_zero, // clt_parameters.getGpuFatZero(is_mono);absolute == 30.0\
clt_parameters.gpu_sigma_r,// 0.9, 1.1
clt_parameters.gpu_sigma_b,// 0.9, 1.1
clt_parameters.gpu_sigma_g,// 0.6, 0.7
clt_parameters.gpu_sigma_m,// = 0.4; // 0.7;
(isMonochrome()?1.0:clt_parameters.gpu_sigma_rb_corr),// final double gpu_sigma_rb_corr, // = 0.5; // apply LPF after accumulating R and B correlation before G, monochrome ? 1.0 : gpu_sigma_rb_corr;
float[][][][]corr_td_blur=image_dtt.blur_corr_GPU(// convert to pixel domain and process correlations already prepared in fcorr_td and/or fcorr_combo_td
// final ImageDttParameters imgdtt_params, // Now just extra correlation parameters, later will include, most others
corr_td,// final float [][][][] fcorr_td, // [tilesY][tilesX][pair][4*64] transform domain representation of 6 corr pairs
// final int debug_tileX,
// final int debug_tileY,
threadsMax,// final int threadsMax, // maximal number of threads to launch
debugLevel);// final int globalDebugLevel)
float[][][][]corr_combo_blur=image_dtt.blur_corr_combo_GPU(// convert to pixel domain and process correlations already prepared in fcorr_td and/or fcorr_combo_td
// final ImageDttParameters imgdtt_params, // Now just extra correlation parameters, later will include, most others
corr_combo_td,// final float [][][][] fcorr_combo_td, // [n][tilesY][tilesX][4*64] transform domain representation of combined corr pairs
// final int debug_tileX,
// final int debug_tileY,
threadsMax,// final int threadsMax, // maximal number of threads to launch
debugLevel);// final int globalDebugLevel)
image_dtt.clt_process_tl_correlations_GPU(// convert to pixel domain and process correlations already prepared in fcorr_td and/or fcorr_combo_td
clt_parameters.img_dtt,// final ImageDttParameters imgdtt_params, // Now just extra correlation parameters, later will include, most others
// both arrays should have same non-null tiles
corr_td_blur,// final float [][][][] corr_td, // [tilesY][tilesX][pair][4*64] transform domain representation of 6 corr pairs
corr_combo_blur,// final float [][][][] corr_combo_td, // [4][tilesY][tilesX][pair][4*64] TD of combo corrs: qud, cross, hor,vert
// each of the top elements may be null to skip particular combo type
null,// final double [][][][] corr_tiles, // [tilesY][tilesX][pair][] ([(2*gpu_corr_rad+1)*(2*gpu_corr_rad+1)]) or null
clt_corr_partial1,// final double [][][][][] clt_corr_partial,// [tilesY][tilesX][quad]color][(2*transform_size-1)*(2*transform_size-1)] // if null - will not calculate
// [tilesY][tilesX] should be set by caller
// When clt_mismatch is non-zero, no far objects extraction will be attempted
null,// final double [][] clt_mismatch, // [12][tilesY * tilesX] // ***** transpose unapplied ***** ?. null - do not calculate
// values in the "main" directions have disparity (*_CM) subtracted, in the perpendicular - as is
disparity_map1,// final double [][] disparity_map, // [8][tilesY][tilesX], only [6][] is needed on input or null - do not calculate
// last 2 - contrast, avg/ "geometric average)
disparity_modes,// final int disparity_modes, // bit mask of disparity_map slices to calculate/return
gpu_fat_zero,// final double gpu_fat_zero, // clt_parameters.getGpuFatZero(is_mono);absolute == 30.0\
clt_parameters.gpu_sigma_r,// 0.9, 1.1
clt_parameters.gpu_sigma_b,// 0.9, 1.1
clt_parameters.gpu_sigma_g,// 0.6, 0.7
clt_parameters.gpu_sigma_m,// = 0.4; // 0.7;
(isMonochrome()?1.0:clt_parameters.gpu_sigma_rb_corr),// final double gpu_sigma_rb_corr, // = 0.5; // apply LPF after accumulating R and B correlation before G, monochrome ? 1.0 : gpu_sigma_rb_corr;
gpu_fat_zero,// final double gpu_fat_zero, // clt_parameters.getGpuFatZero(is_mono);absolute == 30.0\
geometryCorrection,// final GeometryCorrection geometryCorrection,
null,// geometryCorrection_main, // final GeometryCorrection geometryCorrection_main, // if not null correct this camera (aux) to the coordinates of the main
disparity_corr,// final double disparity_corr, // disparity at infinity
clt_parameters.tileStep,// final int tileStep, // process tileStep x tileStep cluster of tiles when adjusting lazy eye parameters
clt_parameters.tileX,// final int debug_tileX,
clt_parameters.tileY,// final int debug_tileY,
threadsMax,
debugLevel);
}
scan.setLazyEyeData(lazy_eye_data);
scan.is_measured=true;// but no disparity map/textures