// double [][] disparity_map = new double [8][]; //[0] -residual disparity, [1] - orthogonal (just for debugging)
double[][]disparity_map=newdouble[12][];//[0] -residual disparity, [1] - orthogonal (just for debugging) last 4 - max pixel differences
double[][]disparity_map=newdouble[ImageDtt.DISPARITY_TITLES.length][];//[0] -residual disparity, [1] - orthogonal (just for debugging) last 4 - max pixel differences
//TODO: Add array of default disparity - use for combining images in force disparity mode (no correlation), when disparity is predicted from other tiles
// undecided, so 2 modes of combining alpha - same as rgb, or use center tile only
double[][][][]clt_corr_combo=newdouble[2][tilesY][tilesX][];// will only be used inside?
// double [][][][] clt_corr_combo = new double [2][tilesY][tilesX][]; // will only be used inside?
double[][][][]clt_corr_combo=newdouble[ImageDtt.TCORR_TITLES.length][tilesY][tilesX][];// will only be used inside?
// for the integer maximum provide contrast and variety
max_index=icorr_max[1]*corr_size+icorr_max[0];
disparity_map[6][tileY*tilesX+tileX]=tcorr_combo[0][max_index];// correlation combo value at the integer maximum
disparity_map[DISPARITY_STRENGTH_INDEX][tIndex]=tcorr_combo[TCORR_COMBO_RSLT][max_index];// correlation combo value at the integer maximum
// undo scaling caused by optional normalization
disparity_map[7][tileY*tilesX+tileX]=(rms[1]*tcorr_combo[1][max_index])/(rms[0]*tcorr_combo[0][max_index]);// correlation combo value at the integer maximum
// disparity_map[DISPARITY_VARIATIONS_INDEX][tIndex] = (rms[1]*tcorr_combo[1][max_index])/(rms[0]*tcorr_combo[0][max_index]); // correlation combo value at the integer maximum
disparity_map[DISPARITY_VARIATIONS_INDEX][tIndex]=(tcorr_combo[TCORR_COMBO_SUM][max_index])/(tcorr_combo[TCORR_COMBO_RSLT][max_index]);// correlation combo value at the integer maximum
// Calculate "center of mass" coordinates
double[]corr_max_XYm=getMaxXYCm(// get fractiona center as a "center of mass" inside circle/square from the integer max