Commit c2c4ce6e authored by Andrey Filippov's avatar Andrey Filippov
Browse files

Tweaking fine adjustment

parent 24b642b0
Loading
Loading
Loading
Loading
+43 −63
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ public class AlignmentCorrection {
	static final int    INDEX_10_WEIGHT = 1;
	static final int    INDEX_10_DISPARITY = 0;
	static final int    INDEX_14_DISPARITY = 0;
	static final double DISP_SCALE = 2.0;

	QuadCLT qc;

@@ -144,7 +145,7 @@ public class AlignmentCorrection {
					0.5*(offsets[1][0] - offsets[0][0]), //(dx1 - dx0)/2; 0.5/magic is already applied
					0.5*(offsets[3][1] - offsets[2][1]), //(dy3 - dy2)/2;
					0.25* (offsets[0][0] + offsets[1][0] - offsets[2][1] - offsets[3][1]), //(dx0 + dx1 -dy2 - dy3)/4;
					use_disparity ? (0.125* (offsets[0][0] + offsets[1][0] + offsets[2][1] + offsets[3][1])) : 0.0 // only when disparity is known to be 0
					use_disparity ? (DISP_SCALE* 0.125* (offsets[0][0] + offsets[1][0] + offsets[2][1] + offsets[3][1])) : 0.0 // only when disparity is known to be 0
			};
			return y;
		}
@@ -216,7 +217,7 @@ public class AlignmentCorrection {
					{ 0.25,    0.0 ,  -0.25,   0.0 ,  -0.25,   0.0 ,   0.25,   0.0   }, // mv4 = (dx1 - dx0)/2 = (x3 - x2 + x0 - x1) / 2
					{ 0.0 ,    0.25,   0.0 ,  -0.25,   0.0 ,  -0.25,   0.0 ,   0.25  }, // mv5 = (dy3 - dy2)/2 = (y3 - y1 + y0 - y2) / 2
					{-0.125,   0.125,  0.125,  0.125, -0.125, -0.125,  0.125, -0.125 }, // mv6 = (dx0 + dx1 -dy2 - dy3)/4 = (x1 - x0 + x3 - x2 - y2 + y0 - y3 + y1)/4
					{-0.0625, -0.0625, 0.0625,-0.0625,-0.0625, 0.0625, 0.0625, 0.0625}};// mv7 = (dx0 + dx1 +dy2 + dy3)/8=  (x1 - x0 + x3 - x2 + y2 - y0 + y3 - y1)/8
					{-0.0625*DISP_SCALE, -0.0625*DISP_SCALE, 0.0625*DISP_SCALE,-0.0625*DISP_SCALE,-0.0625*DISP_SCALE, 0.0625*DISP_SCALE, 0.0625*DISP_SCALE, 0.0625*DISP_SCALE}};// mv7 = (dx0 + dx1 +dy2 + dy3)/8=  (x1 - x0 + x3 - x2 + y2 - y0 + y3 - y1)/8
			return dMismatch_dXY;
		}

@@ -397,7 +398,8 @@ public class AlignmentCorrection {
				use_poly,                       // final boolean use_poly,
				clt_parameters.fcorr_inf_quad,  // final boolean use_quadratic,
				clt_parameters.fcorr_inf_vert,  // final boolean use_vertical,
				clt_parameters.ly_inf_en,       // final boolean use_disparity, // for infinity - if true, restores differences in the direction of disparity that was subtracted during measurement)
				// now disaprity is already restored
				false, //clt_parameters.ly_inf_en,       // final boolean use_disparity, // for infinity - if true, restores differences in the direction of disparity that was subtracted during measurement)
				// For ly_inf_en need to make sure that programmed disparity was 0.0, so
				clt_parameters.ly_inf_disp,     //final boolean allow_dispatity,
				clt_parameters,
@@ -913,7 +915,7 @@ public class AlignmentCorrection {
		double [][] dbg_xy = null;
		if (clt_parameters.show_extrinsic && (debugLevel > -2)) { // TODO: Add clt_parameters
//			dbg_xy = new double [9][num_tiles];
			dbg_xy = new double [10][num_tiles];
			dbg_xy = new double [18][num_tiles];
		}
		for (Sample s: samples_list){
			int tileX = s.tile % tilesX;
@@ -1045,6 +1047,10 @@ B = |+dy0 -dy1 -2*dy3 |
				}
				dbg_xy[9][s.tile] += s.weight*(-xy[0]-xy[1]+xy[2]-xy[3]-xy[4]+xy[5]+xy[6]+xy[7])/8;
				dbg_xy[8][s.tile] += s.weight;
				for (int i = 0; i < dxy.length;i++) {
					dbg_xy[2* i +10][s.tile] += dxy[i][0] * s.weight;
					dbg_xy[2* i +11][s.tile] += dxy[i][1] * s.weight;
				}
			}


@@ -1093,18 +1099,17 @@ B = |+dy0 -dy1 -2*dy3 |
		if (dbg_xy != null){
			for (int nTile = 0; nTile < num_tiles; nTile++){
				if (dbg_xy[8][nTile] > 0.0){
					for (int i = 0; i< 8; i++) {
					for (int i = 0; i < dbg_xy.length; i++) if (i != 8){
						dbg_xy[i][nTile] /= dbg_xy[8][nTile];
					}
					dbg_xy[9][nTile] /= dbg_xy[8][nTile];
				} else {
					for (int i = 0; i< 8; i++) {
					for (int i = 0; i < dbg_xy.length; i++) if (i != 8){
						dbg_xy[i][nTile] = Double.NaN;
						dbg_xy[9][nTile] = Double.NaN;
					}
				}
			}
			String [] titles = {"x0", "y0", "x1", "y1", "x2", "y2", "x3","y3","weight","~disp"};
			String [] titles = {"x0", "y0", "x1", "y1", "x2", "y2", "x3","y3","weight","~disp","dx0","dy0","dx1","dy1","dx2","dy2","dx3","dy3"};
			(new showDoubleFloatArrays()).showArrays(
					dbg_xy,
					tilesX,
@@ -1730,44 +1735,6 @@ B = |+dy0 -dy1 -2*dy3 |
		return scans;
	}

	public double [][][] lazyEyeCorrectionStep(
			final boolean    use_poly, // Use polynomial correction, false - correct tilt/azimuth/roll of each sensor
			final double     fcorr_radius,
			final double     min_strength_in,
			final double     max_diff,
			//				final double comp_strength_var,
			final int        max_iterations,
			final double     max_coeff_diff,
			final double     far_pull, //  = 0.2; // 1; //  0.5;
			final double     strength_pow,
			final double     lazyEyeCompDiff, // clt_parameters.fcorr_disp_diff
			final int        lazyEyeSmplSide, //        = 2;      // Sample size (side of a square)
			final int        lazyEyeSmplNum, //         = 3;      // Number after removing worst (should be >1)
			final double     lazyEyeSmplRms, //         = 0.1;    // Maximal RMS of the remaining tiles in a sample
			final double     lazyEyeDispVariation, // maximal full disparity difference between tgh tile and 8 neighborxs
			final int        smplSide, //        = 2;      // Sample size (side of a square)
			final int        smplNum, //         = 3;      // Number after removing worst (should be >1)
			final double     smplRms, //         = 0.1;    // Maximal RMS of the remaining tiles in a sample
			// histogram parameters
			final int        hist_smpl_side, // 8 x8 masked, 16x16 sampled
			final double     hist_disp_min,
			final double     hist_disp_step,
			final int        hist_num_bins,
			final double     hist_sigma,
			final double     hist_max_diff,
			final int        hist_min_samples,
			final boolean    hist_norm_center, // if there are more tiles that fit than min_samples, replace with
			final double     inf_fraction,    // fraction of the weight for the infinity tiles
			EyesisCorrectionParameters.CLTParameters           clt_parameters,
			double [][]      scans_14,
			int              tilesX,
			double           magic_coeff, // still not understood coefficient that reduces reported disparity value.  Seems to be around 8.5
			int debugLevel)
		{
			return null;
		}


	public double [][][] lazyEyeCorrection(
			final boolean    use_poly, // Use polynomial correction, false - correct tilt/azimuth/roll of each sensor
			final boolean    restore_disp_inf, // Restore subtracted disparity for scan #0 (infinity)
@@ -1842,7 +1809,7 @@ B = |+dy0 -dy1 -2*dy3 |
		}

		// Add disparity to dx0, dx1, dy2, dy3 pairs
		if (restore_disp_inf) {
		if (  restore_disp_inf) { // ==clt_parameters.inf_restore_disp
			for (int nTile = 0; nTile < num_tiles; nTile++) if (scans[INDEX_10_WEIGHT][nTile] > 0){
				for (int i = 0; i < INDICES_10_DISP.length; i++) {
					scans[INDICES_10_DISP[i]][nTile] += scans[INDEX_10_DISPARITY][nTile];
@@ -2106,8 +2073,8 @@ B = |+dy0 -dy1 -2*dy3 |
		}

//	static final int    INDEX_10_WEIGHT = 1;

		if (debugLevel > -1) { // 0) {
		System.out.println("test123");
		if ((debugLevel > -1) && (hist_smpl_side > 0)) { // 0) {
			String [] prefixes = {"disparity", "strength", "dx0", "dy0", "dx1", "dy1", "dx2", "dy2", "dx3", "dy3"};
			String [] titles = new String [2 * NUM_SLICES];
			for (int i = 0; i < NUM_SLICES; i++){
@@ -2158,11 +2125,12 @@ B = |+dy0 -dy1 -2*dy3 |
			}
			(new showDoubleFloatArrays()).showArrays(dbg_img, tilesX1, tilesY1, true, "inf_and_ly8",titles);
		}

System.out.println("test1234");
		// create list for infinity data
//		/clt_parameters.ly_inf_en,
		ArrayList<Sample> inf_samples_list;
		if (clt_parameters.ly_inf_en) {
//		if (clt_parameters.ly_inf_en) {
		if (true) { //clt_parameters.ly_inf_en) {
			inf_samples_list = selectInfinityTiles(
					clt_parameters.fcorr_radius,       // 	final double fcorr_radius,
					clt_parameters.fcorr_inf_vert,// final boolean use_vertical,
@@ -2211,8 +2179,8 @@ B = |+dy0 -dy1 -2*dy3 |
			for (Sample s: inf_samples_list) {
				s.weight *= weights[0];
			}
		} else {
			inf_samples_list = new ArrayList<Sample>(); // do not use infinity at all
//		} else {
//			inf_samples_list = new ArrayList<Sample>(); // do not use infinity at all
		}
		///-----

@@ -2291,18 +2259,22 @@ B = |+dy0 -dy1 -2*dy3 |
		if (!use_poly && (mismatch_list != null)){
			double [] old_new_rms = new double[1];
			boolean apply_extrinsic = true;
			int solveCorr_debug =  ((clt_parameters.lym_iter == 1) && (clt_parameters.ly_par_sel != 0))? 2 : debugLevel;
			GeometryCorrection.CorrVector corr_vector = solveCorr (
					clt_parameters.ly_inf_en,      // boolean use_disparity,     // if true will ignore disparity data even if available (was false)
					clt_parameters.ly_combo_en,    // boolean use_other_extr,    // adjust other extrinsic parameters that do not influence disparity, common roll and zoom
//					clt_parameters.ly_combo_en,    // boolean use_other_extr,    // adjust other extrinsic parameters that do not influence disparity, common roll and zoom
					clt_parameters.ly_aztilt_en,// boolean use_aztilts,       // Adjust azimuths and tilts excluding disparity
					clt_parameters.ly_diff_roll_en,// boolean use_diff_rolls,    // Adjust differential rolls (3 of 4 angles)
					clt_parameters.ly_inf_force,   // boolean force_convergence, // if true try to adjust convergence (disparity, symmetrical parameter 0) even with no disparity
					clt_parameters.ly_com_roll,    // boolean    common_roll,    // Enable common roll (valid for high disparity range only)
					clt_parameters.ly_focalLength, // boolean    corr_focalLength,     // Correct scales (focal length temperature? variations)
					clt_parameters.ly_par_sel,     //int     manual_par_sel,    // Manually select the parameter mask bit 0 - sym0, bit1 - sym1, ... (0 - use boolean flags, != 0 - ignore boolean flags)
					mismatch_list,                          // ArrayList<Mismatch> mismatch_list,
					qc.geometryCorrection,                  // GeometryCorrection geometryCorrection,
					qc.geometryCorrection.getCorrVector(),  // GeometryCorrection.CorrVector corr_vector,
					old_new_rms,                            // double [] old_new_rms, // should be double[2]
//					2); // debugLevel); // 2); // 1); // int debugLevel)
			debugLevel); // 2); // 1); // int debugLevel)
					solveCorr_debug); // debugLevel); // 2); // 1); // int debugLevel)
//TODO: ** Put 2 here to debug derivative images (diff_dmv_dsym - does not match yet, probably different "addition" of angles)

			if (debugLevel > -1){
@@ -2487,7 +2459,7 @@ B = |+dy0 -dy1 -2*dy3 |
				double [] dbg_a_vector= null;
				geometryCorrection.getPortsCoordinatesAndDerivatives(
						dbg_a_vector, // double [] dbg_a_vector, // replace actual radial distortion coefficients
						1E-8, //6,    // double delta, // 1e-6
						1E-9, // 1E-8, //6,    // double delta, // 1e-6
						corr_vector, // CorrVector corr_vector,
						deriv_dbg, // j_partial_debug, //
						pXY[0],      // double px,
@@ -2812,11 +2784,14 @@ B = |+dy0 -dy1 -2*dy3 |

	public GeometryCorrection.CorrVector  solveCorr (
			boolean use_disparity,     // adjust disparity-related extrinsics
			boolean use_other_extr,    // adjust other extrinsic parameters that do not influence disparity, common roll and zoom
//			boolean use_other_extr,    // adjust other extrinsic parameters that do not influence disparity, common roll and zoom
			boolean use_aztilts,       // Adjust azimuths and tilts excluding disparity
			boolean use_diff_rolls,    // Adjust differential rolls (3 of 4 angles)
			boolean force_convergence, // if true try to adjust convergence (disparity, symmetrical parameter 0) even with no disparity
			                           // data, using just radial distortions
	  		boolean common_roll,       // Enable common roll (valid for high disparity range only)
			boolean corr_focalLength,  // Correct scales (focal length temperature? variations)
	  		int     manual_par_sel,    // Manually select the parameter mask bit 0 - sym0, bit1 - sym1, ... (0 - use boolean flags, != 0 - ignore boolean flags)


			ArrayList<Mismatch> mismatch_list,
@@ -2825,6 +2800,7 @@ B = |+dy0 -dy1 -2*dy3 |
			double [] old_new_rms, // should be double[2]
			int debugLevel)
	{
		boolean dbg_images = debugLevel > 0; // 1;
		boolean has_disparity = force_convergence; // force false;
		// See if at least some data has disparities to be adjusted
		if (use_disparity) {
@@ -2839,9 +2815,14 @@ B = |+dy0 -dy1 -2*dy3 |
//				force_convergence, // boolean disparity_only,
//				force_convergence && has_disparity, // boolean use_disparity,
				has_disparity, // boolean use_disparity,
				use_other_extr,    // boolean use_other_extr,
//				use_other_extr,    // boolean use_other_extr,
				use_aztilts,       // Adjust azimuths and tilts excluding disparity
				use_diff_rolls,    // Adjust differential rolls (3 of 4 angles)

				common_roll,// boolean common_roll,
				corr_focalLength); // boolean corr_focalLength);
				corr_focalLength, // boolean corr_focalLength);
		  		manual_par_sel);    // Manually select the parameter mask bit 0 - sym0, bit1 - sym1, ... (0 - use boolean flags, != 0 - ignore boolean flags)


		double [][] jta = getJacobianTransposed( // gets transposed jacobian for 8*num_tiles points (port coordinates) and symmetrical parameters
				par_mask,           // boolean [] par_mask,
@@ -2878,7 +2859,6 @@ B = |+dy0 -dy1 -2*dy3 |
		Matrix y_minus_fx_weighted = new Matrix(y_minus_fx_a_weighted, y_minus_fx_a_weighted.length);
		double [][] jtja = getJTJ(jta_mv, weights);
		Matrix jtj = new Matrix(jtja); // getJTJ(jta, weights)); // less operations than jt.times(jt.transpose());
		boolean dbg_images = debugLevel>1;
		int dbg_decimate = 64; // just for the debug image
		int dbg_width =  qc.tp.getTilesX()*qc.tp.getTileSize();
		int dbg_height = qc.tp.getTilesY()*qc.tp.getTileSize();
@@ -2886,7 +2866,7 @@ B = |+dy0 -dy1 -2*dy3 |
		int dbg_oheight = dbg_height/dbg_decimate;
		int dbg_length = dbg_owidth*dbg_oheight;
		String [] dbg_titles_sym= {"sym0","sym1","sym2","sym3","sym4","sym5","sroll0","sroll1","sroll2","sroll3", "zoom0", "zoom1", "zoom2"};
		String [] dbg_titles_xy=  {"x0","y0","x1","y1","x2","y2","x3","y3"};
		String [] dbg_titles_xy=  {"dx0","dy0","dx1","dy1","dx2","dy2","dx3","y3"};
		String [] dbg_titles_mv=  {"dy0","dy1","dx2","dx3","dx1-dx0","dy3-dy2","dh-dv","dh+dv"};
		double [][] dbg_xy = null;  // jacobian dmv/dsym
		double [][] dbg_mv = null;  // jacobian dmv/dsym
+6 −3
Original line number Diff line number Diff line
@@ -1081,6 +1081,9 @@ public class Correlation2d {
    	for (int pair = 0; pair <  corrs.length; pair++)  if ((corrs[pair] != null) && (((1 << pair) & pair_mask) != 0)) {
//    	for (int np = 0; np < num_pairs; np++) {
    		int this_mask = 1 << pair;
    		if (debug_level > -1) {
    			System.out.println(String.format("mismatchPairs(), np = %d pairs mask = 0x%x", np, this_mask));
    		}
    		Correlations2dLMA lma=corrLMA(
    				imgdtt_params, // ImageDttParameters  imgdtt_params,
    				corrs,         // double [][]         corrs,
@@ -1089,7 +1092,7 @@ public class Correlation2d {
    				xcenter,       // double              xcenter,   // preliminary center x in pixels for largest baseline
    				vasw_pwr,      // double              vasw_pwr,  // value as weight to this power,
//    				debug_level-3, // int                 debug_level,
    				debug_level-1, // int                 debug_level,
    				debug_level, // -1, // int                 debug_level,
    				tileX,         // int                 tileX, // just for debug output
    				tileY);        //int                 tileY
    		if ((lma == null) || (lma.getPoly() == null)) {
@@ -1238,7 +1241,7 @@ public class Correlation2d {
    	boolean are_ortho = (imn ^ imx) == 1;
		double corr = overcorrection * (mx - mn);

		int isel =   bg ? imn : imx;
		int isel =   bg ? imn : imx; // isel may be -1 !!!
		int iother = bg ? imx : imn;
		int iortho = isel ^ 1;

@@ -1249,7 +1252,7 @@ public class Correlation2d {
    		System.out.println(String.format("eff_strength = [%8.5f, %8.5f, %8.5f, %8.5f]", eff_strength[0], eff_strength[1], eff_strength[2], eff_strength[3]));
    		System.out.println(String.format("width_d =      [%8.5f, %8.5f, %8.5f, %8.5f]", width_d[0],      width_d[1],      width_d[2],      width_d[3]));
    	}
		if (!strong[isel]) {
		if (!strong[isel] || (isel <0)) {
			corr = Double.NaN;
			if (debug) System.out.println("Direction with "+(bg?"min":"max")+" disparity is not strong enough -> no correction");
		} else 		if (width_d[isel] > max_hwidth) {
+22 −1
Original line number Diff line number Diff line
@@ -643,9 +643,11 @@ public class Correlations2dLMA {

// modify to reuse Samples and apply polynomial approximation to resolve x0,y0 and strength?
	public double [] getMaxXYPoly( // get interpolated maximum coordinates using 2-nd degree polynomial
///			double  outside, // how much solution may be outside of the samples
			boolean debug
     ) {
		double [][][] mdata = new double[samples.size()][3][];
///		double min_x = Double.NaN, max_x = Double.NaN, min_y = Double.NaN, max_y =Double.NaN , min_v = Double.NaN;
		for (int i = 0; i < mdata.length; i++) {
			Sample s = samples.get(i);
			mdata[i][0] = new double [2];
@@ -655,6 +657,21 @@ public class Correlations2dLMA {
			mdata[i][1][0] =  s.v;
			mdata[i][2] = new double [1];
			mdata[i][2][0] =  s.w;
			/*
			if (i == 0) {
				min_x = s.x;
				max_x = min_x;
				min_y = s.y;
				max_y = min_y;
				min_v = s.v;
			} else {
				if      (s.x > max_x) max_x = s.x;
				else if (s.x < min_x) min_x = s.x;
				if      (s.y > max_y) max_y = s.y;
				else if (s.y < min_y) min_y = s.y;
				if      (s.v < min_v) min_v = s.x;
			}
			*/
		}
		double [] rslt = (new PolynomialApproximation()).quadraticMaxV2dX2Y2XY( // 9 elements - Xc, Yx, f(x,y), A, B, C, D, E, F (from A*x^2 + B*y^2 +C*x*y+...)
				mdata,
@@ -662,11 +679,15 @@ public class Correlations2dLMA {
				debug? 4:0);
		this.poly_coeff = rslt;

		if (rslt == null) {
		if ((rslt == null) || (rslt[2] < 0.0) || // negative strength
				(rslt[3] >= 0.0) || // x: min, not max
				(rslt[4] >= 0.0)) { // y: min, not max
			this.poly_coeff = null;
			this.poly_xyvwh = null;
			return null;
		}
//		if ()

		// calculate width_x and width_y
		double hwx = Double.NaN, hwy = Double.NaN;
		if ((rslt[2] > 0.0) && (rslt[3] <0.0) && (rslt[4] <0.0)) {
+28 −6
Original line number Diff line number Diff line
@@ -2449,13 +2449,16 @@ public class EyesisCorrectionParameters {
  		public double     ih_max_diff =      0.1;    // Keep samples within this difference from farthest maximum
  		public int        ih_min_samples =  10;      // Minimal number of remaining samples
  		public boolean    ih_norm_center =  true;    // Replace samples with a single average with equal weight

  		public boolean    inf_restore_disp = true;   // Add disparity back to d{x,y}[i] (debug feature)
  		// Lazy eye parameters
  		public boolean    ly_on_scan =      true;    // Calculate and apply lazy eye correction after disparity scan (poly or extrinsic)
  		public boolean    ly_inf_en =       true;    // Simultaneously correct disparity at infinity (both poly and extrinsic)
  		public boolean    ly_combo_en =     true;    // Adjust other that disparity-related extrinsics
  		public boolean    ly_aztilt_en =    true;    // Adjust azimuths and tilts
  		public boolean    ly_diff_roll_en = true;    // Adjust differential rolls (3 of 4 angles)
  		public boolean    ly_focalLength=   true; // Correct scales (focal length temperature? variations)
  		public boolean    ly_com_roll=      false;   // Enable common roll (valid for high disparity range only)
  		public int        ly_par_sel   =    0;       // Manually select the parameter mask bit 0 - sym0, bit1 - sym1, ... (0 - use checkbox selections above)

 		public double     ly_inf_frac =     0.5;     // Relative weight of infinity calibration data
  		public boolean    ly_inf_disp=      false;   // Correct disparity for infinity tiles
  		public boolean    ly_inf_force=     false;   // Force convergence correction during extrinsic, even with no infinity data
@@ -3135,12 +3138,17 @@ public class EyesisCorrectionParameters {
  			properties.setProperty(prefix+"ih_max_diff",      this.ih_max_diff +"");
  			properties.setProperty(prefix+"ih_min_samples",   this.ih_min_samples+"");
			properties.setProperty(prefix+"ih_norm_center",   this.ih_norm_center+"");
			properties.setProperty(prefix+"inf_restore_disp", this.inf_restore_disp+"");

			properties.setProperty(prefix+"ly_on_scan",       this.ly_on_scan+"");
			properties.setProperty(prefix+"ly_inf_en",        this.ly_inf_en+"");
			properties.setProperty(prefix+"ly_combo_en",      this.ly_combo_en+"");
			properties.setProperty(prefix+"ly_aztilt_en",     this.ly_aztilt_en+"");
			properties.setProperty(prefix+"ly_diff_roll_en",  this.ly_diff_roll_en+"");
			properties.setProperty(prefix+"ly_focalLength",   this.ly_focalLength+"");
			properties.setProperty(prefix+"ly_com_roll",      this.ly_com_roll+"");

			properties.setProperty(prefix+"ly_par_sel",        this.ly_par_sel+"");

			properties.setProperty(prefix+"ly_inf_frac",      this.ly_inf_frac +"");

			properties.setProperty(prefix+"ly_inf_disp",      this.ly_inf_disp+"");
@@ -3767,12 +3775,17 @@ public class EyesisCorrectionParameters {
  			if (properties.getProperty(prefix+"ih_max_diff")!=null)       this.ih_max_diff=Double.parseDouble(properties.getProperty(prefix+"ih_max_diff"));
  			if (properties.getProperty(prefix+"ih_min_samples")!=null)    this.ih_min_samples=Integer.parseInt(properties.getProperty(prefix+"ih_min_samples"));
  			if (properties.getProperty(prefix+"ih_norm_center")!=null)    this.ih_norm_center=Boolean.parseBoolean(properties.getProperty(prefix+"ih_norm_center"));
  			if (properties.getProperty(prefix+"inf_restore_disp")!=null)  this.inf_restore_disp=Boolean.parseBoolean(properties.getProperty(prefix+"inf_restore_disp"));

  			if (properties.getProperty(prefix+"ly_on_scan")!=null)        this.ly_on_scan=Boolean.parseBoolean(properties.getProperty(prefix+"ly_on_scan"));
  			if (properties.getProperty(prefix+"ly_inf_en")!=null)         this.ly_inf_en=Boolean.parseBoolean(properties.getProperty(prefix+"ly_inf_en"));
  			if (properties.getProperty(prefix+"ly_combo_en")!=null)       this.ly_combo_en=Boolean.parseBoolean(properties.getProperty(prefix+"ly_combo_en"));
  			if (properties.getProperty(prefix+"ly_aztilt_en")!=null)      this.ly_aztilt_en=Boolean.parseBoolean(properties.getProperty(prefix+"ly_aztilt_en"));
  			if (properties.getProperty(prefix+"ly_diff_roll_en")!=null)   this.ly_diff_roll_en=Boolean.parseBoolean(properties.getProperty(prefix+"ly_diff_roll_en"));
  			if (properties.getProperty(prefix+"ly_focalLength")!=null)    this.ly_focalLength=Boolean.parseBoolean(properties.getProperty(prefix+"ly_focalLength"));
  			if (properties.getProperty(prefix+"ly_com_roll")!=null)       this.ly_com_roll=Boolean.parseBoolean(properties.getProperty(prefix+"ly_com_roll"));

			if (properties.getProperty(prefix+"ly_par_sel")!=null)        this.ly_par_sel=Integer.parseInt(properties.getProperty(prefix+"ly_par_sel"));

			if (properties.getProperty(prefix+"ly_inf_frac")!=null)       this.ly_inf_frac=Double.parseDouble(properties.getProperty(prefix+"ly_inf_frac"));

  			if (properties.getProperty(prefix+"ly_inf_disp")!=null)       this.ly_inf_disp=Boolean.parseBoolean(properties.getProperty(prefix+"ly_inf_disp"));
@@ -4434,14 +4447,19 @@ public class EyesisCorrectionParameters {
  			gd.addNumericField("Keep samples within this difference from farthest maximum",               this.ih_max_diff,     3);
  			gd.addNumericField("Minimal number of remaining samples",                                     this.ih_min_samples,  0);
  			gd.addCheckbox    ("Replace samples with a single average with equal weight",                 this.ih_norm_center);
  			gd.addCheckbox    ("Add disparity back to d{x,y}[i] (debug feature)",                         this.inf_restore_disp);

  			gd.addTab         ("Lazy eye", "Lazy eye parameters");

  			gd.addCheckbox    ("Calculate and apply lazy eye correction after disparity scan (poly or extrinsic), may repeat",this.ly_on_scan);
  			gd.addCheckbox    ("Adjust disparity using objects at infinity by changing individual tilt and azimuth ", this.ly_inf_en," disable if there are no really far objects in the scene");
  			gd.addCheckbox    ("Adjust other extrinsics that do not influence disparity",                 this.ly_combo_en,"disable if only disparity is critical");
  			gd.addCheckbox    ("Adjust azimuths and tilts",                                               this.ly_aztilt_en,"Adjust azimuths and tilts excluding those that change disparity");
  			gd.addCheckbox    ("Adjust differential rolls",                                               this.ly_diff_roll_en,"Adjust differential rolls (3 of 4 rolls, keeping average roll)");
  			gd.addCheckbox    ("Correct scales (focal length temperature? variations)",                   this.ly_focalLength);
  			gd.addCheckbox    ("Enable common roll adjustment (valid for high disparity range scans only)", this.ly_com_roll);

			gd.addNumericField("Manual parameter mask selection (0 use checkboxes above)",                this.ly_par_sel,  0, 5,"",
					"bit 0 - sym0, bit1 - sym1, ...");
			gd.addNumericField("Relative weight of infinity calibration data",                            this.ly_inf_frac,  3);
  			gd.addCheckbox    ("Correct disparity for infinity tiles )has to disable until code fixed)",  this.ly_inf_disp);
  			gd.addCheckbox    ("Force convergence correction during extrinsic, even with no infinity data", this.ly_inf_force);
@@ -5144,12 +5162,16 @@ public class EyesisCorrectionParameters {
  			this.ih_max_diff=           gd.getNextNumber();
  			this.ih_min_samples=  (int) gd.getNextNumber();
  			this.ih_norm_center=        gd.getNextBoolean();
  			this.inf_restore_disp=      gd.getNextBoolean();

  			this.ly_on_scan=            gd.getNextBoolean();
  			this.ly_inf_en=             gd.getNextBoolean();
  			this.ly_combo_en=           gd.getNextBoolean();
  			this.ly_aztilt_en=          gd.getNextBoolean();
  			this.ly_diff_roll_en=       gd.getNextBoolean();
  			this.ly_focalLength=        gd.getNextBoolean();
  			this.ly_com_roll=           gd.getNextBoolean();
			this.ly_par_sel=      (int) gd.getNextNumber();

			this.ly_inf_frac=           gd.getNextNumber();

			this.ly_inf_disp=           gd.getNextBoolean();
+93 −20

File changed.

Preview size limit exceeded, changes collapsed.

Loading