Commit e608c208 authored by Andrey Filippov's avatar Andrey Filippov

matching gpu/cpu

parent 0777a4a7
...@@ -774,11 +774,11 @@ public class CLTParameters { ...@@ -774,11 +774,11 @@ public class CLTParameters {
public double gpu_sigma_b = 0.9; // 1.1; public double gpu_sigma_b = 0.9; // 1.1;
public double gpu_sigma_g = 0.6; // 0.7; public double gpu_sigma_g = 0.6; // 0.7;
public double gpu_sigma_m = 0.4; // 0.7; public double gpu_sigma_m = 0.4; // 0.7;
public double gpu_sigma_rb_corr = 0.5; // apply LPF after accumulating R and B correlation before G, public double gpu_sigma_rb_corr = 0.3; // apply LPF after accumulating R and B correlation before G,
public double gpu_sigma_corr = 0.9; public double gpu_sigma_corr = 0.8;
public double gpu_sigma_corr_m = 0.15; public double gpu_sigma_corr_m = 0.15;
public double gpu_fatz = 30.0; public double gpu_fatz = 500.0; // was 30
public double gpu_fatz_m = 30.0; public double gpu_fatz_m = 500.0; // was 30
public boolean gpu_woi = false; // if true - use gpu_woi_tx, ... public boolean gpu_woi = false; // if true - use gpu_woi_tx, ...
public int gpu_woi_tx = 0; public int gpu_woi_tx = 0;
......
...@@ -990,7 +990,6 @@ public class Correlation2d { ...@@ -990,7 +990,6 @@ public class Correlation2d {
public double [][] scaleRotateInterpoateCorrelations(// USED in lwir public double [][] scaleRotateInterpoateCorrelations(// USED in lwir
double [][] correlations, double [][] correlations,
int pairs_mask, int pairs_mask,
// int sub_sampling,
int hwidth, int hwidth,
int debug_mask int debug_mask
) { ) {
......
...@@ -45,7 +45,7 @@ public class ImageDtt extends ImageDttCPU { ...@@ -45,7 +45,7 @@ public class ImageDtt extends ImageDttCPU {
} }
// public double [][][][][][] // public double [][][][][][]
public void clt_aberrations_quad_corr_GPU( // USED in LWIR public void clt_aberrations_quad_corr_GPU(
final ImageDttParameters imgdtt_params, // Now just extra correlation parameters, later will include, most others final ImageDttParameters imgdtt_params, // Now just extra correlation parameters, later will include, most others
final int macro_scale, // to correlate tile data instead of the pixel data: 1 - pixels, 8 - tiles final int macro_scale, // to correlate tile data instead of the pixel data: 1 - pixels, 8 - tiles
final int [][] tile_op, // [tilesY][tilesX] - what to do - 0 - nothing for this tile final int [][] tile_op, // [tilesY][tilesX] - what to do - 0 - nothing for this tile
...@@ -412,14 +412,6 @@ public class ImageDtt extends ImageDttCPU { ...@@ -412,14 +412,6 @@ public class ImageDtt extends ImageDttCPU {
// does it need correlations? // does it need correlations?
if (fneed_corr) { if (fneed_corr) {
//Generate 2D phase correlations from the CLT representation //Generate 2D phase correlations from the CLT representation
/*
gpuQuad.execCorr2D(
col_weights, // scales,// double [] scales,
gpu_fat_zero, // double fat_zero);
gpu_corr_rad); // int corr_radius
final int [] corr_indices = gpuQuad.getCorrIndices();
final float [][] fcorr2D = gpuQuad.getCorr2D(gpu_corr_rad); // int corr_rad);
*/
gpuQuad.execCorr2D_TD(col_weights); // Get TD version of correlations (may be read out and saved) gpuQuad.execCorr2D_TD(col_weights); // Get TD version of correlations (may be read out and saved)
final int [] corr_indices = gpuQuad.getCorrIndices(); final int [] corr_indices = gpuQuad.getCorrIndices();
gpuQuad.execCorr2D_normalize( gpuQuad.execCorr2D_normalize(
...@@ -427,7 +419,8 @@ public class ImageDtt extends ImageDttCPU { ...@@ -427,7 +419,8 @@ public class ImageDtt extends ImageDttCPU {
gpu_fat_zero, // double fat_zero); gpu_fat_zero, // double fat_zero);
gpu_corr_rad); // int corr_radius gpu_corr_rad); // int corr_radius
final float [][] fcorr2D = gpuQuad.getCorr2D(gpu_corr_rad); // int corr_rad); final float [][] fcorr2D = gpuQuad.getCorr2D(gpu_corr_rad); // int corr_rad);
// calculate combine quad correlation
// Combine 4 ortho pairs
gpuQuad.execCorr2D_combine( // calculate cross pairs gpuQuad.execCorr2D_combine( // calculate cross pairs
true, // boolean init_corr, // initialize output tiles (false - add to current) true, // boolean init_corr, // initialize output tiles (false - add to current)
GPUTileProcessor.NUM_PAIRS, // int num_pairs_in, // typically 6 - number of pairs per tile (tile task should have same number per each tile GPUTileProcessor.NUM_PAIRS, // int num_pairs_in, // typically 6 - number of pairs per tile (tile task should have same number per each tile
...@@ -437,22 +430,42 @@ public class ImageDtt extends ImageDttCPU { ...@@ -437,22 +430,42 @@ public class ImageDtt extends ImageDttCPU {
true, // boolean combo, // normalize combo correlations (false - per-pair ones) true, // boolean combo, // normalize combo correlations (false - per-pair ones)
gpu_fat_zero, // double fat_zero); gpu_fat_zero, // double fat_zero);
gpu_corr_rad); // int corr_radius gpu_corr_rad); // int corr_radius
final int [] corr_quad_indices = gpuQuad.getCorrComboIndices(); // get quad final int [] corr_quad_indices = gpuQuad.getCorrComboIndices(); // get quad
final float [][] fcorr2D_quad = gpuQuad.getCorr2DCombo(gpu_corr_rad); final float [][] fcorr2D_quad = gpuQuad.getCorr2DCombo(gpu_corr_rad);
// calculate and get cross here
// Combine 2 diagonal pairs
gpuQuad.execCorr2D_combine( // calculate cross pairs gpuQuad.execCorr2D_combine( // calculate cross pairs
true, // boolean init_corr, // initialize output tiles (false - add to current) true, // boolean init_corr, // initialize output tiles (false - add to current)
GPUTileProcessor.NUM_PAIRS, // int num_pairs_in, // typically 6 - number of pairs per tile (tile task should have same number per each tile GPUTileProcessor.NUM_PAIRS, // int num_pairs_in, // typically 6 - number of pairs per tile (tile task should have same number per each tile
0x30); // int pairs_mask // selected pairs (0x3 - horizontal, 0xc - vertical, 0xf - quad, 0x30 - cross) 0x30); // int pairs_mask // selected pairs (0x3 - horizontal, 0xc - vertical, 0xf - quad, 0x30 - cross)
gpuQuad.execCorr2D_normalize(
true, // boolean combo, // normalize combo correlations (false - per-pair ones)
gpu_fat_zero, // double fat_zero);
gpu_corr_rad); // int corr_radius
final float [][] fcorr2D_cross = gpuQuad.getCorr2DCombo(gpu_corr_rad);
// Combine 2 horizontal pairs
gpuQuad.execCorr2D_combine( // calculate cross pairs
true, // boolean init_corr, // initialize output tiles (false - add to current)
GPUTileProcessor.NUM_PAIRS, // int num_pairs_in, // typically 6 - number of pairs per tile (tile task should have same number per each tile
0x03); // int pairs_mask // selected pairs (0x3 - horizontal, 0xc - vertical, 0xf - quad, 0x30 - cross)
gpuQuad.execCorr2D_normalize( gpuQuad.execCorr2D_normalize(
true, // boolean combo, // normalize combo correlations (false - per-pair ones) true, // boolean combo, // normalize combo correlations (false - per-pair ones)
gpu_fat_zero, // double fat_zero); gpu_fat_zero, // double fat_zero);
gpu_corr_rad); // int corr_radius gpu_corr_rad); // int corr_radius
final float [][] fcorr2D_hor = gpuQuad.getCorr2DCombo(gpu_corr_rad);
// Combine 2 vertical pairs
gpuQuad.execCorr2D_combine( // calculate cross pairs
true, // boolean init_corr, // initialize output tiles (false - add to current)
GPUTileProcessor.NUM_PAIRS, // int num_pairs_in, // typically 6 - number of pairs per tile (tile task should have same number per each tile
0x0c); // int pairs_mask // selected pairs (0x3 - horizontal, 0xc - vertical, 0xf - quad, 0x30 - cross)
gpuQuad.execCorr2D_normalize(
true, // boolean combo, // normalize combo correlations (false - per-pair ones)
gpu_fat_zero, // double fat_zero);
gpu_corr_rad); // int corr_radius
final float [][] fcorr2D_vert = gpuQuad.getCorr2DCombo(gpu_corr_rad);
// final int [] corr_cross_indices = gpuQuad.getCorrComboIndices(); // cross indices are the quad
final float [][] fcorr2D_cross = gpuQuad.getCorr2DCombo(gpu_corr_rad);
if (corr_indices.length > 0) { if (corr_indices.length > 0) {
...@@ -508,12 +521,14 @@ public class ImageDtt extends ImageDttCPU { ...@@ -508,12 +521,14 @@ public class ImageDtt extends ImageDttCPU {
for (int indx_tile = ai.getAndIncrement(); indx_tile < num_tiles; indx_tile = ai.getAndIncrement()) { for (int indx_tile = ai.getAndIncrement(); indx_tile < num_tiles; indx_tile = ai.getAndIncrement()) {
// double [][] corrs = new double [GPUTileProcessor.NUM_PAIRS][corr_length]; // 225-long (15x15) // double [][] corrs = new double [GPUTileProcessor.NUM_PAIRS][corr_length]; // 225-long (15x15)
// added quad and cross combos // added quad and cross combos
double [][] corrs = new double [GPUTileProcessor.NUM_PAIRS + 2][corr_length]; // 225-long (15x15) double [][] corrs = new double [GPUTileProcessor.NUM_PAIRS + 4][corr_length]; // 225-long (15x15)
int indx_corr = indx_tile * num_tile_corr; int indx_corr = indx_tile * num_tile_corr;
int nt = (corr_indices[indx_corr] >> GPUTileProcessor.CORR_NTILE_SHIFT); int nt = (corr_indices[indx_corr] >> GPUTileProcessor.CORR_NTILE_SHIFT);
int tileX = nt % tilesX; int tileX = nt % tilesX;
int tileY = nt / tilesX; int tileY = nt / tilesX;
int tIndex = tileY * tilesX + tileX; int tIndex = tileY * tilesX + tileX;
// Prepare the same (currently 10-layer) corrs as double [][], as in CPU version
int pair_mask = 0; int pair_mask = 0;
for (int indx_pair = 0; indx_pair < num_tile_corr; indx_pair++) { for (int indx_pair = 0; indx_pair < num_tile_corr; indx_pair++) {
int pair = corr_indices[indx_corr] & GPUTileProcessor.CORR_PAIRS_MASK; // ((1 << CORR_NTILE_SHIFT) - 1); // np should int pair = corr_indices[indx_corr] & GPUTileProcessor.CORR_PAIRS_MASK; // ((1 << CORR_NTILE_SHIFT) - 1); // np should
...@@ -524,7 +539,7 @@ public class ImageDtt extends ImageDttCPU { ...@@ -524,7 +539,7 @@ public class ImageDtt extends ImageDttCPU {
} }
indx_corr++; indx_corr++;
} }
// add 2 combo layers // add 4 combo layers : quad, cross, hor, vert
int pair = GPUTileProcessor.NUM_PAIRS; // 6 int pair = GPUTileProcessor.NUM_PAIRS; // 6
nt = (corr_quad_indices[indx_tile] >> GPUTileProcessor.CORR_NTILE_SHIFT); // corr_quad_indices - different sequence nt = (corr_quad_indices[indx_tile] >> GPUTileProcessor.CORR_NTILE_SHIFT); // corr_quad_indices - different sequence
for (int i = 0; i < corr_length; i++) { for (int i = 0; i < corr_length; i++) {
...@@ -536,6 +551,18 @@ public class ImageDtt extends ImageDttCPU { ...@@ -536,6 +551,18 @@ public class ImageDtt extends ImageDttCPU {
corrs[pair][i] = gpu_corr_scale * fcorr2D_cross[indx_tile][i]; // from float to double corrs[pair][i] = gpu_corr_scale * fcorr2D_cross[indx_tile][i]; // from float to double
} }
// indices for hor are the same as for quad
pair++;
for (int i = 0; i < corr_length; i++) {
corrs[pair][i] = gpu_corr_scale * fcorr2D_hor[indx_tile][i]; // from float to double
}
// indices for vert are the same as for quad
pair++;
for (int i = 0; i < corr_length; i++) {
corrs[pair][i] = gpu_corr_scale * fcorr2D_vert[indx_tile][i]; // from float to double
}
// does not include combo // does not include combo
int used_pairs = pair_mask; // imgdtt_params.dbg_pair_mask; //TODO: use tile tasks int used_pairs = pair_mask; // imgdtt_params.dbg_pair_mask; //TODO: use tile tasks
...@@ -589,6 +616,28 @@ public class ImageDtt extends ImageDttCPU { ...@@ -589,6 +616,28 @@ public class ImageDtt extends ImageDttCPU {
imgdtt_params.corr_offset, // double offset); imgdtt_params.corr_offset, // double offset);
imgdtt_params.twice_diagonal); // boolean twice_diagonal) imgdtt_params.twice_diagonal); // boolean twice_diagonal)
double [][] strips_intra = new double[2][];
strips_intra[0] = corr2d.scaleRotateInterpoateSingleCorrelation(
corrs[6], // double [] corr, // quad
imgdtt_params.corr_strip_hight, // int hwidth,
Correlation2d.PAIR_HORIZONTAL, // int dir, // 0 - hor, 1 - vert, 2 - parallel to row = col (main) diagonal (0->3), 3 -2->1
1, // int ss, // 1
false // boolean debug
);
strips_intra[1] = corr2d.scaleRotateInterpoateSingleCorrelation(
corrs[7], // double [] corr, // quad
imgdtt_params.corr_strip_hight, // int hwidth,
Correlation2d.PAIR_DIAGONAL_MAIN, // int dir, // 0 - hor, 1 - vert, 2 - parallel to row = col (main) diagonal (0->3), 3 -2->1
1, // int ss, // 1
false // boolean debug
);
double [] strip_combo_intra = corr2d.combineInterpolatedCorrelations(
strips_intra, // double [][] strips,
3, // int pairs_mask,
imgdtt_params.corr_offset, // double offset);
imgdtt_params.twice_diagonal); // boolean twice_diagonal)
// Debug feature - only calculated if requested // Debug feature - only calculated if requested
if ((clt_corr_partial != null) && (imgdtt_params.corr_mode_debug || imgdtt_params.gpu_mode_debug)) { if ((clt_corr_partial != null) && (imgdtt_params.corr_mode_debug || imgdtt_params.gpu_mode_debug)) {
double [] strip_ortho = corr2d.combineInterpolatedCorrelations( double [] strip_ortho = corr2d.combineInterpolatedCorrelations(
...@@ -629,19 +678,30 @@ public class ImageDtt extends ImageDttCPU { ...@@ -629,19 +678,30 @@ public class ImageDtt extends ImageDttCPU {
clt_corr_partial[tileY][tileX][0][3] = corrs[3]; // 4 clt_corr_partial[tileY][tileX][0][3] = corrs[3]; // 4
clt_corr_partial[tileY][tileX][1][0] = corrs[4]; // 5 clt_corr_partial[tileY][tileX][1][0] = corrs[4]; // 5
clt_corr_partial[tileY][tileX][1][1] = corrs[5]; // 6 clt_corr_partial[tileY][tileX][1][1] = corrs[5]; // 6
clt_corr_partial[tileY][tileX][1][2] = corrs[6]; // 5 clt_corr_partial[tileY][tileX][1][2] = corrs[6]; // 7
clt_corr_partial[tileY][tileX][1][3] = corrs[7]; // 6 clt_corr_partial[tileY][tileX][1][3] = corrs[7]; // 8
// clt_corr_partial[tileY][tileX][1][2] = corrs_ortho; // 7
// clt_corr_partial[tileY][tileX][1][3] = corrs_cross; // 8
// clt_corr_partial[tileY][tileX][1][2] = corr2d.debugStrip(strip_hor); // 7 // clt_corr_partial[tileY][tileX][1][2] = corr2d.debugStrip(strip_hor); // 7
// clt_corr_partial[tileY][tileX][1][3] = corr2d.debugStrip(strip_vert); // 8 // clt_corr_partial[tileY][tileX][1][3] = corr2d.debugStrip(strip_vert); // 8
clt_corr_partial[tileY][tileX][2][0] = corr2d.debugStrip(strips[4]); // 9 //strip_combo_intra
clt_corr_partial[tileY][tileX][2][1] = corr2d.debugStrip(strips[5]); // 10 clt_corr_partial[tileY][tileX][2][0] = corrs[8]; // 9
clt_corr_partial[tileY][tileX][2][1] = corrs[9]; // 10
// clt_corr_partial[tileY][tileX][2][0] = corr2d.debugStrip(strips[4]); // 9
// clt_corr_partial[tileY][tileX][2][1] = corr2d.debugStrip(strips[5]); // 10
clt_corr_partial[tileY][tileX][2][2] = corr2d.debugStrip2(strip_hor); // 11 clt_corr_partial[tileY][tileX][2][2] = corr2d.debugStrip2(strip_hor); // 11
clt_corr_partial[tileY][tileX][2][3] = corr2d.debugStrip2(strip_vert); // 12 clt_corr_partial[tileY][tileX][2][3] = corr2d.debugStrip2(strip_vert); // 12
clt_corr_partial[tileY][tileX][3][0] = corr2d.debugStrip2(strip_ortho); // 13 clt_corr_partial[tileY][tileX][3][0] = corr2d.debugStrip2(strips_intra[0]); // 13
clt_corr_partial[tileY][tileX][3][1] = corr2d.debugStrip2(strip_diag); // 14 clt_corr_partial[tileY][tileX][3][1] = corr2d.debugStrip2(strips_intra[1]); // 14
clt_corr_partial[tileY][tileX][3][2] = corr2d.debugStrip(strip_all); // 15 // clt_corr_partial[tileY][tileX][3][0] = corr2d.debugStrip2(strip_ortho); // 13
// clt_corr_partial[tileY][tileX][3][1] = corr2d.debugStrip2(strip_diag); // 14
clt_corr_partial[tileY][tileX][3][2] = corr2d.debugStrip2(strip_combo_intra); // 15
// clt_corr_partial[tileY][tileX][3][2] = corr2d.debugStrip(strip_all); // 15
clt_corr_partial[tileY][tileX][3][3] = corr2d.debugStrip2(strip_combo); // 16 clt_corr_partial[tileY][tileX][3][3] = corr2d.debugStrip2(strip_combo); // 16
} }
if (imgdtt_params.pcorr_use) {
strip_combo = strip_combo_intra;
}
if ((clt_corr_combo != null) && imgdtt_params.corr_mode_debug) { if ((clt_corr_combo != null) && imgdtt_params.corr_mode_debug) {
// reuse it too? // reuse it too?
...@@ -677,7 +737,32 @@ public class ImageDtt extends ImageDttCPU { ...@@ -677,7 +737,32 @@ public class ImageDtt extends ImageDttCPU {
// corr_wndx, // double [] window_x, // half of a window function in x (disparity) direction // corr_wndx, // double [] window_x, // half of a window function in x (disparity) direction
(tile_lma_debug_level > 0)); // boolean debug); (tile_lma_debug_level > 0)); // boolean debug);
} }
if (imgdtt_params.pcorr_use) {
// for compatibility with old code executed unconditionally. TODO: Move to if (corr_stat != null) ... condition below
double [] hor_pair1 = corr2d.getMaxXSOrtho(
corrs, // double [][] correlations,
0x100, // corrs[8] Correlation2d.getMaskHorizontal(1), // int pairs_mask,
imgdtt_params.corr_offset, // double corr_offset,
true, // boolean symmetric, // for comparing with old implementation average with symmetrical before multiplication
false, // boolean is_vert, // transpose X/Y
tile_lma_debug_level > 0); // boolean debug);
if (hor_pair1 != null) {
disparity_map[DISPARITY_INDEX_HOR][tIndex] = -hor_pair1[0];
disparity_map[DISPARITY_INDEX_HOR_STRENGTH][tIndex] = hor_pair1[1];
}
double [] vert_pair1 = corr2d.getMaxXSOrtho(
corrs, // double [][] correlations,
0x200, // corrs[9] Correlation2d.getMaskVertical(1), // int pairs_mask,
imgdtt_params.corr_offset, // double corr_offset,
true, // boolean symmetric, // for comparing with old implementation average with symmetrical before multiplication
false, // already transposed // true, // boolean is_vert, // transpose X/Y
tile_lma_debug_level > 0); // boolean debug);
if (vert_pair1 != null) {
disparity_map[DISPARITY_INDEX_VERT][tIndex] = -vert_pair1[0];
disparity_map[DISPARITY_INDEX_VERT_STRENGTH][tIndex] = vert_pair1[1];
}
} else {
// for compatibility with old code executed unconditionally. TODO: Move to if (corr_stat != null) ... condition below // for compatibility with old code executed unconditionally. TODO: Move to if (corr_stat != null) ... condition below
double [] hor_pair1 = corr2d.getMaxXSOrtho( double [] hor_pair1 = corr2d.getMaxXSOrtho(
corrs, // double [][] correlations, corrs, // double [][] correlations,
...@@ -702,8 +787,7 @@ public class ImageDtt extends ImageDttCPU { ...@@ -702,8 +787,7 @@ public class ImageDtt extends ImageDttCPU {
disparity_map[DISPARITY_INDEX_VERT][tIndex] = -vert_pair1[0]; disparity_map[DISPARITY_INDEX_VERT][tIndex] = -vert_pair1[0];
disparity_map[DISPARITY_INDEX_VERT_STRENGTH][tIndex] = vert_pair1[1]; disparity_map[DISPARITY_INDEX_VERT_STRENGTH][tIndex] = vert_pair1[1];
} }
}
// 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 // 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) { if (corr_stat != null) {
// skipping DISPARITY_VARIATIONS_INDEX - it was not used // skipping DISPARITY_VARIATIONS_INDEX - it was not used
...@@ -716,9 +800,8 @@ public class ImageDtt extends ImageDttCPU { ...@@ -716,9 +800,8 @@ public class ImageDtt extends ImageDttCPU {
// debug new LMA correlations // debug new LMA correlations
if (debugTile) { if (debugTile) {
System.out.println("Will run new LMA for tileX="+tileX+", tileY="+tileY+"\n\n\n*** Disabled fro the GPU ***\n\n\n"); System.out.println("Will run new LMA for tileX="+tileX+", tileY="+tileY+"\n\n\n*** Disabled fro the GPU ***\n\n\n");
// temporarily disabling for the GPU // temporarily disabling for the GPU (can be restored as disp_dist is available)
/* /*
double [] poly_disp = {Double.NaN, 0.0}; double [] poly_disp = {Double.NaN, 0.0};
Corr2dLMA lma2 = corr2d.corrLMA2( Corr2dLMA lma2 = corr2d.corrLMA2(
imgdtt_params, // ImageDttParameters imgdtt_params, imgdtt_params, // ImageDttParameters imgdtt_params,
...@@ -757,7 +840,21 @@ public class ImageDtt extends ImageDttCPU { ...@@ -757,7 +840,21 @@ public class ImageDtt extends ImageDttCPU {
if (disp_str[1] > imgdtt_params.min_poly_strength) { if (disp_str[1] > imgdtt_params.min_poly_strength) {
// create LMA instance, calculate LMA composite argmax // create LMA instance, calculate LMA composite argmax
// Create 2 groups: ortho & diag // Create 2 groups: ortho & diag
Correlations2dLMA lma = corr2d.corrLMA( Correlations2dLMA lma;
if (imgdtt_params.pcorr_use) {
double [][] fake_corrs = {corrs[6],null,null,null,corrs[7],null};
lma = corr2d.corrLMA(
imgdtt_params, // ImageDttParameters imgdtt_params,
fake_corrs, // double [][] corrs,
0x11, // imgdtt_params.dbg_pair_mask, // int pair_mask, // which pairs to process
false, // boolean run_poly_instead, // true - run LMA, false - run 2d polynomial approximation
corr_stat[0], // double xcenter, // preliminary center x in pixels for largest baseline
imgdtt_params.ortho_vasw_pwr, // double vasw_pwr, // value as weight to this power,
tile_lma_debug_level, // int debug_level,
tileX, // int tileX, // just for debug output
tileY ); // int tileY
} else {
lma = corr2d.corrLMA(
imgdtt_params, // ImageDttParameters imgdtt_params, imgdtt_params, // ImageDttParameters imgdtt_params,
corrs, // double [][] corrs, corrs, // double [][] corrs,
imgdtt_params.dbg_pair_mask, // int pair_mask, // which pairs to process imgdtt_params.dbg_pair_mask, // int pair_mask, // which pairs to process
...@@ -767,6 +864,7 @@ public class ImageDtt extends ImageDttCPU { ...@@ -767,6 +864,7 @@ public class ImageDtt extends ImageDttCPU {
tile_lma_debug_level, // int debug_level, tile_lma_debug_level, // int debug_level,
tileX, // int tileX, // just for debug output tileX, // int tileX, // just for debug output
tileY ); // int tileY tileY ); // int tileY
}
double [] lma_disparity_strength = null; double [] lma_disparity_strength = null;
double max_disp_diff_lma = 3.0; double max_disp_diff_lma = 3.0;
if (lma != null) { if (lma != null) {
......
...@@ -22,6 +22,8 @@ package com.elphel.imagej.tileprocessor; ...@@ -22,6 +22,8 @@ package com.elphel.imagej.tileprocessor;
** -----------------------------------------------------------------------------** ** -----------------------------------------------------------------------------**
** **
*/ */
// ← → ↑ ↓ ⇖ ⇗ ⇘ ⇙ ↔ ↕
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import com.elphel.imagej.cameras.CLTParameters; import com.elphel.imagej.cameras.CLTParameters;
...@@ -3035,7 +3037,7 @@ public class ImageDttCPU { ...@@ -3035,7 +3037,7 @@ public class ImageDttCPU {
// calculate all selected pairs correlations // calculate all selected pairs correlations
int all_pairs = imgdtt_params.dbg_pair_mask; //TODO: use tile tasks int all_pairs = imgdtt_params.dbg_pair_mask; //TODO: use tile tasks
double [][] corrs = corr2d.correlateCompositeFD( // now works with nulls for some clt_data colors double [][] corrs6 = corr2d.correlateCompositeFD( // now works with nulls for some clt_data colors
clt_data, // double [][][][][][] clt_data, clt_data, // double [][][][][][] clt_data,
tileX, // int tileX, tileX, // int tileX,
tileY, // int tileY, tileY, // int tileY,
...@@ -3044,7 +3046,7 @@ public class ImageDttCPU { ...@@ -3044,7 +3046,7 @@ public class ImageDttCPU {
getScaleStrengths(), // double scale_value, // scale correlation value getScaleStrengths(), // double scale_value, // scale correlation value
col_weights, // double [] col_weights, col_weights, // double [] col_weights,
corr_fat_zero); // double fat_zero) corr_fat_zero); // double fat_zero)
double [][] corrs = {corrs6[0],corrs6[1],corrs6[2],corrs6[3],corrs6[4],corrs6[5],null,null,null,null};
// calculate interpolated "strips" to match different scales and orientations (ortho/diagonal) on the // calculate interpolated "strips" to match different scales and orientations (ortho/diagonal) on the
// fine (0.5 pix) grid. ortho for scale == 1 provide even/even samples (1/4 of all), diagonal ones - // fine (0.5 pix) grid. ortho for scale == 1 provide even/even samples (1/4 of all), diagonal ones -
...@@ -3067,7 +3069,7 @@ public class ImageDttCPU { ...@@ -3067,7 +3069,7 @@ public class ImageDttCPU {
// Debug feature - only calculated if requested // Debug feature - only calculated if requested
// if ((clt_corr_partial != null) && imgdtt_params.corr_mode_debug) { // if ((clt_corr_partial != null) && imgdtt_params.corr_mode_debug) {
if ((clt_corr_partial != null) && (imgdtt_params.corr_mode_debug || imgdtt_params.gpu_mode_debug)) { // if ((clt_corr_partial != null) && (imgdtt_params.corr_mode_debug || imgdtt_params.gpu_mode_debug)) {
if (debugTile0) { if (debugTile0) {
System.out.println("Debugging tileY = "+tileY+" tileX = " + tileX); System.out.println("Debugging tileY = "+tileY+" tileX = " + tileX);
System.out.println("Debugging tileY = "+tileY+" tileX = " + tileX); System.out.println("Debugging tileY = "+tileY+" tileX = " + tileX);
...@@ -3099,7 +3101,8 @@ public class ImageDttCPU { ...@@ -3099,7 +3101,8 @@ public class ImageDttCPU {
filter_common, // double [] lpf, // or null filter_common, // double [] lpf, // or null
pcorr_fat_zero); // double fat_zero); pcorr_fat_zero); // double fat_zero);
double [] corrs_ortho = corr2d.convertCorrToPD( // double [] corrs_ortho = corr2d.convertCorrToPD(
corrs[6] = corr2d.convertCorrToPD(
corrs_ortho_td); // double [][] td); corrs_ortho_td); // double [][] td);
double [][] corrs_cross_td = corr2d.combineCorrelationsTD( double [][] corrs_cross_td = corr2d.combineCorrelationsTD(
...@@ -3118,9 +3121,57 @@ public class ImageDttCPU { ...@@ -3118,9 +3121,57 @@ public class ImageDttCPU {
filter_common, // double [] lpf, // or null filter_common, // double [] lpf, // or null
pcorr_fat_zero); // double fat_zero); pcorr_fat_zero); // double fat_zero);
double [] corrs_cross = corr2d.convertCorrToPD( // double [] corrs_cross = corr2d.convertCorrToPD(
corrs[7] = corr2d.convertCorrToPD(
corrs_cross_td); // double [][] td); corrs_cross_td); // double [][] td);
double [][] corrs_hor_td = corr2d.combineCorrelationsTD(
corr_pairs_td, // double [][][] corr_combo_td, // vertical will be transposed, other diagonal flipped vertically (should be separate)
0x03); // int pairs_mask); // horizontal
corr2d.normalize_TD(
corrs_hor_td, // double [][] td,
filter_common, // double [] lpf, // or null
pcorr_fat_zero); // double fat_zero);
corrs[8] = corr2d.convertCorrToPD(
corrs_hor_td); // double [][] td);
double [][] corrs_vert_td = corr2d.combineCorrelationsTD(
corr_pairs_td, // double [][][] corr_combo_td, // vertical will be transposed, other diagonal flipped vertically (should be separate)
0x0c); // int pairs_mask); // horizontal
corr2d.normalize_TD(
corrs_vert_td, // double [][] td,
filter_common, // double [] lpf, // or null
pcorr_fat_zero); // double fat_zero);
corrs[9] = corr2d.convertCorrToPD(
corrs_vert_td); // double [][] td);
double [][] strips_intra = new double[2][];
strips_intra[0] = corr2d.scaleRotateInterpoateSingleCorrelation(
corrs[6], // double [] corr, // quad
imgdtt_params.corr_strip_hight, // int hwidth,
Correlation2d.PAIR_HORIZONTAL, // int dir, // 0 - hor, 1 - vert, 2 - parallel to row = col (main) diagonal (0->3), 3 -2->1
1, // int ss, // 1
false // boolean debug
);
strips_intra[1] = corr2d.scaleRotateInterpoateSingleCorrelation(
corrs[7], // double [] corr, // quad
imgdtt_params.corr_strip_hight, // int hwidth,
Correlation2d.PAIR_DIAGONAL_MAIN, // int dir, // 0 - hor, 1 - vert, 2 - parallel to row = col (main) diagonal (0->3), 3 -2->1
1, // int ss, // 1
false // boolean debug
);
double [] strip_combo_intra = corr2d.combineInterpolatedCorrelations(
strips_intra, // double [][] strips,
3, // int pairs_mask,
imgdtt_params.corr_offset, // double offset);
imgdtt_params.twice_diagonal); // boolean twice_diagonal)
if ((clt_corr_partial != null) && (imgdtt_params.corr_mode_debug || imgdtt_params.gpu_mode_debug)) {
double [] strip_ortho = corr2d.combineInterpolatedCorrelations( double [] strip_ortho = corr2d.combineInterpolatedCorrelations(
strips, // double [][] strips, strips, // double [][] strips,
0x0f, // int pairs_mask, 0x0f, // int pairs_mask,
...@@ -3159,19 +3210,30 @@ public class ImageDttCPU { ...@@ -3159,19 +3210,30 @@ public class ImageDttCPU {
clt_corr_partial[tileY][tileX][0][3] = corrs[3]; // 4 clt_corr_partial[tileY][tileX][0][3] = corrs[3]; // 4
clt_corr_partial[tileY][tileX][1][0] = corrs[4]; // 5 clt_corr_partial[tileY][tileX][1][0] = corrs[4]; // 5
clt_corr_partial[tileY][tileX][1][1] = corrs[5]; // 6 clt_corr_partial[tileY][tileX][1][1] = corrs[5]; // 6
clt_corr_partial[tileY][tileX][1][2] = corrs_ortho; // 7 clt_corr_partial[tileY][tileX][1][2] = corrs[6]; // 7
clt_corr_partial[tileY][tileX][1][3] = corrs_cross; // 8 clt_corr_partial[tileY][tileX][1][3] = corrs[7]; // 8
// clt_corr_partial[tileY][tileX][1][2] = corrs_ortho; // 7
// clt_corr_partial[tileY][tileX][1][3] = corrs_cross; // 8
// clt_corr_partial[tileY][tileX][1][2] = corr2d.debugStrip(strip_hor); // 7 // clt_corr_partial[tileY][tileX][1][2] = corr2d.debugStrip(strip_hor); // 7
// clt_corr_partial[tileY][tileX][1][3] = corr2d.debugStrip(strip_vert); // 8 // clt_corr_partial[tileY][tileX][1][3] = corr2d.debugStrip(strip_vert); // 8
clt_corr_partial[tileY][tileX][2][0] = corr2d.debugStrip(strips[4]); // 9 //strip_combo_intra
clt_corr_partial[tileY][tileX][2][1] = corr2d.debugStrip(strips[5]); // 10 clt_corr_partial[tileY][tileX][2][0] = corrs[8]; // 9
clt_corr_partial[tileY][tileX][2][1] = corrs[9]; // 10
// clt_corr_partial[tileY][tileX][2][0] = corr2d.debugStrip(strips[4]); // 9
// clt_corr_partial[tileY][tileX][2][1] = corr2d.debugStrip(strips[5]); // 10
clt_corr_partial[tileY][tileX][2][2] = corr2d.debugStrip2(strip_hor); // 11 clt_corr_partial[tileY][tileX][2][2] = corr2d.debugStrip2(strip_hor); // 11
clt_corr_partial[tileY][tileX][2][3] = corr2d.debugStrip2(strip_vert); // 12 clt_corr_partial[tileY][tileX][2][3] = corr2d.debugStrip2(strip_vert); // 12
clt_corr_partial[tileY][tileX][3][0] = corr2d.debugStrip2(strip_ortho); // 13 clt_corr_partial[tileY][tileX][3][0] = corr2d.debugStrip2(strips_intra[0]); // 13
clt_corr_partial[tileY][tileX][3][1] = corr2d.debugStrip2(strip_diag); // 14 clt_corr_partial[tileY][tileX][3][1] = corr2d.debugStrip2(strips_intra[1]); // 14
clt_corr_partial[tileY][tileX][3][2] = corr2d.debugStrip(strip_all); // 15 // clt_corr_partial[tileY][tileX][3][0] = corr2d.debugStrip2(strip_ortho); // 13
// clt_corr_partial[tileY][tileX][3][1] = corr2d.debugStrip2(strip_diag); // 14
clt_corr_partial[tileY][tileX][3][2] = corr2d.debugStrip2(strip_combo_intra); // 15
// clt_corr_partial[tileY][tileX][3][2] = corr2d.debugStrip(strip_all); // 15
clt_corr_partial[tileY][tileX][3][3] = corr2d.debugStrip2(strip_combo); // 16 clt_corr_partial[tileY][tileX][3][3] = corr2d.debugStrip2(strip_combo); // 16
} }
if (imgdtt_params.pcorr_use) {
strip_combo = strip_combo_intra;
}
if ((clt_corr_combo != null) && imgdtt_params.corr_mode_debug) { if ((clt_corr_combo != null) && imgdtt_params.corr_mode_debug) {
// reuse it too? // reuse it too?
...@@ -3192,7 +3254,7 @@ public class ImageDttCPU { ...@@ -3192,7 +3254,7 @@ public class ImageDttCPU {
// double strength = 0.0; // double strength = 0.0;
// double disparity = 0.0; // double disparity = 0.0;
double [] disp_str = new double[2]; double [] disp_str = new double[2];
if (ixy != null) { if (ixy != null) { //TODO - for CM use magic!
disp_str[1] = strip_combo[ixy[0]+transform_size-1]; // strength at integer max on axis disp_str[1] = strip_combo[ixy[0]+transform_size-1]; // strength at integer max on axis
disparity_map[DISPARITY_INDEX_INT][tIndex] = -ixy[0]; disparity_map[DISPARITY_INDEX_INT][tIndex] = -ixy[0];
// disparity_map[DISPARITY_INDEX_INT + 1][tIndex] = // disparity_map[DISPARITY_INDEX_INT + 1][tIndex] =
...@@ -3208,6 +3270,32 @@ public class ImageDttCPU { ...@@ -3208,6 +3270,32 @@ public class ImageDttCPU {
(tile_lma_debug_level > 0)); // boolean debug); (tile_lma_debug_level > 0)); // boolean debug);
} }
if (imgdtt_params.pcorr_use) {
// for compatibility with old code executed unconditionally. TODO: Move to if (corr_stat != null) ... condition below
double [] hor_pair1 = corr2d.getMaxXSOrtho(
corrs, // double [][] correlations,
0x100, // corrs[8] Correlation2d.getMaskHorizontal(1), // int pairs_mask,
imgdtt_params.corr_offset, // double corr_offset,
true, // boolean symmetric, // for comparing with old implementation average with symmetrical before multiplication
false, // boolean is_vert, // transpose X/Y
tile_lma_debug_level > 0); // boolean debug);
if (hor_pair1 != null) {
disparity_map[DISPARITY_INDEX_HOR][tIndex] = -hor_pair1[0];
disparity_map[DISPARITY_INDEX_HOR_STRENGTH][tIndex] = hor_pair1[1];
}
double [] vert_pair1 = corr2d.getMaxXSOrtho(
corrs, // double [][] correlations,
0x200, // corrs[9] Correlation2d.getMaskVertical(1), // int pairs_mask,
imgdtt_params.corr_offset, // double corr_offset,
true, // boolean symmetric, // for comparing with old implementation average with symmetrical before multiplication
false, // already transposed // true, // boolean is_vert, // transpose X/Y
tile_lma_debug_level > 0); // boolean debug);
if (vert_pair1 != null) {
disparity_map[DISPARITY_INDEX_VERT][tIndex] = -vert_pair1[0];
disparity_map[DISPARITY_INDEX_VERT_STRENGTH][tIndex] = vert_pair1[1];
}
} else {
// for compatibility with old code executed unconditionally. TODO: Move to if (corr_stat != null) ... condition below // for compatibility with old code executed unconditionally. TODO: Move to if (corr_stat != null) ... condition below
double [] hor_pair1 = corr2d.getMaxXSOrtho( double [] hor_pair1 = corr2d.getMaxXSOrtho(
corrs, // double [][] correlations, corrs, // double [][] correlations,
...@@ -3232,6 +3320,7 @@ public class ImageDttCPU { ...@@ -3232,6 +3320,7 @@ public class ImageDttCPU {
disparity_map[DISPARITY_INDEX_VERT][tIndex] = -vert_pair1[0]; disparity_map[DISPARITY_INDEX_VERT][tIndex] = -vert_pair1[0];
disparity_map[DISPARITY_INDEX_VERT_STRENGTH][tIndex] = vert_pair1[1]; disparity_map[DISPARITY_INDEX_VERT_STRENGTH][tIndex] = vert_pair1[1];
} }
}
// 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 // 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
...@@ -3284,7 +3373,22 @@ public class ImageDttCPU { ...@@ -3284,7 +3373,22 @@ public class ImageDttCPU {
if (disp_str[1] > imgdtt_params.min_poly_strength) { if (disp_str[1] > imgdtt_params.min_poly_strength) {
// create LMA instance, calculate LMA composite argmax // create LMA instance, calculate LMA composite argmax
// Create 2 groups: ortho & diag // Create 2 groups: ortho & diag
Correlations2dLMA lma = corr2d.corrLMA( Correlations2dLMA lma;
if (imgdtt_params.pcorr_use) {
double [][] fake_corrs = {corrs[6],null,null,null,corrs[7],null};
lma = corr2d.corrLMA(
imgdtt_params, // ImageDttParameters imgdtt_params,
fake_corrs, // double [][] corrs,
0x11, // imgdtt_params.dbg_pair_mask, // int pair_mask, // which pairs to process
false, // boolean run_poly_instead, // true - run LMA, false - run 2d polynomial approximation
corr_stat[0], // double xcenter, // preliminary center x in pixels for largest baseline
imgdtt_params.ortho_vasw_pwr, // double vasw_pwr, // value as weight to this power,
tile_lma_debug_level, // int debug_level,
tileX, // int tileX, // just for debug output
tileY ); // int tileY
} else {
lma = corr2d.corrLMA(
imgdtt_params, // ImageDttParameters imgdtt_params, imgdtt_params, // ImageDttParameters imgdtt_params,
corrs, // double [][] corrs, corrs, // double [][] corrs,
imgdtt_params.dbg_pair_mask, // int pair_mask, // which pairs to process imgdtt_params.dbg_pair_mask, // int pair_mask, // which pairs to process
...@@ -3294,6 +3398,9 @@ public class ImageDttCPU { ...@@ -3294,6 +3398,9 @@ public class ImageDttCPU {
tile_lma_debug_level, // int debug_level, tile_lma_debug_level, // int debug_level,
tileX, // int tileX, // just for debug output tileX, // int tileX, // just for debug output
tileY ); // int tileY tileY ); // int tileY
}
double [] lma_disparity_strength = null; double [] lma_disparity_strength = null;
double max_disp_diff_lma = 3.0; double max_disp_diff_lma = 3.0;
if (lma != null) { if (lma != null) {
...@@ -3347,7 +3454,7 @@ public class ImageDttCPU { ...@@ -3347,7 +3454,7 @@ public class ImageDttCPU {
for (int ii = 0; ii < dir_corr_strength.length; ii++) { for (int ii = 0; ii < dir_corr_strength.length; ii++) {
if (dir_corr_strength[ii] == null) dir_corr_strength[ii] = nan2; if (dir_corr_strength[ii] == null) dir_corr_strength[ii] = nan2;
} }
System.out.println(String.format("corr4dirsLMA -> ↔: %7.4f (%7.4f) ↕:%7.4f (%7.4f) ⤡:%7.4f (%7.4f) ⤢:%7.4f (%7.4f)", System.out.println(String.format("corr4dirsLMA -> ↔: %7.4f (%7.4f) ↕:%7.4f (%7.4f) ⇖:%7.4f (%7.4f) ⇗:%7.4f (%7.4f)",
dir_corr_strength[0][0],dir_corr_strength[0][1],dir_corr_strength[1][0],dir_corr_strength[1][1], dir_corr_strength[0][0],dir_corr_strength[0][1],dir_corr_strength[1][0],dir_corr_strength[1][1],
dir_corr_strength[2][0],dir_corr_strength[2][1],dir_corr_strength[3][0],dir_corr_strength[3][1])); dir_corr_strength[2][0],dir_corr_strength[2][1],dir_corr_strength[3][0],dir_corr_strength[3][1]));
} }
...@@ -8997,7 +9104,7 @@ public class ImageDttCPU { ...@@ -8997,7 +9104,7 @@ public class ImageDttCPU {
for (int ii = 0; ii < dir_corr_strength.length; ii++) { for (int ii = 0; ii < dir_corr_strength.length; ii++) {
if (dir_corr_strength[ii] == null) dir_corr_strength[ii] = nan2; if (dir_corr_strength[ii] == null) dir_corr_strength[ii] = nan2;
} }
System.out.println(String.format("corr4dirsLMA -> ↔: %7.4f (%7.4f) ↕:%7.4f (%7.4f) ⤡:%7.4f (%7.4f) ⤢:%7.4f (%7.4f)", System.out.println(String.format("corr4dirsLMA -> ↔: %7.4f (%7.4f) ↕:%7.4f (%7.4f) ⇖:%7.4f (%7.4f) ⇗:%7.4f (%7.4f)",
dir_corr_strength[0][0],dir_corr_strength[0][1],dir_corr_strength[1][0],dir_corr_strength[1][1], dir_corr_strength[0][0],dir_corr_strength[0][1],dir_corr_strength[1][0],dir_corr_strength[1][1],
dir_corr_strength[2][0],dir_corr_strength[2][1],dir_corr_strength[3][0],dir_corr_strength[3][1])); dir_corr_strength[2][0],dir_corr_strength[2][1],dir_corr_strength[3][0],dir_corr_strength[3][1]));
} }
......
...@@ -100,6 +100,7 @@ public class ImageDttParameters { ...@@ -100,6 +100,7 @@ public class ImageDttParameters {
public double corr_wndx_hwidth = 6.0; // 50% window cutoff width public double corr_wndx_hwidth = 6.0; // 50% window cutoff width
public double corr_wndx_blur = 5.0; // 100% to 0 % vertical transition range public double corr_wndx_blur = 5.0; // 100% to 0 % vertical transition range
public boolean pcorr_use = false; // use group phase correlation for disparity calculation in existing code
public double pcorr_sigma_mono = 0.15; // correlation sigma for monochrome images (after normalization) public double pcorr_sigma_mono = 0.15; // correlation sigma for monochrome images (after normalization)
public double pcorr_sigma = 0.8; // correlation sigma for Bayder images (after normalization) public double pcorr_sigma = 0.8; // correlation sigma for Bayder images (after normalization)
public double pcorr_sigma_rb = 0.5; // correlation sigma extra for R and B (before normalization) public double pcorr_sigma_rb = 0.5; // correlation sigma extra for R and B (before normalization)
...@@ -334,6 +335,9 @@ public class ImageDttParameters { ...@@ -334,6 +335,9 @@ public class ImageDttParameters {
"Transition range, shifted sine is used"); "Transition range, shifted sine is used");
gd.addTab("Corr Intra","Parameters Group 2D Phase correlation"); gd.addTab("Corr Intra","Parameters Group 2D Phase correlation");
gd.addCheckbox ("Use group phase correlation for disparity calculation", this.pcorr_use,
"Default false, for compatibility with existing code/ old configs");
gd.addNumericField("Correlation sigma for monochrome images", this.pcorr_sigma_mono, 3, 6, "pix", gd.addNumericField("Correlation sigma for monochrome images", this.pcorr_sigma_mono, 3, 6, "pix",
"after normalization"); "after normalization");
gd.addNumericField("Correlation sigma for Bayer images", this.pcorr_sigma, 3, 6, "pix", gd.addNumericField("Correlation sigma for Bayer images", this.pcorr_sigma, 3, 6, "pix",
...@@ -573,6 +577,7 @@ public class ImageDttParameters { ...@@ -573,6 +577,7 @@ public class ImageDttParameters {
this.corr_wndx_hwidth = gd.getNextNumber(); this.corr_wndx_hwidth = gd.getNextNumber();
this.corr_wndx_blur = gd.getNextNumber(); this.corr_wndx_blur = gd.getNextNumber();
this.pcorr_use= gd.getNextBoolean();
this.pcorr_sigma_mono = gd.getNextNumber(); this.pcorr_sigma_mono = gd.getNextNumber();
this.pcorr_sigma = gd.getNextNumber(); this.pcorr_sigma = gd.getNextNumber();
this.pcorr_sigma_rb = gd.getNextNumber(); this.pcorr_sigma_rb = gd.getNextNumber();
...@@ -720,6 +725,7 @@ public class ImageDttParameters { ...@@ -720,6 +725,7 @@ public class ImageDttParameters {
properties.setProperty(prefix+"corr_wndx_hwidth", this.corr_wndx_hwidth +""); properties.setProperty(prefix+"corr_wndx_hwidth", this.corr_wndx_hwidth +"");
properties.setProperty(prefix+"corr_wndx_blur", this.corr_wndx_blur +""); properties.setProperty(prefix+"corr_wndx_blur", this.corr_wndx_blur +"");
properties.setProperty(prefix+"pcorr_use", this.pcorr_use +"");
properties.setProperty(prefix+"pcorr_sigma_mono", this.pcorr_sigma_mono +""); properties.setProperty(prefix+"pcorr_sigma_mono", this.pcorr_sigma_mono +"");
properties.setProperty(prefix+"pcorr_sigma", this.pcorr_sigma +""); properties.setProperty(prefix+"pcorr_sigma", this.pcorr_sigma +"");
properties.setProperty(prefix+"pcorr_sigma_rb", this.pcorr_sigma_rb +""); properties.setProperty(prefix+"pcorr_sigma_rb", this.pcorr_sigma_rb +"");
...@@ -873,6 +879,7 @@ public class ImageDttParameters { ...@@ -873,6 +879,7 @@ public class ImageDttParameters {
if (properties.getProperty(prefix+"corr_wndx_hwidth")!=null) this.corr_wndx_hwidth=Double.parseDouble(properties.getProperty(prefix+"corr_wndx_hwidth")); if (properties.getProperty(prefix+"corr_wndx_hwidth")!=null) this.corr_wndx_hwidth=Double.parseDouble(properties.getProperty(prefix+"corr_wndx_hwidth"));
if (properties.getProperty(prefix+"corr_wndx_blur")!=null) this.corr_wndx_blur=Double.parseDouble(properties.getProperty(prefix+"corr_wndx_blur")); if (properties.getProperty(prefix+"corr_wndx_blur")!=null) this.corr_wndx_blur=Double.parseDouble(properties.getProperty(prefix+"corr_wndx_blur"));
if (properties.getProperty(prefix+"pcorr_use")!=null) this.pcorr_use=Boolean.parseBoolean(properties.getProperty(prefix+"pcorr_use"));
if (properties.getProperty(prefix+"pcorr_sigma_mono")!=null) this.pcorr_sigma_mono=Double.parseDouble(properties.getProperty(prefix+"pcorr_sigma_mono")); if (properties.getProperty(prefix+"pcorr_sigma_mono")!=null) this.pcorr_sigma_mono=Double.parseDouble(properties.getProperty(prefix+"pcorr_sigma_mono"));
if (properties.getProperty(prefix+"pcorr_sigma")!=null) this.pcorr_sigma=Double.parseDouble(properties.getProperty(prefix+"pcorr_sigma")); if (properties.getProperty(prefix+"pcorr_sigma")!=null) this.pcorr_sigma=Double.parseDouble(properties.getProperty(prefix+"pcorr_sigma"));
if (properties.getProperty(prefix+"pcorr_sigma_rb")!=null) this.pcorr_sigma_rb=Double.parseDouble(properties.getProperty(prefix+"pcorr_sigma_rb")); if (properties.getProperty(prefix+"pcorr_sigma_rb")!=null) this.pcorr_sigma_rb=Double.parseDouble(properties.getProperty(prefix+"pcorr_sigma_rb"));
...@@ -1021,6 +1028,7 @@ public class ImageDttParameters { ...@@ -1021,6 +1028,7 @@ public class ImageDttParameters {
idp.corr_wndx_hwidth = this.corr_wndx_hwidth; idp.corr_wndx_hwidth = this.corr_wndx_hwidth;
idp.corr_wndx_blur = this.corr_wndx_blur; idp.corr_wndx_blur = this.corr_wndx_blur;
idp.pcorr_use = this.pcorr_use;
idp.pcorr_sigma_mono = this.pcorr_sigma_mono; idp.pcorr_sigma_mono = this.pcorr_sigma_mono;
idp.pcorr_sigma = this.pcorr_sigma; idp.pcorr_sigma = this.pcorr_sigma;
idp.pcorr_sigma_rb = this.pcorr_sigma_rb; idp.pcorr_sigma_rb = this.pcorr_sigma_rb;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment