ImageDttimage_dtt=newImageDtt(COLOR_PROC_PARAMETERS.isMonochrome(),CLT_PARAMETERS.getScaleStrength(false));// Bayer, not monochrome
ImageDttimage_dtt=newImageDtt(
CLT_PARAMETERS.transform_size,
COLOR_PROC_PARAMETERS.isMonochrome(),
CLT_PARAMETERS.getScaleStrength(false));// Bayer, not monochrome
String[]titles={
"redCC","redSC","redCS","redSS",
"blueCC","blueSC","blueCS","blueSS",
...
...
@@ -7235,7 +7243,7 @@ private Panel panel1,
for(intchn=0;chn<clt_data.length;chn++){
clt_data2[chn]=image_dtt.clt_shiftXY(
clt_data2[chn],// final double [][][][] dct_data, // array [tilesY][tilesX][4][dct_size*dct_size]
CLT_PARAMETERS.transform_size,// final int dct_size,
/// CLT_PARAMETERS.transform_size, // final int dct_size,
CLT_PARAMETERS.shift_x,// final double shiftX,
CLT_PARAMETERS.shift_y,// final double shiftY,
(CLT_PARAMETERS.dbg_mode>>2)&3,// swap order hor/vert
...
...
@@ -7266,7 +7274,7 @@ private Panel panel1,
clt_corr[chn]=image_dtt.clt_correlate(
clt_data[chn],// final double [][][][] data1, // array [tilesY][tilesX][4][dct_size*dct_size]
clt_data2[chn],// final double [][][][] data2, // array [tilesY][tilesX][4][dct_size*dct_size]
CLT_PARAMETERS.transform_size,// final int dct_size,
/// CLT_PARAMETERS.transform_size, // final int dct_size,
CLT_PARAMETERS.getFatZero(image_dtt.isMonochrome()),// final double fat_zero, // add to denominator to modify phase correlation (same units as data1, data2)
CLT_PARAMETERS.tileX,//final int debug_tileX
CLT_PARAMETERS.tileY,//final int debug_tileY
...
...
@@ -7297,7 +7305,7 @@ private Panel panel1,
image_dtt.clt_lpf(// filter in-place
CLT_PARAMETERS.getCorrSigma(image_dtt.isMonochrome()),// final double sigma,
clt_corr[chn],// final double [][][][] clt_data,
CLT_PARAMETERS.transform_size,
/// CLT_PARAMETERS.transform_size,
THREADS_MAX,// maximal number of threads to launch
kernel_centered,// double [] kernel, // should be (2*dtt_size-1) * (2*dtt_size-1) +4 size (last 4 are not modified)
clt_kernels[chn][tileY][tileX],// double [][] sym_kernels, // set of 4 SS, AS, SA, AA kdernels, each dtt_size * dtt_size (may have 5-th with center shift
dtt_size);// 8
clt_kernels[chn][tileY][tileX]);// , // double [][] sym_kernels, // set of 4 SS, AS, SA, AA kdernels, each dtt_size * dtt_size (may have 5-th with center shift
// 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
// 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
// Tempporarily processing individaully with the old code
// Tempporarily processing individually with the old code
processCLTQuadCorrPairForGPU(
save_prefix,// String save_prefix,
quadCLT_main,// QuadCLT quadCLT_main,
quadCLT_aux,// QuadCLT quadCLT_aux,
imp_srcs_main,// ImagePlus [] imp_quad_main,
...
...
@@ -638,7 +640,10 @@ public class TwoQuadCLT {
double[][]disparity_bimap=newdouble[ImageDtt.BIDISPARITY_TITLES.length][];//[0] -residual disparity, [1] - orthogonal (just for debugging) last 4 - max pixel differences
double[][]disparity_bimap=newdouble[ImageDtt.BIDISPARITY_TITLES.length][];//[0] -residual disparity, [1] - orthogonal (just for debugging) last 4 - max pixel differences
finaldouble[][][][][][][]clt_bidata=// new double[2][quad][nChn][tilesY][tilesX][][]; // first index - main/aux
image_dtt.clt_bi_quad_dbg(
...
...
@@ -1412,24 +1417,69 @@ public class TwoQuadCLT {
quadCLT_aux.getCLTKernels(),// final double [][][][][][] clt_kernels_aux, // [channel_in_quad][color][tileY][tileX][band][pixel] , size should match image (have 1 tile around)
clt_parameters.corr_magic_scale,// final double corr_magic_scale, // still not understood coefficient that reduces reported disparity value. Seems to be around 0.85
true,// final boolean keep_clt_data,
// woi_tops, // final int [][] woi_tops,
ers_delay,// final double [][][] ers_delay, // if not null - fill with tile center acquisition delay
threadsMax,// final int threadsMax, // maximal number of threads to launch
debugLevel,// final int globalDebugLevel);
port_xy_main_dbg,// final double [][][] port_xy_main_dbg, // for each tile/port save x,y pixel coordinates (gpu code development)
port_xy_aux_dbg);// final double [][][] port_xy_aux_dbg) // for each tile/port save x,y pixel coordinates (gpu code development)
clt_parameters,// final EyesisCorrectionParameters.CLTParameters clt_parameters,
clt_parameters.getFatZero(image_dtt.isMonochrome()),// final double fatzero, // May use correlation fat zero from 2 different parameters - fat_zero and rig.ml_fatzero
clt_parameters,// final EyesisCorrectionParameters.CLTParameters clt_parameters,
clt_parameters.getFatZero(image_dtt.isMonochrome()),// final double fatzero, // May use correlation fat zero from 2 different parameters - fat_zero and rig.ml_fatzero
null,// ml_data, // final double [][] ml_data, // data for ML - 10 layers - 4 center areas (3x3, 5x5,..) per camera-per direction, 1 - composite, and 1 with just 1 data (target disparity)
texture_tiles[0],// final double [][][][] texture_tiles_main, // [tilesY][tilesX]["RGBA".length()][]; null - will skip images combining
texture_tiles[1],// final double [][][][] texture_tiles_aux, // [tilesY][tilesX]["RGBA".length()][]; null - will skip images combining
quadCLT_main.tp.getTilesX()*clt_parameters.transform_size,// final int width,
quadCLT_main.tp.getTilesX()*image_dtt.transform_size,// final int width,
quadCLT_main.getGeometryCorrection(),// final GeometryCorrection geometryCorrection_main,
quadCLT_aux.getGeometryCorrection(),// final GeometryCorrection geometryCorrection_aux,
double[][]disparity_bimap=newdouble[ImageDtt.BIDISPARITY_TITLES.length][];//[0] -residual disparity, [1] - orthogonal (just for debugging) last 4 - max pixel differences
ml_data,// final double [][] ml_data, // data for ML - 10 layers - 4 center areas (3x3, 5x5,..) per camera-per direction, 1 - composite, and 1 with just 1 data (target disparity)
null,// final double [][][][] texture_tiles_main, // [tilesY][tilesX]["RGBA".length()][]; null - will skip images combining
null,// final double [][][][] texture_tiles_aux, // [tilesY][tilesX]["RGBA".length()][]; null - will skip images combining
quadCLT_main.tp.getTilesX()*clt_parameters.transform_size,// final int width,
quadCLT_main.tp.getTilesX()*image_dtt.transform_size,// final int width,
quadCLT_main.getGeometryCorrection(),// final GeometryCorrection geometryCorrection_main,
quadCLT_aux.getGeometryCorrection(),// final GeometryCorrection geometryCorrection_aux,
double[][]disparity_bimap=newdouble[ImageDtt.BIDISPARITY_TITLES.length][];//[0] -residual disparity, [1] - orthogonal (just for debugging) last 4 - max pixel differences
image_dtt.clt_bi_quad(
clt_parameters,// final EyesisCorrectionParameters.CLTParameters clt_parameters,
ml_data,// final double [][] ml_data, // data for ML - 10 layers - 4 center areas (3x3, 5x5,..) per camera-per direction, 1 - composite, and 1 with just 1 data (target disparity)
null,// final double [][][][] texture_tiles_main, // [tilesY][tilesX]["RGBA".length()][]; null - will skip images combining
null,// final double [][][][] texture_tiles_aux, // [tilesY][tilesX]["RGBA".length()][]; null - will skip images combining
// quadCLT_main.tp.getTilesX()*clt_parameters.transform_size, // final int width,
quadCLT_aux.tp.getTilesX()*clt_parameters.transform_size,// final int width,
// quadCLT_main.tp.getTilesX()*image_dtt.transform_size, // final int width,
quadCLT_aux.tp.getTilesX()*image_dtt.transform_size,// final int width,
null,// quadCLT_main.getGeometryCorrection(), // final GeometryCorrection geometryCorrection_main,
quadCLT_aux.getGeometryCorrection(),// final GeometryCorrection geometryCorrection_aux,