// 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[cTile]!=null){
disparity_map[DISPARITY_INDEX_CM][tIndex]=-corr_stat[cTile][0];// disp_str[cTile][0]; // disparity is negative X
publicdoublelmas_poly_str_min=0.05;// ignore tiles with poly strength (scaled) below
publicdoublelmas_lambda_initial=0.03;//
publicdoublelmas_rms_diff=0.001;//
publicintlmas_num_iter=20;//
// Filtering and strength calculation
publicdoublelmas_max_rel_rms=0.2;// maximal relative (to average max/min amplitude LMA RMS) // May be up to 0.3)
publicdoublelmas_min_strength=1.0;// minimal composite strength (sqrt(average amp squared over absolute RMS)
publicdoublelmas_min_ac=0.03;// minimal of a and C coefficients maximum (measures sharpest point/line)
publicbooleanlma_gaussian=false;// model correlation maximum as a Gaussian (false - as a parabola)
publicbooleanlma_second=true;// re-run LMA after removing weak/failed tiles
publicbooleanlma_second_gaussian=true;// re-run after removing weal/failed in Gaussian mode
publicbooleanlma_second=false;// re-run LMA after removing weak/failed tiles
publicbooleanlma_second_gaussian=false;// re-run after removing weal/failed in Gaussian mode
publicbooleanlma_adjust_wm=true;// used in new for width
publicbooleanlma_adjust_wy=true;// false; // used in new for ellipse
publicbooleanlma_adjust_wxy=true;// used in new for lazy eye adjust parallel-to-disparity correction
...
...
@@ -117,12 +134,13 @@ public class ImageDttParameters {
publicdoublelma_sigma=0.7;// Blur correlation before finding maximum and convex region
// maybe try using sqrt (corr_wnd) ? or variable power?
publicdoublelma_half_width=2.0;//
publicdoublelma_cost_wy=0.003;// cost of parallel-to-disparity correction
publicdoublelma_cost_wxy=0.003;// cost of ortho-to-disparity correction
publicdoublelma_cost_wy=0.0;// cost of parallel-to-disparity correction
publicdoublelma_cost_wxy=0.0;// cost of ortho-to-disparity correction
publicdoublelma_lambda_initial=0.03;//
publicdoublelma_lambda_scale_good=0.5;//
...
...
@@ -139,8 +157,10 @@ public class ImageDttParameters {
publicdoublelma_str_offset=0.05;// convert lma-generated strength to match previous ones - add to result
// Lazy eye results interpretation
publicbooleanlma_diff_xy=true;// convert dd/nd to x,y
publicdoublelma_diff_minw=0.5;// minimal weight to keep
publicdoublelma_diff_sigma=1.0;// blur differential data (relative to the cluster linear size)
publicintlma_debug_level=0;//
publicintlma_debug_level1=0;//
...
...
@@ -290,6 +310,38 @@ public class ImageDttParameters {
"Transition range, shifted sine is used");
gd.addTab("Corr LMA","Parameters for LMA fitting of the correlation maximum parameters");
gd.addMessage("Single-tile (no lazy eye) only parameters (some are common");
gd.addCheckbox("Correlation maximum as gaussian",this.lmas_gaussian,
"Model correlation maximum as a Gaussian exp(-r^2) (false - as a parabola - 1-r^2)");
gd.addCheckbox("Fit correlation defined half-width",this.lmas_adjust_wm,
"Allow fitting of the half-width common for all pairs, defined by the LPF filter of the phase correlation");
gd.addCheckbox("Adjust ellipse parameters (was Fit extra vertical half-width)",this.lmas_adjust_wy,
"Adjust ellipse (non-circular) of the correlation maximum (was Fit extra perpendicular to disparity half-width (not used? and only possible with multi-baseline cameras))");