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;
// clt_corr_combo = null; // Something is broke in old code, tries to use color==3 ==colors.weights.length
image_dtt.clt_aberrations_quad_corr(
clt_parameters.img_dtt,// final ImageDttParameters imgdtt_params, // Now just extra correlation parameters, later will include, most others
1,// final int macro_scale, // to correlate tile data instead of the pixel data: 1 - pixels, 8 - tiles
tile_op,// per-tile operation bit codes
disparity_array,// clt_parameters.disparity, // final double disparity,
image_data,// final double [][][] imade_data, // first index - number of image in a quad
saturation_imp,// boolean [][] saturation_imp, // (near) saturated pixels or null
// correlation results - final and partial
null,// clt_corr_combo, // [tp.tilesY][tp.tilesX][(2*transform_size-1)*(2*transform_size-1)] // if null - will not calculate
null,// 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
// 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.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)
clust_radius,// final int clustRadius, // 1 - single tile, 2 - 3x3, 3 - 5x5, ...
1.0,// final double arange, // absolute disparity range to consolidate
0.1,// final double rrange, // relative disparity range to consolidate
0.5,// final double no_tilt, // no tilt if center disparity is lower
0.01,// final double damp_tilt, // 0.1?
// 2021 new next 5
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)
clt_parameters.img_dtt.mcorr_comb_disp,// final double mcorr_comb_disp, // Combined tile per-pixel disparity for baseline == side of a square
// 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
disparity_map,// [12][tp.tilesY * tp.tilesX]
tilesX*image_dtt.transform_size,// imp_quad[0].getWidth(), // final int width,
clt_parameters.getFatZero(isMonochrome()),// add to denominator to modify phase correlation (same units as data1, data2). <0 - pure sum
// 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)
clust_radius,// final int clustRadius, // 1 - single tile, 2 - 3x3, 3 - 5x5, ...
1.0,// final double arange, // absolute disparity range to consolidate
0.1,// final double rrange, // relative disparity range to consolidate
// 2021 new next 5
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)
clt_parameters.img_dtt.mcorr_comb_disp,// final double mcorr_comb_disp, // Combined tile per-pixel disparity for baseline == side of a square
clt_parameters.tileX,// final int debug_tileX,
clt_parameters.tileY,// final int debug_tileY,
(clt_parameters.dbg_mode&64)!=0,// no fract shift
(clt_parameters.dbg_mode&128)!=0,// no convolve
threadsMax,
debugLevel);
}
}else{// clust_radius
image_dtt.clt_aberrations_quad_corr(
clt_parameters.img_dtt,// final ImageDttParameters imgdtt_params, // Now just extra correlation parameters, later will include, most others
1,// final int macro_scale, // to correlate tile data instead of the pixel data: 1 - pixels, 8 - tiles
...
...
@@ -11458,14 +11683,7 @@ public class QuadCLTCPU {
clt_parameters.img_dtt,// final ImageDttParameters imgdtt_params, // Now just extra correlation parameters, later will include, most others
1,// final int macro_scale, // to correlate tile data instead of the pixel data: 1 - pixels, 8 - tiles
tile_op,// per-tile operation bit codes
disparity_array,// clt_parameters.disparity, // final double disparity,
image_data,// final double [][][] imade_data, // first index - number of image in a quad
saturation_imp,// boolean [][] saturation_imp, // (near) saturated pixels or null
// correlation results - final and partial
null,// clt_corr_combo, // [tp.tilesY][tp.tilesX][(2*transform_size-1)*(2*transform_size-1)] // if null - will not calculate
null,// clt_corr_partial, // [tp.tilesY][tp.tilesX][quad]color][(2*transform_size-1)*(2*transform_size-1)] // if null - will not calculate
null,// mismatch, // 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
if ((set_channels_aux != null) && (set_channels_aux.length <= nSet )) {
throw new Exception ("Set names for cameras do not match: main camera: '"+set_channels_main[nSet].name()+"', aux. camera: nothing");
}
if (!set_channels_main[nSet].name().equals(set_channels_aux[nSet].name())) {
throw new Exception ("Set names for cameras do not match: main camera: '"+set_channels_main[nSet].name()+"', aux. camera: '"+set_channels_main[nSet].name()+"'");