Commit a12d2254 authored by Andrey Filippov's avatar Andrey Filippov

working snapshot

parent 971025da
...@@ -187,6 +187,10 @@ public class ErsCorrection extends GeometryCorrection { ...@@ -187,6 +187,10 @@ public class ErsCorrection extends GeometryCorrection {
DP_DVX, DP_DVY, DP_DVZ, DP_DVX, DP_DVY, DP_DVZ,
DP_DSVAZ, DP_DSVTL, DP_DSVRL, DP_DSVAZ, DP_DSVTL, DP_DSVRL,
DP_DSVX, DP_DSVY, DP_DSVZ}; DP_DSVX, DP_DSVY, DP_DSVZ};
public static final int [] DP_XYZR_INDICES = {DP_DSX,DP_DSY,DP_DSZ,DP_DSRL};
public static final int [] DP_AT_INDICES = {DP_DSAZ,DP_DSTL};
public static final int [] DP_ATT_ERS_INDICES = {DP_DSVAZ,DP_DSVTL};
public static final RotationConvention ROT_CONV = RotationConvention.FRAME_TRANSFORM; public static final RotationConvention ROT_CONV = RotationConvention.FRAME_TRANSFORM;
static final double THRESHOLD = 1E-10; static final double THRESHOLD = 1E-10;
static final double LINE_ERR = 0.001; // line accuracy for ERS when converting from world to pixels. static final double LINE_ERR = 0.001; // line accuracy for ERS when converting from world to pixels.
...@@ -223,8 +227,29 @@ public class ErsCorrection extends GeometryCorrection { ...@@ -223,8 +227,29 @@ public class ErsCorrection extends GeometryCorrection {
if (d > 0) return 1.0/ERS_MIN_DISPARITY; if (d > 0) return 1.0/ERS_MIN_DISPARITY;
return -1.0/ERS_MIN_DISPARITY; return -1.0/ERS_MIN_DISPARITY;
} }
public static final int [] DP_XYZR_INDICES = {DP_DSX,DP_DSY,DP_DSZ,DP_DSRL};
public static final int [] DP_AT_INDICES = {DP_DSAZ,DP_DSTL};
public static final int [] DP_ATT_ERS_INDICES = {DP_DSVAZ,DP_DSVTL};
*/ */
public static boolean [] getParamSelect(
boolean use_AT,
boolean use_ERS) {
boolean [] param_select = new boolean[DP_NUM_PARS];
for (int i:DP_XYZR_INDICES) param_select[i] = true;
if (use_AT) for (int i:DP_AT_INDICES) param_select[i] = true;
if (use_ERS) for (int i:DP_ATT_ERS_INDICES) param_select[i] = true;
return param_select;
}
public static double [] getParamRegWeights(
double reg_weight,
boolean use_AT) {
double [] reg_weights = new double[DP_NUM_PARS];
reg_weights[DP_DSX] = reg_weight;
reg_weights[DP_DSY] = reg_weight;
return reg_weights;
}
public void setPose( public void setPose(
double [] camera_xyz, double [] camera_xyz,
double [] camera_atr) { double [] camera_atr) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -4712,10 +4712,15 @@ public class OpticalFlow { ...@@ -4712,10 +4712,15 @@ public class OpticalFlow {
int test_ers0 = clt_parameters.imp.test_ers0; // try adjusting a pair of scenes with ERS. Reference scene index int test_ers0 = clt_parameters.imp.test_ers0; // try adjusting a pair of scenes with ERS. Reference scene index
int test_ers1 = clt_parameters.imp.test_ers1; // try adjusting a pair of scenes with ERS. Other scene index int test_ers1 = clt_parameters.imp.test_ers1; // try adjusting a pair of scenes with ERS. Other scene index
test_ers &= (test_ers0 >= 0) && (test_ers1 >= 0); test_ers &= (test_ers0 >= 0) && (test_ers1 >= 0);
boolean use_combo_relaible = clt_parameters.imp.use_combo_relaible; boolean use_combo_relaible = clt_parameters.imp.use_combo_reliable;
boolean ref_need_lma = clt_parameters.imp.ref_need_lma; boolean ref_need_lma = clt_parameters.imp.ref_need_lma;
boolean ref_need_lma_combo = clt_parameters.imp.ref_need_lma_combo; boolean ref_need_lma_combo = clt_parameters.imp.ref_need_lma_combo;
double min_ref_str = clt_parameters.imp.min_ref_str; double min_ref_str = clt_parameters.imp.min_ref_str;
boolean sfm_filter = clt_parameters.imp.sfm_filter; //true; // use SfM filtering if available
double sfm_minmax = clt_parameters.imp.sfm_minmax; //10.0; // minimal value of the SfM gain maximum to consider available
double sfm_fracmax = clt_parameters.imp.sfm_fracmax; // 0.75; // minimal fraction of the SfM maximal gain
double sfm_fracall = clt_parameters.imp.sfm_fracall; // 0.3; // minimal relative area of the SfM-enabled tiles (do not apply filter if less)
double min_ref_frac= clt_parameters.imp.min_ref_frac; double min_ref_frac= clt_parameters.imp.min_ref_frac;
double [] ref_blue_sky = null; // turn off "lma" in the ML output double [] ref_blue_sky = null; // turn off "lma" in the ML output
...@@ -5234,8 +5239,12 @@ public class OpticalFlow { ...@@ -5234,8 +5239,12 @@ public class OpticalFlow {
min_ref_frac, // double min_ref_frac, min_ref_frac, // double min_ref_frac,
ref_need_lma, // boolean needs_lma); ref_need_lma, // boolean needs_lma);
ref_need_lma_combo, // boolean needs_lma); ref_need_lma_combo, // boolean needs_lma);
reduced_strength); // if not null will return >0 if had to reduce strength (no change if did not reduce) sfm_filter, // boolean sfm_filter, // use SfM filtering if available
sfm_minmax, // double sfm_minmax, // minimal value of the SfM gain maximum to consider available
sfm_fracmax, // double sfm_fracmax,// minimal fraction of the SfM maximal gain
sfm_fracall, // double sfm_fracall,// minimal relative area of the SfM-enabled tiles (do not apply filter if less)
reduced_strength, // if not null will return >0 if had to reduce strength (no change if did not reduce)
debugLevel); // int debugLevel)
if (show_reliable_ref) { if (show_reliable_ref) {
double [] dbg_img = new double [reliable_ref.length]; double [] dbg_img = new double [reliable_ref.length];
for (int i = 0; i < dbg_img.length; i++) { for (int i = 0; i < dbg_img.length; i++) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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