show_mode1,// final int show_mode, //+1 - disparity, +2 - correlations
show_mode1,// final int show_mode, //+1 - disparity, +2 - correlations
ranging_verify_use,// final double [][][] ranging_verify,
ranging_verify_use,// final double [][][] ranging_verify,
debugLevel);// final int debugLevel)
debugLevel);// final int debugLevel)
if(ranging_verify_use!=null){
}
}
}
return;
return;
}
}
...
@@ -556,11 +561,14 @@ public class CuasRanging {
...
@@ -556,11 +561,14 @@ public class CuasRanging {
sb.append("cuas_rng_um_sigma = "+clt_parameters.imp.cuas_rng_um_sigma+"\n");// unsharp mask sigma for ranging images
sb.append("cuas_rng_um_sigma = "+clt_parameters.imp.cuas_rng_um_sigma+"\n");// unsharp mask sigma for ranging images
sb.append("cuas_rng_um2 = "+clt_parameters.imp.cuas_rng_um2+"\n");// apply UM to images twice
sb.append("cuas_rng_um2 = "+clt_parameters.imp.cuas_rng_um2+"\n");// apply UM to images twice
sb.append("cuas_rng_um_weight = "+clt_parameters.imp.cuas_rng_um_weight+"\n");// unsharp mask weight for ranging images
sb.append("cuas_rng_um_weight = "+clt_parameters.imp.cuas_rng_um_weight+"\n");// unsharp mask weight for ranging images
sb.append("cuas_rng_coswnd = "+clt_parameters.imp.cuas_rng_coswnd+"\n");// Use cosine scenes window (false - rectangular)
sb.append("cuas_rng_combine = "+clt_parameters.imp.cuas_rng_combine+"\n");// combine multiple scenes before intrascene correlation
sb.append("cuas_rng_radius0 = "+clt_parameters.imp.cuas_rng_radius0+"\n");// mask out data outside peripheral areas, keep 0.5 at the radius - first iteration
sb.append("cuas_rng_radius0 = "+clt_parameters.imp.cuas_rng_radius0+"\n");// mask out data outside peripheral areas, keep 0.5 at the radius - first iteration
sb.append("cuas_rng_radius = "+clt_parameters.imp.cuas_rng_radius+"\n");// mask out data outside peripheral areas, keep 0.5 at the radius - next iteration
sb.append("cuas_rng_radius = "+clt_parameters.imp.cuas_rng_radius+"\n");// mask out data outside peripheral areas, keep 0.5 at the radius - next iteration
sb.append("cuas_rng_blur = "+clt_parameters.imp.cuas_rng_blur+"\n");// relative transition radius range (for 0.5 the mask inside (1-0.5) radius will be 1.0, outside (1+0.5) radius will be 0
sb.append("cuas_rng_blur = "+clt_parameters.imp.cuas_rng_blur+"\n");// relative transition radius range (for 0.5 the mask inside (1-0.5) radius will be 1.0, outside (1+0.5) radius will be 0
sb.append("cuas_rng_fz = "+clt_parameters.imp.cuas_rng_fz+"\n");// Fat zero in target ranging mode
sb.append("cuas_rng_fz = "+clt_parameters.imp.cuas_rng_fz+"\n");// Fat zero in target ranging mode
sb.append("cuas_rng_scale = "+clt_parameters.imp.cuas_rng_scale+"\n");// Scale alt_data to use same strength as for normal ranging because targets
sb.append("cuas_rng_scale = "+clt_parameters.imp.cuas_rng_scale+"\n");// Scale alt_data to use same strength as for normal ranging because targets
sb.append("cuas_lma_bypass = "+clt_parameters.imp.cuas_lma_bypass+"\n");// Bypass solution tests, OK weak
sb.append("cuas_mcorr_sel = "+clt_parameters.imp.cuas_mcorr_sel+"\n");// all pairs and diagonals (as was for non-cuas ranging)
sb.append("cuas_mcorr_sel = "+clt_parameters.imp.cuas_mcorr_sel+"\n");// all pairs and diagonals (as was for non-cuas ranging)
sb.append("cuas_mcorr_sel_lma = "+clt_parameters.imp.cuas_mcorr_sel_lma+"\n");// all pairs (will use all selected by cuas_mcorr_sel)
sb.append("cuas_mcorr_sel_lma = "+clt_parameters.imp.cuas_mcorr_sel_lma+"\n");// all pairs (will use all selected by cuas_mcorr_sel)
sb.append("cuas_max_rel_rms = "+clt_parameters.imp.cuas_max_rel_rms+"\n");// maximal relative (to average max/min amplitude LMA RMS) // May be up to 0.3)
sb.append("cuas_max_rel_rms = "+clt_parameters.imp.cuas_max_rel_rms+"\n");// maximal relative (to average max/min amplitude LMA RMS) // May be up to 0.3)
...
@@ -570,7 +578,11 @@ public class CuasRanging {
...
@@ -570,7 +578,11 @@ public class CuasRanging {
sb.append("cuas_min_min_ac = "+clt_parameters.imp.cuas_min_min_ac+"\n");// LWIR16: 0.007 minimal of a and C coefficients minimum (measures sharpest point)
sb.append("cuas_min_min_ac = "+clt_parameters.imp.cuas_min_min_ac+"\n");// LWIR16: 0.007 minimal of a and C coefficients minimum (measures sharpest point)
sb.append("cuas_reset_disparity = "+clt_parameters.imp.cuas_reset_disparity+"\n");// reset target disparities from infinity
sb.append("cuas_reset_disparity = "+clt_parameters.imp.cuas_reset_disparity+"\n");// reset target disparities from infinity
sb.append("cuas_infinity = "+clt_parameters.imp.cuas_infinity+"\n");// disparity at infinity for targets
sb.append("cuas_infinity = "+clt_parameters.imp.cuas_infinity+"\n");// disparity at infinity for targets
// correlate only after the last in group, others - just accumulate in TD
image_dtt.quadCorrTD(
if(last_in_grp){
imgdtt_params,// clt_parameters.img_dtt, // final ImageDttParameters imgdtt_params, // Now just extra correlation parameters, later will include, most others
gpu_sigma_rb_corr,// final double gpu_sigma_rb_corr, // = 0.5; // apply LPF after accumulating R and B correlation before G, monochrome ? 1.0 : gpu_sigma_rb_corr;
}
gpu_sigma_corr,// = 0.9;gpu_sigma_corr_m
}
gpu_sigma_log_corr,// final double gpu_sigma_log_corr, // hpf to reduce dynamic range for correlations
mcorr_sel,// final int mcorr_sel, // Which pairs to correlate // +1 - all, +2 - dia, +4 - sq, +8 - neibs, +16 - hor + 32 - vert
imgdtt_params,// clt_parameters.img_dtt, // final ImageDttParameters imgdtt_params, // Now just extra correlation parameters, later will include, most others
ImageDtt.THREADS_MAX,// maximal number of threads to launch
tp_tasks[0],// *** will be updated inside from GPU-calculated geometry
gpu_sigma_rb_corr,// final double gpu_sigma_rb_corr, // = 0.5; // apply LPF after accumulating R and B correlation before G, monochrome ? 1.0 : gpu_sigma_rb_corr;
window_full[iscene]*(2*half_accum_range+1),// final double weight, // keep same sum as before
gpu_sigma_corr,// = 0.9;gpu_sigma_corr_m
accum_weights,// final int [][][] num_acc, // number of accumulated tiles [tilesY][tilesX][pair]
gpu_sigma_log_corr,// final double gpu_sigma_log_corr, // hpf to reduce dynamic range for correlations
fcorr_td,// final float [][][][] fcorr_td, // [tilesY][tilesX][pair][256] sparse transform domain representation of corr pairs
clt_parameters.corr_red,// +used
fcorr_td_acc);// final float [][][][] fcorr_td_acc // [tilesY][tilesX][pair][256] sparse transform domain representation of corr pairs
clt_parameters.corr_blue,// +used
if(image_dtt.getGPU().getGpu_debug_level()>-1){
mcorr_sel,// final int mcorr_sel, // Which pairs to correlate // +1 - all, +2 - dia, +4 - sq, +8 - neibs, +16 - hor + 32 - vert
imgdtt_params.lmas_num_iter,// int num_iter, // 20
debug_level);// imgdtt_params.lma_debug_level1); // 4); // int debug_level) // > 3
if(!lmaSuccess){
if(debug_level>-3){
System.out.println("Still did not help - LMA failed.");
}
}
}
}
}
if(lmaSuccess){
if(lmaSuccess){
lma.updateFromVector();
lma.updateFromVector();
double[][][]dispStrs=lma.lmaDisparityStrengths(//TODO: add parameter to filter out negative minimums ?
double[][][]dispStrs=lma.lmaDisparityStrengths(//TODO: add parameter to filter out negative minimums ?
imgdtt_params.lmamask_dbg,// false, // boolean bypass_tests, // keep even weak for later analysis. Normally - only in test mode
imgdtt_params.lmamask_bypass||imgdtt_params.lmamask_dbg,// false, // boolean bypass_tests, // keep even weak for later analysis. Normally - only in test mode
imgdtt_params.lmas_min_amp,// minimal ratio of minimal pair correlation amplitude to maximal pair correlation amplitude
imgdtt_params.lmas_min_amp,// minimal ratio of minimal pair correlation amplitude to maximal pair correlation amplitude
imgdtt_params.lmas_min_amp_bg,// minimal ratio of minimal pair correlation amplitude to maximal pair correlation amplitude
imgdtt_params.lmas_min_amp_bg,// minimal ratio of minimal pair correlation amplitude to maximal pair correlation amplitude
imgdtt_params.lmas_max_rel_rms,// maximal relative (to average max/min amplitude LMA RMS) // May be up to 0.3)
imgdtt_params.lmas_max_rel_rms,// maximal relative (to average max/min amplitude LMA RMS) // May be up to 0.3)
@@ -3506,7 +3506,7 @@ public class ImageDtt extends ImageDttCPU {
...
@@ -3506,7 +3506,7 @@ public class ImageDtt extends ImageDttCPU {
lma_rms=lma_dual.getRmsTile()[0];
lma_rms=lma_dual.getRmsTile()[0];
booleandbg_dispStrs=(debug_lma!=null);
booleandbg_dispStrs=(debug_lma!=null);
double[][][]dispStrs=lma_dual.lmaDisparityStrengths(//TODO: add parameter to filter out negative minimums ?
double[][][]dispStrs=lma_dual.lmaDisparityStrengths(//TODO: add parameter to filter out negative minimums ?
dbg_dispStrs,// false, // boolean bypass_tests, // keep even weak for later analysis. Normally - only in test mode
imgdtt_params.lmamask_bypass||dbg_dispStrs||debug_print_targets,// false, // boolean bypass_tests, // keep even weak for later analysis. Normally - only in test mode
imgdtt_params.lmas_min_amp,// minimal ratio of minimal pair correlation amplitude to maximal pair correlation amplitude
imgdtt_params.lmas_min_amp,// minimal ratio of minimal pair correlation amplitude to maximal pair correlation amplitude
imgdtt_params.lmas_min_amp_bg,// minimal ratio of minimal pair correlation amplitude to maximal pair correlation amplitude
imgdtt_params.lmas_min_amp_bg,// minimal ratio of minimal pair correlation amplitude to maximal pair correlation amplitude
imgdtt_params.lmas_max_rel_rms,// maximal relative (to average max/min amplitude LMA RMS) // May be up to 0.3)
imgdtt_params.lmas_max_rel_rms,// maximal relative (to average max/min amplitude LMA RMS) // May be up to 0.3)
...
@@ -3516,7 +3516,7 @@ public class ImageDtt extends ImageDttCPU {
...
@@ -3516,7 +3516,7 @@ public class ImageDtt extends ImageDttCPU {
publicbooleancuas_smooth_omegas=true;// Recalculate omegas from continuing targets positions
publicbooleancuas_smooth_omegas=true;// Recalculate omegas from continuing targets positions
publicbooleancuas_rng_um=true;// apply UM to images for ranging (assumed true)
publicbooleancuas_rng_um=true;// apply UM to images for ranging (assumed true)
publicbooleancuas_rng_um_all=false;// Unsharp mask all images (after FPN and Row/Col), unchecked - when needed. Checked faster, but original data is lost.
publicbooleancuas_rng_um_all=false;// Unsharp mask all images (after FPN and Row/Col), unchecked - when needed. Checked faster, but original data is lost.
publicdoublecuas_rng_um_sigma=2;// unsharp mask sigma for ranging images
publicdoublecuas_rng_um_sigma=2;// unsharp mask sigma for ranging images
publicbooleancuas_rng_um2=false;// apply UM to images twice
publicbooleancuas_rng_um2=false;// apply UM to images twice
publicdoublecuas_rng_um_weight=1.0;// unsharp mask weight for ranging images
publicdoublecuas_rng_um_weight=1.0;// unsharp mask weight for ranging images
publicbooleancuas_rng_coswnd=true;// Use cosine scenes window (false - rectangular)
publicintcuas_rng_combine=8;// combine multiple scenes before intrascene correlation
publicintcuas_rng_combine=8;// combine multiple scenes before intrascene correlation
publicdoublecuas_rng_radius0=3.5;// mask out data outside peripheral areas, keep 0.5 at the radius - first iteration
publicdoublecuas_rng_radius0=3.5;// mask out data outside peripheral areas, keep 0.5 at the radius - first iteration
publicdoublecuas_rng_radius=2.0;// mask out data outside peripheral areas, keep 0.5 at the radius - next iteration
publicdoublecuas_rng_radius=2.0;// mask out data outside peripheral areas, keep 0.5 at the radius - next iteration
publicdoublecuas_rng_blur=0.5;// relative transition radius range (for 0.5 the mask inside (1-0.5) radius will be 1.0, outside (1+0.5) radius will be 0
publicdoublecuas_rng_blur=0.5;// relative transition radius range (for 0.5 the mask inside (1-0.5) radius will be 1.0, outside (1+0.5) radius will be 0
publicdoublecuas_rng_fz=1000.0;// Fat zero in target ranging mode
publicdoublecuas_rng_fz=1000.0;// Fat zero in target ranging mode
publicdoublecuas_rng_scale=8.0;// Scale alt_data to use same strength as for normal ranging because targets
publicdoublecuas_rng_scale=8.0;// Scale alt_data to use same strength as for normal ranging because targets
// will overwrite ImageDttParameters
// will overwrite ImageDttParameters
publicbooleancuas_dual_pass=true;// First pass - do not adjust disparity
publicbooleancuas_disp_only2=true;// Disparity only on second pass (keep scales and shape - some CUAS where failing on second pass)
publicbooleancuas_lma_bypass=false;// Bypass solution tests, OK weak
publicintcuas_mcorr_sel=3;// all pairs and diagonals (as was for non-cuas ranging)
publicintcuas_mcorr_sel=3;// all pairs and diagonals (as was for non-cuas ranging)
publicintcuas_mcorr_sel_lma=1;// all pairs (will use all selected by cuas_mcorr_sel)
publicintcuas_mcorr_sel_lma=1;// all pairs (will use all selected by cuas_mcorr_sel)
...
@@ -2613,10 +2617,12 @@ min_str_neib_fpn 0.35
...
@@ -2613,10 +2617,12 @@ min_str_neib_fpn 0.35
"Unsharp mask all images (after FPN and Row/Col), unchecked - when needed. Checked faster, but original data is lost.");
"Unsharp mask all images (after FPN and Row/Col), unchecked - when needed. Checked faster, but original data is lost.");