Loading src/main/java/com/elphel/imagej/tileprocessor/ImageDtt.java +93 −18 Original line number Original line Diff line number Diff line Loading @@ -2348,14 +2348,17 @@ public class ImageDtt extends ImageDttCPU { final double td_weight, // mix correlations accumulated in TD with final double td_weight, // mix correlations accumulated in TD with final double td_neib_weight, // mix correlations accumulated in TD (neibs) final double td_neib_weight, // mix correlations accumulated in TD (neibs) final double pd_weight, // correlations (post) accumulated in PD final double pd_weight, // correlations (post) accumulated in PD final boolean td_nopd_only, // only use TD accumulated data if no safe PD is available for the tile. final boolean td_nopd_only, // only use TD accumulated data if no safe PD is available for the tile. final boolean eig_use_neibs, // use correlation from 9 tiles with neibs, if single-tile fails final boolean eig_use_neibs, // use correlation from 9 tiles with neibs, if single-tile fails final int eig_min_weaks, // = 4; minimal weak neighbors for a weak tile (too few - no averaging) final int eig_min_strongs, // minimal strong neighbors for strong tiles final double eig_disp_diff, // maximal disparity difference from the closest (by disparity) neighbor final boolean eig_remove_neibs, //remove weak (by-neibs) tiles if they have strong (by-single) neighbor final boolean eig_remove_neibs, //remove weak (by-neibs) tiles if they have strong (by-single) neighbor final boolean eig_filt_other, // apply other before-eigen filters final boolean eig_filt_other, // apply other before-eigen filters // final double min_str_nofpn, // = 0.25; final double eig_str_sum_nofpn,// = 0.8; // 5; final double eig_str_sum_nofpn,// = 0.8; // 5; final double eig_str_neib_nofpn,// = 0.8; // 5; final double eig_str_neib_nofpn,// = 0.8; // 5; // final double min_str_fpn, // = 0.25; final double eig_str_sum_fpn, // = 0.8; // 5; final double eig_str_sum_fpn, // = 0.8; // 5; final double eig_str_neib_fpn, // = 0.8; // 5; final double eig_str_neib_fpn, // = 0.8; // 5; final int min_neibs, // 2; // minimal number of strong neighbors (> min_str) final int min_neibs, // 2; // minimal number of strong neighbors (> min_str) Loading @@ -2365,7 +2368,7 @@ public class ImageDtt extends ImageDttCPU { final boolean neibs_nofpn_only, // consolidate neighbors for non-fpn tiles only! final boolean neibs_nofpn_only, // consolidate neighbors for non-fpn tiles only! final boolean redo_both, // use average of neighbors for both pd,td if any of the center tile tests (td, pd) fails final boolean redo_both, // use average of neighbors for both pd,td if any of the center tile tests (td, pd) fails final int min_num_neibs, // plus center, total number >= (min_num_neibs+1) final double scale_neibs_pd, // scale threshold for the pixel-domain average maximums final double scale_neibs_pd, // scale threshold for the pixel-domain average maximums final double scale_neibs_td, // scale threshold for the transform-domain average maximums final double scale_neibs_td, // scale threshold for the transform-domain average maximums final double scale_avg_weight, // reduce influence of the averaged correlations compared to the single-tile ones final double scale_avg_weight, // reduce influence of the averaged correlations compared to the single-tile ones Loading @@ -2379,7 +2382,6 @@ public class ImageDtt extends ImageDttCPU { final int threadsMax, // maximal number of threads to launch final int threadsMax, // maximal number of threads to launch final int globalDebugLevel) final int globalDebugLevel) { { // final boolean // final boolean eigen_sub_min = false; // when calculating eigenvectors, subtract min from data, false - just skip // final boolean eigen_sub_min = false; // when calculating eigenvectors, subtract min from data, false - just skip if (this.gpuQuad == null) { if (this.gpuQuad == null) { System.out.println("clt_process_tl_interscene(): this.gpuQuad is null, bailing out"); System.out.println("clt_process_tl_interscene(): this.gpuQuad is null, bailing out"); Loading Loading @@ -2497,6 +2499,7 @@ public class ImageDtt extends ImageDttCPU { final Thread[] threads = newThreadArray(threadsMax); final Thread[] threads = newThreadArray(threadsMax); final AtomicInteger ai = new AtomicInteger(0); final AtomicInteger ai = new AtomicInteger(0); final boolean [] used_td = new boolean [tilesX*tilesY]; // this tile had strong enough TD w/o neibs final boolean [] used_td = new boolean [tilesX*tilesY]; // this tile had strong enough TD w/o neibs final boolean [] weak_tile = new boolean [tilesX*tilesY]; // this is a weak tile (only through consolidating neighbors) // all neibs with strong TD around them will be removed // all neibs with strong TD around them will be removed // not using PD at all? always TD, then neibs? // not using PD at all? always TD, then neibs? for (int ithread = 0; ithread < threads.length; ithread++) { for (int ithread = 0; ithread < threads.length; ithread++) { Loading Loading @@ -2537,10 +2540,7 @@ public class ImageDtt extends ImageDttCPU { is_fpn = true; is_fpn = true; } } // double [][] corrs = new double [corrs_len + extra_len + extra_len_eig][]; // 1/17/2/18 +(0/1) double [][] corrs = new double [corrs_len + extra_len][]; // 1/17/2/18 +(0/1) double [][] corrs = new double [corrs_len + extra_len][]; // 1/17/2/18 +(0/1) // int eigen_indx = (extra_len_eig > 0) ? (corrs_len + extra_len + extra_len_eig -1):-1; // int eigen_indx = (extra_len_eig > 0) ? (corrs_len + extra_len):-1; // copy correlation tiles from the GPU's floating point arrays // copy correlation tiles from the GPU's floating point arrays double scale = 1.0/getNumSensors(); double scale = 1.0/getNumSensors(); if (extra_sum) { if (extra_sum) { Loading Loading @@ -2654,6 +2654,13 @@ public class ImageDtt extends ImageDttCPU { false, // boolean ignore_border, // only if fpn_mask != null - ignore tile if maximum touches fpn_mask false, // boolean ignore_border, // only if fpn_mask != null - ignore tile if maximum touches fpn_mask debug_data, // double [][] debug_data, // null or double [1] debug_data, // double [][] debug_data, // null or double [1] false); // boolean debug) false); // boolean debug) weak_tile[nTile] = stats_mv != null; if (stats_mv != null) { stats_mv[2] -= eig_str_neib * scale_neibs_td; if (stats_mv[2] <= 0) { stats_mv = null; } } } } if ((debug_data != null) && (debug_data[0] != null)) { if ((debug_data != null) && (debug_data[0] != null)) { iCorrTile_index[nTile] = iCorrTile; iCorrTile_index[nTile] = iCorrTile; Loading Loading @@ -2698,10 +2705,34 @@ public class ImageDtt extends ImageDttCPU { public void run() { public void run() { TileNeibs tn = new TileNeibs(tilesX,tilesY); TileNeibs tn = new TileNeibs(tilesX,tilesY); for (int nTile = ai.getAndIncrement(); nTile < tiles; nTile = ai.getAndIncrement()) { for (int nTile = ai.getAndIncrement(); nTile < tiles; nTile = ai.getAndIncrement()) { if ((mv[nTile] != null) && !used_td[nTile]) { // is weak (by neibs) boolean remove_tile = false; if (weak_tile[nTile]){ int num_weak = 0; boolean has_strong = false; for (int dir = 0; dir < TileNeibs.DIRS; dir++) { int nTile1 = tn.getNeibIndex(nTile, dir); if (nTile1 >= 0) { if (used_td[nTile1]) { has_strong = true; break; } else if (weak_tile[nTile1]) { num_weak++; } } } remove_tile |= (has_strong || (num_weak < eig_min_weaks)); } else if (used_td[nTile]) { int num_strong = 0; for (int dir = 0; dir < TileNeibs.DIRS; dir++) { for (int dir = 0; dir < TileNeibs.DIRS; dir++) { int nTile1 = tn.getNeibIndex(nTile, dir); int nTile1 = tn.getNeibIndex(nTile, dir); if ((nTile1 >= 0) && used_td[nTile1]) { if ((nTile1 >= 0) && (used_td[nTile1])) { num_strong++; } } remove_tile |= (num_strong < eig_min_strongs); } if (remove_tile) { // any of 3 reasons above mv[nTile] = null; mv[nTile] = null; if (pxd != null) { if (pxd != null) { pxd[nTile] = null; pxd[nTile] = null; Loading @@ -2711,16 +2742,58 @@ public class ImageDtt extends ImageDttCPU { dcorr_tiles[iCorrTile][eigen_indx+1] = null; dcorr_tiles[iCorrTile][eigen_indx+1] = null; dcorr_tiles[iCorrTile][eigen_indx+3] = null; dcorr_tiles[iCorrTile][eigen_indx+3] = null; } } break; } } } } } } }; } startAndJoin(threads); if (eig_disp_diff > 0) { final boolean [] remove_tiles = new boolean[tilesX*tilesY]; ai.set(0); for (int ithread = 0; ithread < threads.length; ithread++) { threads[ithread] = new Thread() { @Override public void run() { TileNeibs tn = new TileNeibs(tilesX,tilesY); for (int nTile = ai.getAndIncrement(); nTile < tiles; nTile = ai.getAndIncrement()) if ((mv[nTile] != null) && (pXpYD[nTile] != null)) { double min_diff = eig_disp_diff + 1.0; double disp_c = pxd[nTile][2]; for (int dir = 0; dir < TileNeibs.DIRS; dir++) { int nTile1 = tn.getNeibIndex(nTile, dir); if ((nTile1 >= 0) && (pxd[nTile1]!= null) && !Double.isNaN(pxd[nTile1][2])) { min_diff = Math.min(Math.abs(pxd[nTile1][2]-disp_c), min_diff); } } remove_tiles[nTile] |= (min_diff > eig_disp_diff); } } }; } startAndJoin(threads); ai.set(0); for (int ithread = 0; ithread < threads.length; ithread++) { threads[ithread] = new Thread() { @Override public void run() { for (int nTile = ai.getAndIncrement(); nTile < tiles; nTile = ai.getAndIncrement()) if (remove_tiles[nTile]) { mv[nTile] = null; if (pxd != null) { pxd[nTile] = null; } if (iCorrTile_index != null) { int iCorrTile = iCorrTile_index[nTile]; dcorr_tiles[iCorrTile][eigen_indx+1] = null; dcorr_tiles[iCorrTile][eigen_indx+3] = null; } } } } } }; }; } } startAndJoin(threads); startAndJoin(threads); } } } // Reduce weight if differs much from average of 8 neighbors, large disparity, remove too few neibs // Reduce weight if differs much from average of 8 neighbors, large disparity, remove too few neibs final double scale_num_neib = ((weight_zero_neibs >= 0) && (weight_zero_neibs < 1.0)) ? (weight_zero_neibs * 8/(1.0 - weight_zero_neibs)): 0.0; final double scale_num_neib = ((weight_zero_neibs >= 0) && (weight_zero_neibs < 1.0)) ? (weight_zero_neibs * 8/(1.0 - weight_zero_neibs)): 0.0; if (eig_filt_other) { if (eig_filt_other) { Loading Loading @@ -2792,6 +2865,8 @@ public class ImageDtt extends ImageDttCPU { startAndJoin(threads); startAndJoin(threads); return coord_motion; return coord_motion; } } // using most of the ImageDttCPU.clt_process_tl_correlations // using most of the ImageDttCPU.clt_process_tl_correlations public void clt_process_tl_correlations( // convert to pixel domain and process correlations already prepared in fcorr_td and/or fcorr_combo_td public void clt_process_tl_correlations( // convert to pixel domain and process correlations already prepared in fcorr_td and/or fcorr_combo_td 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 Loading src/main/java/com/elphel/imagej/tileprocessor/Interscene.java +83 −74 Original line number Original line Diff line number Diff line Loading @@ -534,7 +534,7 @@ public class Interscene { boolean use_lma_dsi = clt_parameters.imp.use_lma_dsi; boolean use_lma_dsi = clt_parameters.imp.use_lma_dsi; double [] reduced_strength = new double[1]; double [] reduced_strength = new double[1]; double avg_z = quadCLTs[ref_index].getAverageZ(true); // use lma double avg_z = quadCLTs[ref_index].getAverageZ(true); // use lma double [] lma_rms = new double[clt_parameters.imp.eig_use? 4 : 2]; // [2]; double [] lma_rms = new double[clt_parameters.imp.eig_use? 6 : 4]; // [2]; // use combo if second pass? // use combo if second pass? if (min_ref_str > 0.0) { if (min_ref_str > 0.0) { reliable_ref = quadCLTs[ref_index].getReliableTiles( // will be null if does not exist. reliable_ref = quadCLTs[ref_index].getReliableTiles( // will be null if does not exist. Loading Loading @@ -683,20 +683,20 @@ public class Interscene { ); ); rmse_stats.add(lma_rms[0]); rmse_stats.add(lma_rms[0]); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { rmse_stats_metric.add(lma_rms[2]); rmse_stats_metric.add(lma_rms[4]); } } if (debugLevel > -3) { if (debugLevel > -3) { System.out.print("invertInitialOrientation(): scene "+scene_index+" (of "+ quadCLTs.length+") "+ System.out.println("invertInitialOrientation(): scene "+scene_index+" (of "+ quadCLTs.length+") "+ quadCLTs[ref_index].getImageName() + "/" + quadCLTs[scene_index].getImageName()+ quadCLTs[ref_index].getImageName() + "/" + quadCLTs[scene_index].getImageName()+ " Done. RMS="+lma_rms[0]+ " Done. Weight = "+lma_rms[2]+", number="+lma_rms[3]); System.out.print("RMS="+lma_rms[0]+ ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=6)) { System.out.print(". RMS="+lma_rms[2]+ System.out.print(". Pixel RMS="+lma_rms[4]+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, average was "+rmse_stats_metric.getAverage()+"pix."); "pix, average was "+rmse_stats_metric.getAverage()+"pix."); } } System.out.println(); System.out.println(); } } } // for (int scene_index = ref_index; scene_index <= last_index; scene_index++) { } // for (int scene_index = ref_index; scene_index <= last_index; scene_index++) { Loading Loading @@ -783,15 +783,16 @@ public class Interscene { adjusted_xyzatr_dt[1]); // ZERO3 // ers_scene.getErsATR_dt() adjusted_xyzatr_dt[1]); // ZERO3 // ers_scene.getErsATR_dt() rmse_stats.add(lma_rms[0]); rmse_stats.add(lma_rms[0]); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { rmse_stats_metric.add(lma_rms[2]); rmse_stats_metric.add(lma_rms[4]); } } if (debugLevel > -3) { if (debugLevel > -3) { System.out.print("Pass multi scene "+fpn_pairs[ipair][0]+" (of "+ quadCLTs.length+") "+ System.out.println("Pass multi scene "+fpn_pairs[ipair][0]+" (of "+ quadCLTs.length+") "+ quadCLTs[fpn_pairs[ipair][1]].getImageName() + "/" + quadCLTs[fpn_pairs[ipair][0]].getImageName()+ quadCLTs[fpn_pairs[ipair][1]].getImageName() + "/" + quadCLTs[fpn_pairs[ipair][0]].getImageName()+ " Done. RMS="+lma_rms[0]+ " Done. Weight = "+lma_rms[2]+", number="+lma_rms[3]); System.out.print("RMS="+lma_rms[0]+ ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=6)) { System.out.print(". RMS="+lma_rms[2]+ System.out.print(". RMS="+lma_rms[4]+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, average was "+rmse_stats_metric.getAverage()+"pix."); "pix, average was "+rmse_stats_metric.getAverage()+"pix."); } } Loading Loading @@ -866,7 +867,7 @@ public class Interscene { System.out.println("*** setInitialOrientationsIms(): clt_parameters.ilp.ilma_3d is TRUE. You may want to disable it when using IMS"); System.out.println("*** setInitialOrientationsIms(): clt_parameters.ilp.ilma_3d is TRUE. You may want to disable it when using IMS"); } } double [] lma_rms = new double[clt_parameters.imp.eig_use? 4 : 2]; // [2]; double [] lma_rms = new double[clt_parameters.imp.eig_use? 6 : 4]; // [2]; int tilesX = quadCLTs[ref_index].getTileProcessor().getTilesX(); int tilesX = quadCLTs[ref_index].getTileProcessor().getTilesX(); int tilesY = quadCLTs[ref_index].getTileProcessor().getTilesY(); int tilesY = quadCLTs[ref_index].getTileProcessor().getTilesY(); Loading Loading @@ -1202,15 +1203,16 @@ public class Interscene { ); ); rmse_stats.add(lma_rms[0]); rmse_stats.add(lma_rms[0]); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { rmse_stats_metric.add(lma_rms[2]); rmse_stats_metric.add(lma_rms[4]); } } if (debugLevel > -3) { if (debugLevel > -3) { System.out.print("Pass multi scene "+scene_index+" (of "+ quadCLTs.length+") "+ System.out.println("Pass multi scene "+scene_index+" (of "+ quadCLTs.length+") "+ quadCLTs[ref_index].getImageName() + "/" + scene_QuadClt.getImageName()+ quadCLTs[ref_index].getImageName() + "/" + scene_QuadClt.getImageName()+ " Done. RMS="+lma_rms[0]+ " Done. Weight = "+lma_rms[2]+", number="+lma_rms[3]); System.out.print("RMS="+lma_rms[0]+ ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=6)) { System.out.print(". RMS="+lma_rms[2]+ System.out.print(". Pixel RMS="+lma_rms[4]+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, average was "+rmse_stats_metric.getAverage()+"pix."); "pix, average was "+rmse_stats_metric.getAverage()+"pix."); } } Loading Loading @@ -1310,15 +1312,16 @@ public class Interscene { adjusted_xyzatr_dt[1]); // ZERO3 // ers_scene.getErsATR_dt() adjusted_xyzatr_dt[1]); // ZERO3 // ers_scene.getErsATR_dt() rmse_stats.add(lma_rms[0]); rmse_stats.add(lma_rms[0]); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { rmse_stats_metric.add(lma_rms[2]); rmse_stats_metric.add(lma_rms[4]); } } if (debugLevel > -3) { if (debugLevel > -3) { System.out.print("Pass multi scene "+fpn_pairs[ipair][0]+" (of "+ quadCLTs.length+") "+ System.out.println("Pass multi scene "+fpn_pairs[ipair][0]+" (of "+ quadCLTs.length+") "+ quadCLTs[fpn_pairs[ipair][1]].getImageName() + "/" + quadCLTs[fpn_pairs[ipair][0]].getImageName()+ quadCLTs[fpn_pairs[ipair][1]].getImageName() + "/" + quadCLTs[fpn_pairs[ipair][0]].getImageName()+ " Done. RMS="+lma_rms[0]+ " Done. Weight = "+lma_rms[2]+", number="+lma_rms[3]); System.out.print("RMS="+lma_rms[0]+ ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=6)) { System.out.print(". RMS="+lma_rms[2]+ System.out.print(". Pixel RMS="+lma_rms[4]+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, average was "+rmse_stats_metric.getAverage()+"pix."); "pix, average was "+rmse_stats_metric.getAverage()+"pix."); } } Loading Loading @@ -1827,15 +1830,16 @@ public class Interscene { ); ); rmse_stats.add(lma_rms[0]); rmse_stats.add(lma_rms[0]); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { rmse_stats_metric.add(lma_rms[2]); rmse_stats_metric.add(lma_rms[4]); } } if (debugLevel > -3) { if (debugLevel > -3) { System.out.print("Pass multi scene "+scene_index+" (of "+ quadCLTs.length+") "+ System.out.println("Pass multi scene "+scene_index+" (of "+ quadCLTs.length+") "+ quadCLTs[ref_index].getImageName() + "/" + scene_QuadClt.getImageName()+ quadCLTs[ref_index].getImageName() + "/" + scene_QuadClt.getImageName()+ " Done. RMS="+lma_rms[0]+ " Done. Weight = "+lma_rms[2]+", number="+lma_rms[3]); System.out.print("RMS="+lma_rms[0]+ ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=6)) { System.out.print(". RMS="+lma_rms[2]+ System.out.print(". Pixel RMS="+lma_rms[4]+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, average was "+rmse_stats_metric.getAverage()+"pix."); "pix, average was "+rmse_stats_metric.getAverage()+"pix."); } } Loading Loading @@ -2362,7 +2366,7 @@ public class Interscene { boolean test_adjust = debugLevel > 1000; boolean test_adjust = debugLevel > 1000; while (test_adjust) { while (test_adjust) { int [] test_pair = {ref_index, 0}; int [] test_pair = {ref_index, 0}; double [] test_lma_rms = new double[clt_parameters.imp.eig_use? 4 : 2]; // [2]; double [] test_lma_rms = new double[clt_parameters.imp.eig_use? 6 : 4]; // [2]; TpTask[][] tp_tasks_test_rel_ref = new TpTask[2][]; TpTask[][] tp_tasks_test_rel_ref = new TpTask[2][]; double [][] test_xyzatr = adjustDiffPairsLMAInterscene( // compare two scenes, first may be reference, use motion blur double [][] test_xyzatr = adjustDiffPairsLMAInterscene( // compare two scenes, first may be reference, use motion blur clt_parameters, //CLTParameters clt_parameters, clt_parameters, //CLTParameters clt_parameters, Loading Loading @@ -2468,7 +2472,7 @@ public class Interscene { dxyzatr_dt[nscene] dxyzatr_dt[nscene] ); ); } else { // if (nscene == ref_index) } else { // if (nscene == ref_index) double [] lma_rms = new double[clt_parameters.imp.eig_use? 4 : 2]; // [2]; double [] lma_rms = new double[clt_parameters.imp.eig_use? 6 : 4]; // [2]; double [][] initial_pose = scenes_xyzatr[nscene].clone(); double [][] initial_pose = scenes_xyzatr[nscene].clone(); boolean adjust_OK = false; boolean adjust_OK = false; if (est_shift < min_max[0]) { if (est_shift < min_max[0]) { Loading Loading @@ -2605,15 +2609,16 @@ public class Interscene { rmse_stats.add(lma_rms[0]); rmse_stats.add(lma_rms[0]); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { rmse_stats_metric.add(lma_rms[2]); rmse_stats_metric.add(lma_rms[4]); } } if (debugLevel > -3) { if (debugLevel > -3) { System.out.print("reAdjustPairsLMAInterscene "+nscene+" (of "+ quadCLTs.length+") "+ System.out.println("reAdjustPairsLMAInterscene "+nscene+" (of "+ quadCLTs.length+") "+ quadCLTs[ref_index].getImageName() + "/" + ts+ quadCLTs[ref_index].getImageName() + "/" + ts+ " Done. RMS="+lma_rms[0]+ " Done. Weight = "+lma_rms[2]+", number="+lma_rms[3]); System.out.print("RMS="+lma_rms[0]+ ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=6)) { System.out.print(". RMS="+lma_rms[2]+ System.out.print(". Pixel RMS="+lma_rms[4]+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, average was "+rmse_stats_metric.getAverage()+"pix."); "pix, average was "+rmse_stats_metric.getAverage()+"pix."); } } Loading Loading @@ -2674,7 +2679,7 @@ public class Interscene { " being too close to reference "+ref_index+ " being too close to reference "+ref_index+ ", using scene "+fpn_pairs[ipair][1]+" as a reference"); ", using scene "+fpn_pairs[ipair][1]+" as a reference"); } } double [] lma_rms = new double[clt_parameters.imp.eig_use? 4 : 2]; // [2]; double [] lma_rms = new double[clt_parameters.imp.eig_use? 6 : 4]; // [2]; TpTask[][] tp_tasks_rel_ref = new TpTask[2][]; TpTask[][] tp_tasks_rel_ref = new TpTask[2][]; double [][] rel_xyzatr = adjustDiffPairsLMAInterscene( // compare two scenes, first may be reference, use motion blur double [][] rel_xyzatr = adjustDiffPairsLMAInterscene( // compare two scenes, first may be reference, use motion blur clt_parameters, //CLTParameters clt_parameters, clt_parameters, //CLTParameters clt_parameters, Loading Loading @@ -2726,15 +2731,16 @@ public class Interscene { adjusted_xyzatr_dt[1]); adjusted_xyzatr_dt[1]); rmse_stats.add(lma_rms[0]); rmse_stats.add(lma_rms[0]); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { rmse_stats_metric.add(lma_rms[2]); rmse_stats_metric.add(lma_rms[4]); } } if (debugLevel > -3) { if (debugLevel > -3) { System.out.print("reAdjustPairsLMAInterscene "+fpn_pairs[ipair][0]+" (of "+ quadCLTs.length+") "+ System.out.println("reAdjustPairsLMAInterscene "+fpn_pairs[ipair][0]+" (of "+ quadCLTs.length+") "+ quadCLTs[fpn_pairs[ipair][1]].getImageName() + "/" + quadCLTs[fpn_pairs[ipair][0]].getImageName()+ quadCLTs[fpn_pairs[ipair][1]].getImageName() + "/" + quadCLTs[fpn_pairs[ipair][0]].getImageName()+ " Done. RMS="+lma_rms[0]+ " Done. Weight = "+lma_rms[2]+", number="+lma_rms[3]); System.out.print("RMS="+lma_rms[0]+ ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=6)) { System.out.print(". RMS="+lma_rms[2]+ System.out.print(". Pixel RMS="+lma_rms[4]+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, average was "+rmse_stats_metric.getAverage()+"pix."); "pix, average was "+rmse_stats_metric.getAverage()+"pix."); } } Loading @@ -2748,7 +2754,7 @@ public class Interscene { if (test_adjust1) { if (test_adjust1) { int [] test_pair = {0, ref_index}; int [] test_pair = {0, ref_index}; while (test_adjust1) { while (test_adjust1) { double [] test_lma_rms = new double[clt_parameters.imp.eig_use? 4 : 2]; // [2]; double [] test_lma_rms = new double[clt_parameters.imp.eig_use? 6 : 4]; // [2]; TpTask[][] tp_tasks_test_rel_ref = new TpTask[2][]; TpTask[][] tp_tasks_test_rel_ref = new TpTask[2][]; System.out.println("test_adjust scene = "+test_pair[0]+", reference="+test_pair[1]); System.out.println("test_adjust scene = "+test_pair[0]+", reference="+test_pair[1]); double [][] test_xyzatr = adjustDiffPairsLMAInterscene( // compare two scenes, first may be reference, use motion blur double [][] test_xyzatr = adjustDiffPairsLMAInterscene( // compare two scenes, first may be reference, use motion blur Loading Loading @@ -3540,18 +3546,22 @@ public class Interscene { if ((rms_out != null) && (intersceneLma.getLastRms() != null)) { if ((rms_out != null) && (intersceneLma.getLastRms() != null)) { rms_out[0] = intersceneLma.getLastRms()[0]; rms_out[0] = intersceneLma.getLastRms()[0]; rms_out[1] = intersceneLma.getLastRms()[1]; rms_out[1] = intersceneLma.getLastRms()[1]; if (rms_out.length >=2) { rms_out[2] = intersceneLma.getSumWeights(); rms_out[3] = intersceneLma.getNumDefined(); if (rms_out.length >=4) { if (rms_out.length >=4) { if (intersceneLma.isEigenNormalized()) { if (intersceneLma.isEigenNormalized()) { double [] rms_metric = intersceneLma.calcRMS(true); double [] rms_metric = intersceneLma.calcRMS(true); rms_out[2] = rms_metric[0]; rms_out[4] = rms_metric[0]; rms_out[3] = rms_metric[1]; rms_out[5] = rms_metric[1]; } else { } else { rms_out[2] = Double.NaN; rms_out[4] = Double.NaN; rms_out[3] = Double.NaN; rms_out[5] = Double.NaN; } } } } } //if (lmaResult < 0) { last_rms[0] //if (lmaResult < 0) { last_rms[0] } } if (max_rms > 0.0) { if (max_rms > 0.0) { Loading Loading @@ -4308,7 +4318,6 @@ public class Interscene { fpn_offsets, // final double [][] fpn_offsets, // null, or per-tile X,Y offset to be blanked fpn_offsets, // final double [][] fpn_offsets, // null, or per-tile X,Y offset to be blanked fpn_radius, // final double fpn_radius, // radius to be blanked around FPN offset center fpn_radius, // final double fpn_radius, // radius to be blanked around FPN offset center fpn_ignore_border, // final boolean fpn_ignore_border, // only if fpn_mask != null - ignore tile if maximum touches fpn_mask fpn_ignore_border, // final boolean fpn_ignore_border, // only if fpn_mask != null - ignore tile if maximum touches fpn_mask // motion_vectors, // final double [][][] motion_vectors, // [tilesY*tilesX][][] -> [][][num_sel_sensors+1][2] clt_parameters.imp.run_poly, // final boolean run_poly, // polynomial max, if false - centroid clt_parameters.imp.run_poly, // final boolean run_poly, // polynomial max, if false - centroid use_partial, // final boolean use_partial, // find motion vectors for individual pairs, false - for sum only use_partial, // final boolean use_partial, // find motion vectors for individual pairs, false - for sum only clt_parameters.imp.centroid_radius,// final double centroid_radius, // 0 - use all tile, >0 - cosine window around local max clt_parameters.imp.centroid_radius,// final double centroid_radius, // 0 - use all tile, >0 - cosine window around local max Loading @@ -4318,12 +4327,13 @@ public class Interscene { clt_parameters.imp.pd_weight, // final double pd_weight, // correlations (post) accumulated in PD clt_parameters.imp.pd_weight, // final double pd_weight, // correlations (post) accumulated in PD clt_parameters.imp.td_nopd_only, // final boolean td_nopd_only , // only use TD accumulated data if no safe PD is available for the tile. clt_parameters.imp.td_nopd_only, // final boolean td_nopd_only , // only use TD accumulated data if no safe PD is available for the tile. clt_parameters.imp.eig_use_neibs, // final boolean eig_use_neibs, // use correlation from 9 tiles with neibs, if single-tile fails clt_parameters.imp.eig_use_neibs, // final boolean eig_use_neibs, // use correlation from 9 tiles with neibs, if single-tile fails clt_parameters.imp.eig_min_weaks, // final int eig_min_weaks, // = 4; minimal weak neighbors for a weak tile (too few - no averaging) clt_parameters.imp.eig_min_strongs,// final int eig_min_strongs, // minimal strong neighbors for strong tiles clt_parameters.imp.eig_disp_diff, // final double eig_disp_diff, // maximal disparity difference from the closest (by disparity) neighbor clt_parameters.imp.eig_remove_neibs,//final boolean eig_remove_neibs, //remove weak (by-neibs) tiles if they have strong (by-single) neighbor clt_parameters.imp.eig_remove_neibs,//final boolean eig_remove_neibs, //remove weak (by-neibs) tiles if they have strong (by-single) neighbor clt_parameters.imp.eig_filt_other, // final boolean eig_filt_other, // apply other before-eigen filters clt_parameters.imp.eig_filt_other, // final boolean eig_filt_other, // apply other before-eigen filters // min_str, // final double min_str_nofpn, // = 0.25; eig_str_sum, // final double eig_str_sum_nofpn, // = 0.8; // 5; eig_str_sum, // final double eig_str_sum_nofpn, // = 0.8; // 5; eig_str_neib, // final double eig_str_neib_nofpn, eig_str_neib, // final double eig_str_neib_nofpn, // clt_parameters.imp.min_str_fpn, // final double min_str, // = 0.25; clt_parameters.imp.eig_str_sum_fpn,// final double eig_str_sum_fpn, // = 0.8; // 5; clt_parameters.imp.eig_str_sum_fpn,// final double eig_str_sum_fpn, // = 0.8; // 5; clt_parameters.imp.eig_str_neib_fpn,//final double eig_str_neib_fpn, clt_parameters.imp.eig_str_neib_fpn,//final double eig_str_neib_fpn, clt_parameters.imp.min_neibs, // final int min_neibs, // 2; // minimal number of strong neighbors (> min_str) clt_parameters.imp.min_neibs, // final int min_neibs, // 2; // minimal number of strong neighbors (> min_str) Loading @@ -4332,7 +4342,6 @@ public class Interscene { clt_parameters.imp.half_avg_diff, // final double half_avg_diff, // 0.2; // when L2 of x,y difference from average of neibs - reduce twice clt_parameters.imp.half_avg_diff, // final double half_avg_diff, // 0.2; // when L2 of x,y difference from average of neibs - reduce twice neibs_nofpn_only, // final boolean neibs_nofpn_only, // consolidate neighbors fot non-fpn tiles only! neibs_nofpn_only, // final boolean neibs_nofpn_only, // consolidate neighbors fot non-fpn tiles only! redo_both, // final boolean redo_both, // use average of neighbors for both pd,td if any of the center tile tests (td, pd) fails redo_both, // final boolean redo_both, // use average of neighbors for both pd,td if any of the center tile tests (td, pd) fails min_num_neibs, // final int min_num_neibs, // plus center, total number >= (min_num_neibs+1) scale_neibs_pd, // final double scale_neibs_pd, // scale threshold for the pixel-domain average maximums scale_neibs_pd, // final double scale_neibs_pd, // scale threshold for the pixel-domain average maximums scale_neibs_td, // final double scale_neibs_td, // scale threshold for the transform-domain average maximums scale_neibs_td, // final double scale_neibs_td, // scale threshold for the transform-domain average maximums scale_avg_weight, // final double scale_avg_weight, // reduce influence of the averaged correlations compared to the single-tile ones scale_avg_weight, // final double scale_avg_weight, // reduce influence of the averaged correlations compared to the single-tile ones Loading Loading
src/main/java/com/elphel/imagej/tileprocessor/ImageDtt.java +93 −18 Original line number Original line Diff line number Diff line Loading @@ -2348,14 +2348,17 @@ public class ImageDtt extends ImageDttCPU { final double td_weight, // mix correlations accumulated in TD with final double td_weight, // mix correlations accumulated in TD with final double td_neib_weight, // mix correlations accumulated in TD (neibs) final double td_neib_weight, // mix correlations accumulated in TD (neibs) final double pd_weight, // correlations (post) accumulated in PD final double pd_weight, // correlations (post) accumulated in PD final boolean td_nopd_only, // only use TD accumulated data if no safe PD is available for the tile. final boolean td_nopd_only, // only use TD accumulated data if no safe PD is available for the tile. final boolean eig_use_neibs, // use correlation from 9 tiles with neibs, if single-tile fails final boolean eig_use_neibs, // use correlation from 9 tiles with neibs, if single-tile fails final int eig_min_weaks, // = 4; minimal weak neighbors for a weak tile (too few - no averaging) final int eig_min_strongs, // minimal strong neighbors for strong tiles final double eig_disp_diff, // maximal disparity difference from the closest (by disparity) neighbor final boolean eig_remove_neibs, //remove weak (by-neibs) tiles if they have strong (by-single) neighbor final boolean eig_remove_neibs, //remove weak (by-neibs) tiles if they have strong (by-single) neighbor final boolean eig_filt_other, // apply other before-eigen filters final boolean eig_filt_other, // apply other before-eigen filters // final double min_str_nofpn, // = 0.25; final double eig_str_sum_nofpn,// = 0.8; // 5; final double eig_str_sum_nofpn,// = 0.8; // 5; final double eig_str_neib_nofpn,// = 0.8; // 5; final double eig_str_neib_nofpn,// = 0.8; // 5; // final double min_str_fpn, // = 0.25; final double eig_str_sum_fpn, // = 0.8; // 5; final double eig_str_sum_fpn, // = 0.8; // 5; final double eig_str_neib_fpn, // = 0.8; // 5; final double eig_str_neib_fpn, // = 0.8; // 5; final int min_neibs, // 2; // minimal number of strong neighbors (> min_str) final int min_neibs, // 2; // minimal number of strong neighbors (> min_str) Loading @@ -2365,7 +2368,7 @@ public class ImageDtt extends ImageDttCPU { final boolean neibs_nofpn_only, // consolidate neighbors for non-fpn tiles only! final boolean neibs_nofpn_only, // consolidate neighbors for non-fpn tiles only! final boolean redo_both, // use average of neighbors for both pd,td if any of the center tile tests (td, pd) fails final boolean redo_both, // use average of neighbors for both pd,td if any of the center tile tests (td, pd) fails final int min_num_neibs, // plus center, total number >= (min_num_neibs+1) final double scale_neibs_pd, // scale threshold for the pixel-domain average maximums final double scale_neibs_pd, // scale threshold for the pixel-domain average maximums final double scale_neibs_td, // scale threshold for the transform-domain average maximums final double scale_neibs_td, // scale threshold for the transform-domain average maximums final double scale_avg_weight, // reduce influence of the averaged correlations compared to the single-tile ones final double scale_avg_weight, // reduce influence of the averaged correlations compared to the single-tile ones Loading @@ -2379,7 +2382,6 @@ public class ImageDtt extends ImageDttCPU { final int threadsMax, // maximal number of threads to launch final int threadsMax, // maximal number of threads to launch final int globalDebugLevel) final int globalDebugLevel) { { // final boolean // final boolean eigen_sub_min = false; // when calculating eigenvectors, subtract min from data, false - just skip // final boolean eigen_sub_min = false; // when calculating eigenvectors, subtract min from data, false - just skip if (this.gpuQuad == null) { if (this.gpuQuad == null) { System.out.println("clt_process_tl_interscene(): this.gpuQuad is null, bailing out"); System.out.println("clt_process_tl_interscene(): this.gpuQuad is null, bailing out"); Loading Loading @@ -2497,6 +2499,7 @@ public class ImageDtt extends ImageDttCPU { final Thread[] threads = newThreadArray(threadsMax); final Thread[] threads = newThreadArray(threadsMax); final AtomicInteger ai = new AtomicInteger(0); final AtomicInteger ai = new AtomicInteger(0); final boolean [] used_td = new boolean [tilesX*tilesY]; // this tile had strong enough TD w/o neibs final boolean [] used_td = new boolean [tilesX*tilesY]; // this tile had strong enough TD w/o neibs final boolean [] weak_tile = new boolean [tilesX*tilesY]; // this is a weak tile (only through consolidating neighbors) // all neibs with strong TD around them will be removed // all neibs with strong TD around them will be removed // not using PD at all? always TD, then neibs? // not using PD at all? always TD, then neibs? for (int ithread = 0; ithread < threads.length; ithread++) { for (int ithread = 0; ithread < threads.length; ithread++) { Loading Loading @@ -2537,10 +2540,7 @@ public class ImageDtt extends ImageDttCPU { is_fpn = true; is_fpn = true; } } // double [][] corrs = new double [corrs_len + extra_len + extra_len_eig][]; // 1/17/2/18 +(0/1) double [][] corrs = new double [corrs_len + extra_len][]; // 1/17/2/18 +(0/1) double [][] corrs = new double [corrs_len + extra_len][]; // 1/17/2/18 +(0/1) // int eigen_indx = (extra_len_eig > 0) ? (corrs_len + extra_len + extra_len_eig -1):-1; // int eigen_indx = (extra_len_eig > 0) ? (corrs_len + extra_len):-1; // copy correlation tiles from the GPU's floating point arrays // copy correlation tiles from the GPU's floating point arrays double scale = 1.0/getNumSensors(); double scale = 1.0/getNumSensors(); if (extra_sum) { if (extra_sum) { Loading Loading @@ -2654,6 +2654,13 @@ public class ImageDtt extends ImageDttCPU { false, // boolean ignore_border, // only if fpn_mask != null - ignore tile if maximum touches fpn_mask false, // boolean ignore_border, // only if fpn_mask != null - ignore tile if maximum touches fpn_mask debug_data, // double [][] debug_data, // null or double [1] debug_data, // double [][] debug_data, // null or double [1] false); // boolean debug) false); // boolean debug) weak_tile[nTile] = stats_mv != null; if (stats_mv != null) { stats_mv[2] -= eig_str_neib * scale_neibs_td; if (stats_mv[2] <= 0) { stats_mv = null; } } } } if ((debug_data != null) && (debug_data[0] != null)) { if ((debug_data != null) && (debug_data[0] != null)) { iCorrTile_index[nTile] = iCorrTile; iCorrTile_index[nTile] = iCorrTile; Loading Loading @@ -2698,10 +2705,34 @@ public class ImageDtt extends ImageDttCPU { public void run() { public void run() { TileNeibs tn = new TileNeibs(tilesX,tilesY); TileNeibs tn = new TileNeibs(tilesX,tilesY); for (int nTile = ai.getAndIncrement(); nTile < tiles; nTile = ai.getAndIncrement()) { for (int nTile = ai.getAndIncrement(); nTile < tiles; nTile = ai.getAndIncrement()) { if ((mv[nTile] != null) && !used_td[nTile]) { // is weak (by neibs) boolean remove_tile = false; if (weak_tile[nTile]){ int num_weak = 0; boolean has_strong = false; for (int dir = 0; dir < TileNeibs.DIRS; dir++) { int nTile1 = tn.getNeibIndex(nTile, dir); if (nTile1 >= 0) { if (used_td[nTile1]) { has_strong = true; break; } else if (weak_tile[nTile1]) { num_weak++; } } } remove_tile |= (has_strong || (num_weak < eig_min_weaks)); } else if (used_td[nTile]) { int num_strong = 0; for (int dir = 0; dir < TileNeibs.DIRS; dir++) { for (int dir = 0; dir < TileNeibs.DIRS; dir++) { int nTile1 = tn.getNeibIndex(nTile, dir); int nTile1 = tn.getNeibIndex(nTile, dir); if ((nTile1 >= 0) && used_td[nTile1]) { if ((nTile1 >= 0) && (used_td[nTile1])) { num_strong++; } } remove_tile |= (num_strong < eig_min_strongs); } if (remove_tile) { // any of 3 reasons above mv[nTile] = null; mv[nTile] = null; if (pxd != null) { if (pxd != null) { pxd[nTile] = null; pxd[nTile] = null; Loading @@ -2711,16 +2742,58 @@ public class ImageDtt extends ImageDttCPU { dcorr_tiles[iCorrTile][eigen_indx+1] = null; dcorr_tiles[iCorrTile][eigen_indx+1] = null; dcorr_tiles[iCorrTile][eigen_indx+3] = null; dcorr_tiles[iCorrTile][eigen_indx+3] = null; } } break; } } } } } } }; } startAndJoin(threads); if (eig_disp_diff > 0) { final boolean [] remove_tiles = new boolean[tilesX*tilesY]; ai.set(0); for (int ithread = 0; ithread < threads.length; ithread++) { threads[ithread] = new Thread() { @Override public void run() { TileNeibs tn = new TileNeibs(tilesX,tilesY); for (int nTile = ai.getAndIncrement(); nTile < tiles; nTile = ai.getAndIncrement()) if ((mv[nTile] != null) && (pXpYD[nTile] != null)) { double min_diff = eig_disp_diff + 1.0; double disp_c = pxd[nTile][2]; for (int dir = 0; dir < TileNeibs.DIRS; dir++) { int nTile1 = tn.getNeibIndex(nTile, dir); if ((nTile1 >= 0) && (pxd[nTile1]!= null) && !Double.isNaN(pxd[nTile1][2])) { min_diff = Math.min(Math.abs(pxd[nTile1][2]-disp_c), min_diff); } } remove_tiles[nTile] |= (min_diff > eig_disp_diff); } } }; } startAndJoin(threads); ai.set(0); for (int ithread = 0; ithread < threads.length; ithread++) { threads[ithread] = new Thread() { @Override public void run() { for (int nTile = ai.getAndIncrement(); nTile < tiles; nTile = ai.getAndIncrement()) if (remove_tiles[nTile]) { mv[nTile] = null; if (pxd != null) { pxd[nTile] = null; } if (iCorrTile_index != null) { int iCorrTile = iCorrTile_index[nTile]; dcorr_tiles[iCorrTile][eigen_indx+1] = null; dcorr_tiles[iCorrTile][eigen_indx+3] = null; } } } } } }; }; } } startAndJoin(threads); startAndJoin(threads); } } } // Reduce weight if differs much from average of 8 neighbors, large disparity, remove too few neibs // Reduce weight if differs much from average of 8 neighbors, large disparity, remove too few neibs final double scale_num_neib = ((weight_zero_neibs >= 0) && (weight_zero_neibs < 1.0)) ? (weight_zero_neibs * 8/(1.0 - weight_zero_neibs)): 0.0; final double scale_num_neib = ((weight_zero_neibs >= 0) && (weight_zero_neibs < 1.0)) ? (weight_zero_neibs * 8/(1.0 - weight_zero_neibs)): 0.0; if (eig_filt_other) { if (eig_filt_other) { Loading Loading @@ -2792,6 +2865,8 @@ public class ImageDtt extends ImageDttCPU { startAndJoin(threads); startAndJoin(threads); return coord_motion; return coord_motion; } } // using most of the ImageDttCPU.clt_process_tl_correlations // using most of the ImageDttCPU.clt_process_tl_correlations public void clt_process_tl_correlations( // convert to pixel domain and process correlations already prepared in fcorr_td and/or fcorr_combo_td public void clt_process_tl_correlations( // convert to pixel domain and process correlations already prepared in fcorr_td and/or fcorr_combo_td 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 Loading
src/main/java/com/elphel/imagej/tileprocessor/Interscene.java +83 −74 Original line number Original line Diff line number Diff line Loading @@ -534,7 +534,7 @@ public class Interscene { boolean use_lma_dsi = clt_parameters.imp.use_lma_dsi; boolean use_lma_dsi = clt_parameters.imp.use_lma_dsi; double [] reduced_strength = new double[1]; double [] reduced_strength = new double[1]; double avg_z = quadCLTs[ref_index].getAverageZ(true); // use lma double avg_z = quadCLTs[ref_index].getAverageZ(true); // use lma double [] lma_rms = new double[clt_parameters.imp.eig_use? 4 : 2]; // [2]; double [] lma_rms = new double[clt_parameters.imp.eig_use? 6 : 4]; // [2]; // use combo if second pass? // use combo if second pass? if (min_ref_str > 0.0) { if (min_ref_str > 0.0) { reliable_ref = quadCLTs[ref_index].getReliableTiles( // will be null if does not exist. reliable_ref = quadCLTs[ref_index].getReliableTiles( // will be null if does not exist. Loading Loading @@ -683,20 +683,20 @@ public class Interscene { ); ); rmse_stats.add(lma_rms[0]); rmse_stats.add(lma_rms[0]); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { rmse_stats_metric.add(lma_rms[2]); rmse_stats_metric.add(lma_rms[4]); } } if (debugLevel > -3) { if (debugLevel > -3) { System.out.print("invertInitialOrientation(): scene "+scene_index+" (of "+ quadCLTs.length+") "+ System.out.println("invertInitialOrientation(): scene "+scene_index+" (of "+ quadCLTs.length+") "+ quadCLTs[ref_index].getImageName() + "/" + quadCLTs[scene_index].getImageName()+ quadCLTs[ref_index].getImageName() + "/" + quadCLTs[scene_index].getImageName()+ " Done. RMS="+lma_rms[0]+ " Done. Weight = "+lma_rms[2]+", number="+lma_rms[3]); System.out.print("RMS="+lma_rms[0]+ ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=6)) { System.out.print(". RMS="+lma_rms[2]+ System.out.print(". Pixel RMS="+lma_rms[4]+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, average was "+rmse_stats_metric.getAverage()+"pix."); "pix, average was "+rmse_stats_metric.getAverage()+"pix."); } } System.out.println(); System.out.println(); } } } // for (int scene_index = ref_index; scene_index <= last_index; scene_index++) { } // for (int scene_index = ref_index; scene_index <= last_index; scene_index++) { Loading Loading @@ -783,15 +783,16 @@ public class Interscene { adjusted_xyzatr_dt[1]); // ZERO3 // ers_scene.getErsATR_dt() adjusted_xyzatr_dt[1]); // ZERO3 // ers_scene.getErsATR_dt() rmse_stats.add(lma_rms[0]); rmse_stats.add(lma_rms[0]); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { rmse_stats_metric.add(lma_rms[2]); rmse_stats_metric.add(lma_rms[4]); } } if (debugLevel > -3) { if (debugLevel > -3) { System.out.print("Pass multi scene "+fpn_pairs[ipair][0]+" (of "+ quadCLTs.length+") "+ System.out.println("Pass multi scene "+fpn_pairs[ipair][0]+" (of "+ quadCLTs.length+") "+ quadCLTs[fpn_pairs[ipair][1]].getImageName() + "/" + quadCLTs[fpn_pairs[ipair][0]].getImageName()+ quadCLTs[fpn_pairs[ipair][1]].getImageName() + "/" + quadCLTs[fpn_pairs[ipair][0]].getImageName()+ " Done. RMS="+lma_rms[0]+ " Done. Weight = "+lma_rms[2]+", number="+lma_rms[3]); System.out.print("RMS="+lma_rms[0]+ ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=6)) { System.out.print(". RMS="+lma_rms[2]+ System.out.print(". RMS="+lma_rms[4]+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, average was "+rmse_stats_metric.getAverage()+"pix."); "pix, average was "+rmse_stats_metric.getAverage()+"pix."); } } Loading Loading @@ -866,7 +867,7 @@ public class Interscene { System.out.println("*** setInitialOrientationsIms(): clt_parameters.ilp.ilma_3d is TRUE. You may want to disable it when using IMS"); System.out.println("*** setInitialOrientationsIms(): clt_parameters.ilp.ilma_3d is TRUE. You may want to disable it when using IMS"); } } double [] lma_rms = new double[clt_parameters.imp.eig_use? 4 : 2]; // [2]; double [] lma_rms = new double[clt_parameters.imp.eig_use? 6 : 4]; // [2]; int tilesX = quadCLTs[ref_index].getTileProcessor().getTilesX(); int tilesX = quadCLTs[ref_index].getTileProcessor().getTilesX(); int tilesY = quadCLTs[ref_index].getTileProcessor().getTilesY(); int tilesY = quadCLTs[ref_index].getTileProcessor().getTilesY(); Loading Loading @@ -1202,15 +1203,16 @@ public class Interscene { ); ); rmse_stats.add(lma_rms[0]); rmse_stats.add(lma_rms[0]); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { rmse_stats_metric.add(lma_rms[2]); rmse_stats_metric.add(lma_rms[4]); } } if (debugLevel > -3) { if (debugLevel > -3) { System.out.print("Pass multi scene "+scene_index+" (of "+ quadCLTs.length+") "+ System.out.println("Pass multi scene "+scene_index+" (of "+ quadCLTs.length+") "+ quadCLTs[ref_index].getImageName() + "/" + scene_QuadClt.getImageName()+ quadCLTs[ref_index].getImageName() + "/" + scene_QuadClt.getImageName()+ " Done. RMS="+lma_rms[0]+ " Done. Weight = "+lma_rms[2]+", number="+lma_rms[3]); System.out.print("RMS="+lma_rms[0]+ ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=6)) { System.out.print(". RMS="+lma_rms[2]+ System.out.print(". Pixel RMS="+lma_rms[4]+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, average was "+rmse_stats_metric.getAverage()+"pix."); "pix, average was "+rmse_stats_metric.getAverage()+"pix."); } } Loading Loading @@ -1310,15 +1312,16 @@ public class Interscene { adjusted_xyzatr_dt[1]); // ZERO3 // ers_scene.getErsATR_dt() adjusted_xyzatr_dt[1]); // ZERO3 // ers_scene.getErsATR_dt() rmse_stats.add(lma_rms[0]); rmse_stats.add(lma_rms[0]); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { rmse_stats_metric.add(lma_rms[2]); rmse_stats_metric.add(lma_rms[4]); } } if (debugLevel > -3) { if (debugLevel > -3) { System.out.print("Pass multi scene "+fpn_pairs[ipair][0]+" (of "+ quadCLTs.length+") "+ System.out.println("Pass multi scene "+fpn_pairs[ipair][0]+" (of "+ quadCLTs.length+") "+ quadCLTs[fpn_pairs[ipair][1]].getImageName() + "/" + quadCLTs[fpn_pairs[ipair][0]].getImageName()+ quadCLTs[fpn_pairs[ipair][1]].getImageName() + "/" + quadCLTs[fpn_pairs[ipair][0]].getImageName()+ " Done. RMS="+lma_rms[0]+ " Done. Weight = "+lma_rms[2]+", number="+lma_rms[3]); System.out.print("RMS="+lma_rms[0]+ ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=6)) { System.out.print(". RMS="+lma_rms[2]+ System.out.print(". Pixel RMS="+lma_rms[4]+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, average was "+rmse_stats_metric.getAverage()+"pix."); "pix, average was "+rmse_stats_metric.getAverage()+"pix."); } } Loading Loading @@ -1827,15 +1830,16 @@ public class Interscene { ); ); rmse_stats.add(lma_rms[0]); rmse_stats.add(lma_rms[0]); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { rmse_stats_metric.add(lma_rms[2]); rmse_stats_metric.add(lma_rms[4]); } } if (debugLevel > -3) { if (debugLevel > -3) { System.out.print("Pass multi scene "+scene_index+" (of "+ quadCLTs.length+") "+ System.out.println("Pass multi scene "+scene_index+" (of "+ quadCLTs.length+") "+ quadCLTs[ref_index].getImageName() + "/" + scene_QuadClt.getImageName()+ quadCLTs[ref_index].getImageName() + "/" + scene_QuadClt.getImageName()+ " Done. RMS="+lma_rms[0]+ " Done. Weight = "+lma_rms[2]+", number="+lma_rms[3]); System.out.print("RMS="+lma_rms[0]+ ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=6)) { System.out.print(". RMS="+lma_rms[2]+ System.out.print(". Pixel RMS="+lma_rms[4]+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, average was "+rmse_stats_metric.getAverage()+"pix."); "pix, average was "+rmse_stats_metric.getAverage()+"pix."); } } Loading Loading @@ -2362,7 +2366,7 @@ public class Interscene { boolean test_adjust = debugLevel > 1000; boolean test_adjust = debugLevel > 1000; while (test_adjust) { while (test_adjust) { int [] test_pair = {ref_index, 0}; int [] test_pair = {ref_index, 0}; double [] test_lma_rms = new double[clt_parameters.imp.eig_use? 4 : 2]; // [2]; double [] test_lma_rms = new double[clt_parameters.imp.eig_use? 6 : 4]; // [2]; TpTask[][] tp_tasks_test_rel_ref = new TpTask[2][]; TpTask[][] tp_tasks_test_rel_ref = new TpTask[2][]; double [][] test_xyzatr = adjustDiffPairsLMAInterscene( // compare two scenes, first may be reference, use motion blur double [][] test_xyzatr = adjustDiffPairsLMAInterscene( // compare two scenes, first may be reference, use motion blur clt_parameters, //CLTParameters clt_parameters, clt_parameters, //CLTParameters clt_parameters, Loading Loading @@ -2468,7 +2472,7 @@ public class Interscene { dxyzatr_dt[nscene] dxyzatr_dt[nscene] ); ); } else { // if (nscene == ref_index) } else { // if (nscene == ref_index) double [] lma_rms = new double[clt_parameters.imp.eig_use? 4 : 2]; // [2]; double [] lma_rms = new double[clt_parameters.imp.eig_use? 6 : 4]; // [2]; double [][] initial_pose = scenes_xyzatr[nscene].clone(); double [][] initial_pose = scenes_xyzatr[nscene].clone(); boolean adjust_OK = false; boolean adjust_OK = false; if (est_shift < min_max[0]) { if (est_shift < min_max[0]) { Loading Loading @@ -2605,15 +2609,16 @@ public class Interscene { rmse_stats.add(lma_rms[0]); rmse_stats.add(lma_rms[0]); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { rmse_stats_metric.add(lma_rms[2]); rmse_stats_metric.add(lma_rms[4]); } } if (debugLevel > -3) { if (debugLevel > -3) { System.out.print("reAdjustPairsLMAInterscene "+nscene+" (of "+ quadCLTs.length+") "+ System.out.println("reAdjustPairsLMAInterscene "+nscene+" (of "+ quadCLTs.length+") "+ quadCLTs[ref_index].getImageName() + "/" + ts+ quadCLTs[ref_index].getImageName() + "/" + ts+ " Done. RMS="+lma_rms[0]+ " Done. Weight = "+lma_rms[2]+", number="+lma_rms[3]); System.out.print("RMS="+lma_rms[0]+ ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=6)) { System.out.print(". RMS="+lma_rms[2]+ System.out.print(". Pixel RMS="+lma_rms[4]+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, average was "+rmse_stats_metric.getAverage()+"pix."); "pix, average was "+rmse_stats_metric.getAverage()+"pix."); } } Loading Loading @@ -2674,7 +2679,7 @@ public class Interscene { " being too close to reference "+ref_index+ " being too close to reference "+ref_index+ ", using scene "+fpn_pairs[ipair][1]+" as a reference"); ", using scene "+fpn_pairs[ipair][1]+" as a reference"); } } double [] lma_rms = new double[clt_parameters.imp.eig_use? 4 : 2]; // [2]; double [] lma_rms = new double[clt_parameters.imp.eig_use? 6 : 4]; // [2]; TpTask[][] tp_tasks_rel_ref = new TpTask[2][]; TpTask[][] tp_tasks_rel_ref = new TpTask[2][]; double [][] rel_xyzatr = adjustDiffPairsLMAInterscene( // compare two scenes, first may be reference, use motion blur double [][] rel_xyzatr = adjustDiffPairsLMAInterscene( // compare two scenes, first may be reference, use motion blur clt_parameters, //CLTParameters clt_parameters, clt_parameters, //CLTParameters clt_parameters, Loading Loading @@ -2726,15 +2731,16 @@ public class Interscene { adjusted_xyzatr_dt[1]); adjusted_xyzatr_dt[1]); rmse_stats.add(lma_rms[0]); rmse_stats.add(lma_rms[0]); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { rmse_stats_metric.add(lma_rms[2]); rmse_stats_metric.add(lma_rms[4]); } } if (debugLevel > -3) { if (debugLevel > -3) { System.out.print("reAdjustPairsLMAInterscene "+fpn_pairs[ipair][0]+" (of "+ quadCLTs.length+") "+ System.out.println("reAdjustPairsLMAInterscene "+fpn_pairs[ipair][0]+" (of "+ quadCLTs.length+") "+ quadCLTs[fpn_pairs[ipair][1]].getImageName() + "/" + quadCLTs[fpn_pairs[ipair][0]].getImageName()+ quadCLTs[fpn_pairs[ipair][1]].getImageName() + "/" + quadCLTs[fpn_pairs[ipair][0]].getImageName()+ " Done. RMS="+lma_rms[0]+ " Done. Weight = "+lma_rms[2]+", number="+lma_rms[3]); System.out.print("RMS="+lma_rms[0]+ ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); ", maximal so far was "+rmse_stats.getMax()+", average was "+rmse_stats.getAverage()); if ((rmse_stats_metric != null) && (lma_rms.length >=4)) { if ((rmse_stats_metric != null) && (lma_rms.length >=6)) { System.out.print(". RMS="+lma_rms[2]+ System.out.print(". Pixel RMS="+lma_rms[4]+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, maximal so far was "+rmse_stats_metric.getMax()+ "pix, average was "+rmse_stats_metric.getAverage()+"pix."); "pix, average was "+rmse_stats_metric.getAverage()+"pix."); } } Loading @@ -2748,7 +2754,7 @@ public class Interscene { if (test_adjust1) { if (test_adjust1) { int [] test_pair = {0, ref_index}; int [] test_pair = {0, ref_index}; while (test_adjust1) { while (test_adjust1) { double [] test_lma_rms = new double[clt_parameters.imp.eig_use? 4 : 2]; // [2]; double [] test_lma_rms = new double[clt_parameters.imp.eig_use? 6 : 4]; // [2]; TpTask[][] tp_tasks_test_rel_ref = new TpTask[2][]; TpTask[][] tp_tasks_test_rel_ref = new TpTask[2][]; System.out.println("test_adjust scene = "+test_pair[0]+", reference="+test_pair[1]); System.out.println("test_adjust scene = "+test_pair[0]+", reference="+test_pair[1]); double [][] test_xyzatr = adjustDiffPairsLMAInterscene( // compare two scenes, first may be reference, use motion blur double [][] test_xyzatr = adjustDiffPairsLMAInterscene( // compare two scenes, first may be reference, use motion blur Loading Loading @@ -3540,18 +3546,22 @@ public class Interscene { if ((rms_out != null) && (intersceneLma.getLastRms() != null)) { if ((rms_out != null) && (intersceneLma.getLastRms() != null)) { rms_out[0] = intersceneLma.getLastRms()[0]; rms_out[0] = intersceneLma.getLastRms()[0]; rms_out[1] = intersceneLma.getLastRms()[1]; rms_out[1] = intersceneLma.getLastRms()[1]; if (rms_out.length >=2) { rms_out[2] = intersceneLma.getSumWeights(); rms_out[3] = intersceneLma.getNumDefined(); if (rms_out.length >=4) { if (rms_out.length >=4) { if (intersceneLma.isEigenNormalized()) { if (intersceneLma.isEigenNormalized()) { double [] rms_metric = intersceneLma.calcRMS(true); double [] rms_metric = intersceneLma.calcRMS(true); rms_out[2] = rms_metric[0]; rms_out[4] = rms_metric[0]; rms_out[3] = rms_metric[1]; rms_out[5] = rms_metric[1]; } else { } else { rms_out[2] = Double.NaN; rms_out[4] = Double.NaN; rms_out[3] = Double.NaN; rms_out[5] = Double.NaN; } } } } } //if (lmaResult < 0) { last_rms[0] //if (lmaResult < 0) { last_rms[0] } } if (max_rms > 0.0) { if (max_rms > 0.0) { Loading Loading @@ -4308,7 +4318,6 @@ public class Interscene { fpn_offsets, // final double [][] fpn_offsets, // null, or per-tile X,Y offset to be blanked fpn_offsets, // final double [][] fpn_offsets, // null, or per-tile X,Y offset to be blanked fpn_radius, // final double fpn_radius, // radius to be blanked around FPN offset center fpn_radius, // final double fpn_radius, // radius to be blanked around FPN offset center fpn_ignore_border, // final boolean fpn_ignore_border, // only if fpn_mask != null - ignore tile if maximum touches fpn_mask fpn_ignore_border, // final boolean fpn_ignore_border, // only if fpn_mask != null - ignore tile if maximum touches fpn_mask // motion_vectors, // final double [][][] motion_vectors, // [tilesY*tilesX][][] -> [][][num_sel_sensors+1][2] clt_parameters.imp.run_poly, // final boolean run_poly, // polynomial max, if false - centroid clt_parameters.imp.run_poly, // final boolean run_poly, // polynomial max, if false - centroid use_partial, // final boolean use_partial, // find motion vectors for individual pairs, false - for sum only use_partial, // final boolean use_partial, // find motion vectors for individual pairs, false - for sum only clt_parameters.imp.centroid_radius,// final double centroid_radius, // 0 - use all tile, >0 - cosine window around local max clt_parameters.imp.centroid_radius,// final double centroid_radius, // 0 - use all tile, >0 - cosine window around local max Loading @@ -4318,12 +4327,13 @@ public class Interscene { clt_parameters.imp.pd_weight, // final double pd_weight, // correlations (post) accumulated in PD clt_parameters.imp.pd_weight, // final double pd_weight, // correlations (post) accumulated in PD clt_parameters.imp.td_nopd_only, // final boolean td_nopd_only , // only use TD accumulated data if no safe PD is available for the tile. clt_parameters.imp.td_nopd_only, // final boolean td_nopd_only , // only use TD accumulated data if no safe PD is available for the tile. clt_parameters.imp.eig_use_neibs, // final boolean eig_use_neibs, // use correlation from 9 tiles with neibs, if single-tile fails clt_parameters.imp.eig_use_neibs, // final boolean eig_use_neibs, // use correlation from 9 tiles with neibs, if single-tile fails clt_parameters.imp.eig_min_weaks, // final int eig_min_weaks, // = 4; minimal weak neighbors for a weak tile (too few - no averaging) clt_parameters.imp.eig_min_strongs,// final int eig_min_strongs, // minimal strong neighbors for strong tiles clt_parameters.imp.eig_disp_diff, // final double eig_disp_diff, // maximal disparity difference from the closest (by disparity) neighbor clt_parameters.imp.eig_remove_neibs,//final boolean eig_remove_neibs, //remove weak (by-neibs) tiles if they have strong (by-single) neighbor clt_parameters.imp.eig_remove_neibs,//final boolean eig_remove_neibs, //remove weak (by-neibs) tiles if they have strong (by-single) neighbor clt_parameters.imp.eig_filt_other, // final boolean eig_filt_other, // apply other before-eigen filters clt_parameters.imp.eig_filt_other, // final boolean eig_filt_other, // apply other before-eigen filters // min_str, // final double min_str_nofpn, // = 0.25; eig_str_sum, // final double eig_str_sum_nofpn, // = 0.8; // 5; eig_str_sum, // final double eig_str_sum_nofpn, // = 0.8; // 5; eig_str_neib, // final double eig_str_neib_nofpn, eig_str_neib, // final double eig_str_neib_nofpn, // clt_parameters.imp.min_str_fpn, // final double min_str, // = 0.25; clt_parameters.imp.eig_str_sum_fpn,// final double eig_str_sum_fpn, // = 0.8; // 5; clt_parameters.imp.eig_str_sum_fpn,// final double eig_str_sum_fpn, // = 0.8; // 5; clt_parameters.imp.eig_str_neib_fpn,//final double eig_str_neib_fpn, clt_parameters.imp.eig_str_neib_fpn,//final double eig_str_neib_fpn, clt_parameters.imp.min_neibs, // final int min_neibs, // 2; // minimal number of strong neighbors (> min_str) clt_parameters.imp.min_neibs, // final int min_neibs, // 2; // minimal number of strong neighbors (> min_str) Loading @@ -4332,7 +4342,6 @@ public class Interscene { clt_parameters.imp.half_avg_diff, // final double half_avg_diff, // 0.2; // when L2 of x,y difference from average of neibs - reduce twice clt_parameters.imp.half_avg_diff, // final double half_avg_diff, // 0.2; // when L2 of x,y difference from average of neibs - reduce twice neibs_nofpn_only, // final boolean neibs_nofpn_only, // consolidate neighbors fot non-fpn tiles only! neibs_nofpn_only, // final boolean neibs_nofpn_only, // consolidate neighbors fot non-fpn tiles only! redo_both, // final boolean redo_both, // use average of neighbors for both pd,td if any of the center tile tests (td, pd) fails redo_both, // final boolean redo_both, // use average of neighbors for both pd,td if any of the center tile tests (td, pd) fails min_num_neibs, // final int min_num_neibs, // plus center, total number >= (min_num_neibs+1) scale_neibs_pd, // final double scale_neibs_pd, // scale threshold for the pixel-domain average maximums scale_neibs_pd, // final double scale_neibs_pd, // scale threshold for the pixel-domain average maximums scale_neibs_td, // final double scale_neibs_td, // scale threshold for the transform-domain average maximums scale_neibs_td, // final double scale_neibs_td, // scale threshold for the transform-domain average maximums scale_avg_weight, // final double scale_avg_weight, // reduce influence of the averaged correlations compared to the single-tile ones scale_avg_weight, // final double scale_avg_weight, // reduce influence of the averaged correlations compared to the single-tile ones Loading