// each of the top elements may be null to skip particular combo type
clt_parameters.getGpuFatZero(isMonochrome()),// final double gpu_fat_zero, // clt_parameters.getGpuFatZero(is_mono);absolute == 30.0\
null,// final float [][][][] fdisp_dist, // [tilesY][tilesX][cams][4], // disparity derivatives vectors or null
clt_parameters.gpu_sigma_r,// 0.9, 1.1
null,// final float [][][][] fpxpy, // [tilesY][tilesX][cams][2], tile {pX,pY}
clt_parameters.gpu_sigma_b,// 0.9, 1.1
//// Uses quadCLT from gpuQuad
clt_parameters.gpu_sigma_g,// 0.6, 0.7
// correlation results - final and partial
clt_parameters.gpu_sigma_m,// = 0.4; // 0.7;
null,// [type][tilesY][tilesX][(2*transform_size-1)*(2*transform_size-1)] // if null - will not calculate
(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_parameters.getGpuFatZero(isMonochrome()),// final double gpu_fat_zero, // clt_parameters.getGpuFatZero(is_mono);absolute == 30.0\
clt_parameters.tileY,// final int debug_tileY,
clt_parameters.gpu_sigma_r,// 0.9, 1.1
threadsMax,
clt_parameters.gpu_sigma_b,// 0.9, 1.1
debugLevel);
clt_parameters.gpu_sigma_g,// 0.6, 0.7
clt_parameters.gpu_sigma_m,// = 0.4; // 0.7;
}else{
(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;
image_dtt.clt_aberrations_quad_corr_GPU(// USED in LWIR
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
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)
// 2021 new next 5
image_dtt.clt_aberrations_quad_corr(
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,// final ImageDttParameters imgdtt_params, // Now just extra correlation parameters, later will include, most others
clt_parameters.img_dtt.mcorr_comb_width,// final int mcorr_comb_width, // combined correlation tile width
1,// final int macro_scale, // to correlate tile data instead of the pixel data: 1 - pixels, 8 - tiles
clt_parameters.img_dtt.mcorr_comb_height,// final int mcorr_comb_height, // combined correlation tile full height
tile_op,// per-tile operation bit codes
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)
disparity_array,// clt_parameters.disparity, // final double disparity,
clt_parameters.img_dtt.mcorr_comb_disp,// final double mcorr_comb_disp, // Combined tile per-pixel disparity for baseline == side of a square
image_data,// final double [][][] imade_data, // first index - number of image in a quad
saturation_imp,// boolean [][] saturation_imp, // (near) saturated pixels or null
clt_parameters.tileX,// final int debug_tileX,
// correlation results - final and partial
clt_parameters.tileY,// final int debug_tileY,
// 2021 replaced next 3
(clt_parameters.dbg_mode&64)!=0,// no fract shift
null,// final double [][][][] clt_corr_out, // sparse (by the first index) [type][tilesY][tilesX][(2*transform_size-1)*(2*transform_size-1)] or null
(clt_parameters.dbg_mode&128)!=0,// no convolve
null,// final double [][][][] clt_combo_out, // sparse (by the first index) [type][tilesY][tilesX][(combo_tile_size] or null
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)
// 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
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
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{
image_dtt.clt_aberrations_quad_corr_multi(
clt_parameters.img_dtt,// final ImageDttParameters imgdtt_params, // Now just extra correlation parameters, later will include, most others
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
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
tile_op,// per-tile operation bit codes
...
@@ -11388,12 +11616,13 @@ public class QuadCLTCPU {
...
@@ -11388,12 +11616,13 @@ public class QuadCLTCPU {
image_data,// final double [][][] imade_data, // first index - number of image in a quad
image_data,// final double [][][] imade_data, // first index - number of image in a quad
saturation_imp,// boolean [][] saturation_imp, // (near) saturated pixels or null
saturation_imp,// boolean [][] saturation_imp, // (near) saturated pixels or null
// correlation results - final and partial
// 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
// 2021 replaced next 3
null,// clt_corr_partial, // [tp.tilesY][tp.tilesX][quad]color][(2*transform_size-1)*(2*transform_size-1)] // if null - will not calculate
null,// final double [][][][] clt_corr_out, // sparse (by the first index) [type][tilesY][tilesX][(2*transform_size-1)*(2*transform_size-1)] or null
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
null,// final double [][][][] clt_combo_out, // sparse (by the first index) [type][tilesY][tilesX][(combo_tile_size] or null
// 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.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_x,// final int shiftX, // shift image horizontally (positive - right) - just for testing
clt_parameters.shift_y,// final int shiftY, // shift image vertically (positive - down)
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
// 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
mcorr_sel,// final int mcorr_sel, // Which pairs to correlate // +1 - all, +2 - dia, +4 - sq, +8 - neibs, +16 - hor + 32 - vert
clt_parameters.corr_magic_scale,// still not understood coefficient that reduces reported disparity value. Seems to be around 0.85
clt_parameters.img_dtt.mcorr_comb_width,// final int mcorr_comb_width, // combined correlation tile width
clt_parameters.shift_x,// final int shiftX, // shift image horizontally (positive - right) - just for testing
clt_parameters.img_dtt.mcorr_comb_height,// final int mcorr_comb_height, // combined correlation tile full height
clt_parameters.shift_y,// final int shiftY, // shift image vertically (positive - down)
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.tileX,// final int debug_tileX,
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
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)
// 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
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");
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())) {
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()+"'");
throw new Exception ("Set names for cameras do not match: main camera: '"+set_channels_main[nSet].name()+"', aux. camera: '"+set_channels_main[nSet].name()+"'");