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

misalignment - converted to true rotations

parent 770a8d96
Loading
Loading
Loading
Loading
+50 −10
Original line number Original line Diff line number Diff line
@@ -612,11 +612,13 @@ public class AlignmentCorrection {
			mdata = new double [8][samples_list.size()][3];
			mdata = new double [8][samples_list.size()][3];
		}
		}
		int indx = 0;
		int indx = 0;
		final Matrix [] corr_rots = qc.geometryCorrection.getCorrVector().getRotMatrices(); // get array of per-sensor rotation matrices 
		for (Sample s: samples_list){
		for (Sample s: samples_list){
			int tileX = s.tile % tilesX;
			int tileX = s.tile % tilesX;
			int tileY = s.tile / tilesX;
			int tileY = s.tile / tilesX;
			double centerX = tileX * qc.tp.getTileSize() + qc.tp.getTileSize()/2;// - shiftX;
			double centerX = tileX * qc.tp.getTileSize() + qc.tp.getTileSize()/2;// - shiftX;
			double centerY = tileY * qc.tp.getTileSize() + qc.tp.getTileSize()/2;//- shiftY;
			double centerY = tileY * qc.tp.getTileSize() + qc.tp.getTileSize()/2;//- shiftY;
/*			
			double [][] centersXY_disp = qc.geometryCorrection.getPortsCoordinates(
			double [][] centersXY_disp = qc.geometryCorrection.getPortsCoordinates(
					centerX,
					centerX,
					centerY,
					centerY,
@@ -625,6 +627,22 @@ public class AlignmentCorrection {
					centerX,
					centerX,
					centerY,
					centerY,
					0.0); // disparity
					0.0); // disparity
*/					
			double [][] centersXY_disp = qc.geometryCorrection.getPortsCoordinatesAndDerivatives(
					corr_rots, // Matrix []   rots,
					null,      //  Matrix [][] deriv_rots, 
					null,      // double [][] pXYderiv, // if not null, should be double[8][]
					centerX,
					centerY,
					disp_strength[2 * s.series + 0][s.tile]/magic_coeff); // disparity
			double [][] centersXY_inf = qc.geometryCorrection.getPortsCoordinatesAndDerivatives(
					corr_rots, // Matrix []   rots,
					null,      //  Matrix [][] deriv_rots, 
					null,      // double [][] pXYderiv, // if not null, should be double[8][]
					centerX,
					centerY,
					0.0); // disparity

			for (int i = 0; i < centersXY_disp.length;i++){
			for (int i = 0; i < centersXY_disp.length;i++){
				centersXY_disp[i][0] -= centersXY_inf[i][0];
				centersXY_disp[i][0] -= centersXY_inf[i][0];
				centersXY_disp[i][1] -= centersXY_inf[i][1];
				centersXY_disp[i][1] -= centersXY_inf[i][1];
@@ -2077,7 +2095,7 @@ B = |+dy0 -dy1 -2*dy3 |
					qc.geometryCorrection,                  // GeometryCorrection geometryCorrection,
					qc.geometryCorrection,                  // GeometryCorrection geometryCorrection,
					qc.geometryCorrection.getCorrVector(),  // GeometryCorrection.CorrVector corr_vector,
					qc.geometryCorrection.getCorrVector(),  // GeometryCorrection.CorrVector corr_vector,
					old_new_rms,                            // double [] old_new_rms, // should be double[2]
					old_new_rms,                            // double [] old_new_rms, // should be double[2]
					debugLevel); // 2); // 1); // int debugLevel)
					2); // debugLevel); // 2); // 1); // int debugLevel)
			if (debugLevel > -1){
			if (debugLevel > -1){
				System.out.println("Old extrinsic corrections:");
				System.out.println("Old extrinsic corrections:");
				System.out.println(qc.geometryCorrection.getCorrVector().toString());
				System.out.println(qc.geometryCorrection.getCorrVector().toString());
@@ -2218,20 +2236,31 @@ B = |+dy0 -dy1 -2*dy3 |
			jt_dbg = new double  [num_pars][2 * NUM_SENSORS * mismatch_list.size()];
			jt_dbg = new double  [num_pars][2 * NUM_SENSORS * mismatch_list.size()];
		}
		}
		
		
		
		Matrix []   corr_rots =  corr_vector.getRotMatrices(); // get array of per-sensor rotation matrices
		Matrix [][] deriv_rots = corr_vector.getRotDeriveMatrices(); 
		for (int indx = 0; indx<mismatch_list.size(); indx++){ // need indx value
		for (int indx = 0; indx<mismatch_list.size(); indx++){ // need indx value
			Mismatch mm = mismatch_list.get(indx);
			Mismatch mm = mismatch_list.get(indx);
			double [] pXY = mm.getPXY();
			double [] pXY = mm.getPXY();
			double [][] deriv = new double [2 * NUM_SENSORS][];
			double [][] deriv = new double [2 * NUM_SENSORS][];
			int dbg_index =dbg_index (pXY, dbg_decimate);
			int dbg_index =dbg_index (pXY, dbg_decimate);
//			double [][] f =
//			double [][] f =
			geometryCorrection.getPortsCoordinatesAndDerivatives(
/*			
			geometryCorrection.getPortsCoordinatesAndDerivatives_old(
					corr_vector, // CorrVector corr_vector,
					corr_vector, // CorrVector corr_vector,
					deriv,   // 	boolean calc_deriv,
					deriv,   // 	boolean calc_deriv,
					pXY[0],      // double px,
					pXY[0],      // double px,
					pXY[1],      // double py,
					pXY[1],      // double py,
					mm.getDisparityMeas()); // getDisparityTask()); // double disparity)
					mm.getDisparityMeas()); // getDisparityTask()); // double disparity)
			// convert to symmetrical coordianets
*/
			geometryCorrection.getPortsCoordinatesAndDerivatives(
					corr_rots,   //  Matrix []   rots,
					deriv_rots,  //  Matrix [][] deriv_rots, 
					deriv,       // 	boolean calc_deriv,
					pXY[0],      // double px,
					pXY[1],      // double py,
					mm.getDisparityMeas()); // getDisparityTask()); // double disparity)
			
			// convert to symmetrical coordinates
			
			
			 double [][] jt_partial = corr_vector.getJtPartial(
			 double [][] jt_partial = corr_vector.getJtPartial(
						deriv, // double [][] port_coord_deriv,
						deriv, // double [][] port_coord_deriv,
@@ -2381,17 +2410,27 @@ B = |+dy0 -dy1 -2*dy3 |
	{
	{
		double [][] dMismatch_dXY = (new Mismatch()).get_dMismatch_dXY(); // just a static array
		double [][] dMismatch_dXY = (new Mismatch()).get_dMismatch_dXY(); // just a static array
		double [] mv = new double [2 * NUM_SENSORS * mismatch_list.size()];
		double [] mv = new double [2 * NUM_SENSORS * mismatch_list.size()];
		
		Matrix [] corr_rots = corr_vector.getRotMatrices(); // get array of per-sensor rotation matrices 
		for (int indx = 0; indx<mismatch_list.size(); indx++){ // need indx value
		for (int indx = 0; indx<mismatch_list.size(); indx++){ // need indx value
			Mismatch mm = mismatch_list.get(indx);
			Mismatch mm = mismatch_list.get(indx);
			double [] pXY = mm.getPXY();
			double [] pXY = mm.getPXY();
			double [][] f = geometryCorrection.getPortsCoordinatesAndDerivatives( // 4x2
			/*
			double [][] f = geometryCorrection.getPortsCoordinatesAndDerivatives_old( // 4x2
					corr_vector, // CorrVector corr_vector,
					corr_vector, // CorrVector corr_vector,
					null,        //	boolean calc_deriv,
					null,        //	boolean calc_deriv,
					pXY[0],      // double px,
					pXY[0],      // double px,
					pXY[1],      // double py,
					pXY[1],      // double py,
					mm.getDisparityMeas()); // getDisparityTask()); // double disparity)
					mm.getDisparityMeas()); // getDisparityTask()); // double disparity)
			// convert to symmetrical coordianets
*/
			double [][] f = geometryCorrection.getPortsCoordinatesAndDerivatives( // 4x2
					corr_rots,    //  Matrix []   rots,
					null, //  Matrix [][] deriv_rots, 
					null,        //	boolean calc_deriv,
					pXY[0],      // double px,
					pXY[1],      // double py,
					mm.getDisparityMeas()); // getDisparityTask()); // double disparity)

			// convert to symmetrical coordinates
			// f is [4][2] array of port x,y coordinates - convert them to mv (linear array)
			// f is [4][2] array of port x,y coordinates - convert them to mv (linear array)
			
			
			double [] mv_partial = new double [dMismatch_dXY.length];
			double [] mv_partial = new double [dMismatch_dXY.length];
@@ -2588,6 +2627,7 @@ B = |+dy0 -dy1 -2*dy3 |
				mismatch_list,      // ArrayList<Mismatch> mismatch_list,
				mismatch_list,      // ArrayList<Mismatch> mismatch_list,
				geometryCorrection, // GeometryCorrection geometryCorrection,
				geometryCorrection, // GeometryCorrection geometryCorrection,
				corr_vector,        // GeometryCorrection.CorrVector corr_vector)
				corr_vector,        // GeometryCorrection.CorrVector corr_vector)
//				debugLevel);		// int debugLevel)
				debugLevel);		// int debugLevel)
				debugLevel);		// int debugLevel)


		// convert Jacobian outputs to symmetrical measurement vectors (last one is non-zero only if disparity should be adjusted)
		// convert Jacobian outputs to symmetrical measurement vectors (last one is non-zero only if disparity should be adjusted)
+41 −21
Original line number Original line Diff line number Diff line
@@ -114,13 +114,15 @@ public class EyesisCorrectionParameters {
  		
  		
  		// CLT 3d batch parameters
  		// CLT 3d batch parameters
  		
  		
  		public boolean clt_batch_4img =       true;  // Create a set of 4 images, usually for disparity = 0
  		public boolean clt_batch_apply_man =  true;  // Apply (and disable) manual pixel shift
  		public boolean clt_batch_extrinsic =  false; // Calibrate extrinsic parameters for each set
  		public boolean clt_batch_extrinsic =  false; // Calibrate extrinsic parameters for each set
  		public boolean clt_batch_poly =       false; // Calculate fine polynomial correction for each set
  		public boolean clt_batch_poly =       false; // Calculate fine polynomial correction for each set
  		public boolean clt_batch_4img =       true;  // Create a set of 4 images, usually for disparity = 0
  		public boolean clt_batch_explore =    true;  // 1-st step of 3d reconstruction - explore disparities for each tile
  		public boolean clt_batch_explore =    true;  // 1-st step of 3d reconstruction - explore disparities for each tile
  		public boolean clt_batch_surf =       true;  // Create super-tile 2.5d surfaces
  		public boolean clt_batch_surf =       true;  // Create super-tile 2.5d surfaces
  		public boolean clt_batch_assign =     true;  // Assign tiles to surfaces
  		public boolean clt_batch_assign =     true;  // Assign tiles to surfaces
  		public boolean clt_batch_gen3d =      true;  // Generate 3d output: x3d and/or obj+mtl
  		public boolean clt_batch_gen3d =      true;  // Generate 3d output: x3d and/or obj+mtl
  		public boolean clt_batch_dbg1 =       true;  // Generate debug images if a single set is selected
  		
  		




@@ -215,13 +217,15 @@ public class EyesisCorrectionParameters {
    		properties.setProperty(prefix+"x3dDirectory",          this.x3dDirectory);
    		properties.setProperty(prefix+"x3dDirectory",          this.x3dDirectory);
    		properties.setProperty(prefix+"use_x3d_subdirs",       this.use_x3d_subdirs+"");
    		properties.setProperty(prefix+"use_x3d_subdirs",       this.use_x3d_subdirs+"");


    		properties.setProperty(prefix+"clt_batch_4img",        this.clt_batch_4img+"");
    		properties.setProperty(prefix+"clt_batch_apply_man",   this.clt_batch_apply_man+"");
    		properties.setProperty(prefix+"clt_batch_extrinsic",   this.clt_batch_extrinsic+"");
    		properties.setProperty(prefix+"clt_batch_extrinsic",   this.clt_batch_extrinsic+"");
    		properties.setProperty(prefix+"clt_batch_poly",        this.clt_batch_poly+"");
    		properties.setProperty(prefix+"clt_batch_poly",        this.clt_batch_poly+"");
    		properties.setProperty(prefix+"clt_batch_4img",        this.clt_batch_4img+"");
    		properties.setProperty(prefix+"clt_batch_explore",     this.clt_batch_explore+"");
    		properties.setProperty(prefix+"clt_batch_explore",     this.clt_batch_explore+"");
    		properties.setProperty(prefix+"clt_batch_surf",        this.clt_batch_surf+"");
    		properties.setProperty(prefix+"clt_batch_surf",        this.clt_batch_surf+"");
    		properties.setProperty(prefix+"clt_batch_assign",      this.clt_batch_assign+"");
    		properties.setProperty(prefix+"clt_batch_assign",      this.clt_batch_assign+"");
    		properties.setProperty(prefix+"clt_batch_gen3d",       this.clt_batch_gen3d+"");
    		properties.setProperty(prefix+"clt_batch_gen3d",       this.clt_batch_gen3d+"");
    		properties.setProperty(prefix+"clt_batch_dbg1",        this.clt_batch_dbg1+"");
    	}
    	}


    	public void getProperties(String prefix,Properties properties){
    	public void getProperties(String prefix,Properties properties){
@@ -317,13 +321,15 @@ public class EyesisCorrectionParameters {


			if (properties.getProperty(prefix+"use_x3d_subdirs")!= null) this.use_x3d_subdirs=Boolean.parseBoolean((String) properties.getProperty(prefix+"use_x3d_subdirs"));
			if (properties.getProperty(prefix+"use_x3d_subdirs")!= null) this.use_x3d_subdirs=Boolean.parseBoolean((String) properties.getProperty(prefix+"use_x3d_subdirs"));
			
			
			if (properties.getProperty(prefix+"clt_batch_4img")!= null)      this.clt_batch_4img=Boolean.parseBoolean((String) properties.getProperty(prefix+"clt_batch_4img"));
			if (properties.getProperty(prefix+"clt_batch_apply_man")!= null) this.clt_batch_apply_man=Boolean.parseBoolean((String) properties.getProperty(prefix+"clt_batch_apply_man"));
			if (properties.getProperty(prefix+"clt_batch_extrinsic")!= null) this.clt_batch_extrinsic=Boolean.parseBoolean((String) properties.getProperty(prefix+"clt_batch_extrinsic"));
			if (properties.getProperty(prefix+"clt_batch_extrinsic")!= null) this.clt_batch_extrinsic=Boolean.parseBoolean((String) properties.getProperty(prefix+"clt_batch_extrinsic"));
			if (properties.getProperty(prefix+"clt_batch_poly")!= null)      this.clt_batch_poly=Boolean.parseBoolean((String) properties.getProperty(prefix+"clt_batch_poly"));
			if (properties.getProperty(prefix+"clt_batch_poly")!= null)      this.clt_batch_poly=Boolean.parseBoolean((String) properties.getProperty(prefix+"clt_batch_poly"));
			if (properties.getProperty(prefix+"clt_batch_4img")!= null)      this.clt_batch_4img=Boolean.parseBoolean((String) properties.getProperty(prefix+"clt_batch_4img"));
			if (properties.getProperty(prefix+"clt_batch_explore")!= null)   this.clt_batch_explore=Boolean.parseBoolean((String) properties.getProperty(prefix+"clt_batch_explore"));
			if (properties.getProperty(prefix+"clt_batch_explore")!= null)   this.clt_batch_explore=Boolean.parseBoolean((String) properties.getProperty(prefix+"clt_batch_explore"));
			if (properties.getProperty(prefix+"clt_batch_surf")!= null)      this.clt_batch_surf=Boolean.parseBoolean((String) properties.getProperty(prefix+"clt_batch_surf"));
			if (properties.getProperty(prefix+"clt_batch_surf")!= null)      this.clt_batch_surf=Boolean.parseBoolean((String) properties.getProperty(prefix+"clt_batch_surf"));
			if (properties.getProperty(prefix+"clt_batch_assign")!= null)    this.clt_batch_assign=Boolean.parseBoolean((String) properties.getProperty(prefix+"clt_batch_assign"));
			if (properties.getProperty(prefix+"clt_batch_assign")!= null)    this.clt_batch_assign=Boolean.parseBoolean((String) properties.getProperty(prefix+"clt_batch_assign"));
			if (properties.getProperty(prefix+"clt_batch_gen3d")!= null)     this.clt_batch_gen3d=Boolean.parseBoolean((String) properties.getProperty(prefix+"clt_batch_gen3d"));
			if (properties.getProperty(prefix+"clt_batch_gen3d")!= null)     this.clt_batch_gen3d=Boolean.parseBoolean((String) properties.getProperty(prefix+"clt_batch_gen3d"));
			if (properties.getProperty(prefix+"clt_batch_dbg1")!= null)      this.clt_batch_dbg1=Boolean.parseBoolean((String) properties.getProperty(prefix+"clt_batch_dbg1"));
    	}
    	}


    	public boolean showDialog(String title) { 
    	public boolean showDialog(String title) { 
@@ -536,13 +542,15 @@ public class EyesisCorrectionParameters {
    		gd.addStringField("CLT symmetical kernel files",                       this.cltSuffix, 40);          // 19
    		gd.addStringField("CLT symmetical kernel files",                       this.cltSuffix, 40);          // 19
    		
    		
    		gd.addMessage     ("============ batch parameters ============");
    		gd.addMessage     ("============ batch parameters ============");
    		gd.addCheckbox    ("Create a set of 4 images, usually for disparity = 0",                this.clt_batch_4img);      // 20
    		gd.addCheckbox    ("Apply (and disable) manual pixel shift",                             this.clt_batch_apply_man); // 20
    		gd.addCheckbox    ("Calibrate extrinsic parameters for each set",                        this.clt_batch_extrinsic); // 21
    		gd.addCheckbox    ("Calibrate extrinsic parameters for each set",                        this.clt_batch_extrinsic); // 21
    		gd.addCheckbox    ("Calculate fine polynomial correction for each set",                  this.clt_batch_poly);      // 22
    		gd.addCheckbox    ("Calculate fine polynomial correction for each set",                  this.clt_batch_poly);      // 22
    		gd.addCheckbox    ("1-st step of 3d reconstruction - explore disparities for each tile", this.clt_batch_explore);   // 23
    		gd.addCheckbox    ("Create a set of 4 images, usually for disparity = 0",                this.clt_batch_4img);      // 23
    		gd.addCheckbox    ("Create super-tile 2.5d surfaces",                                    this.clt_batch_surf);      // 24
    		gd.addCheckbox    ("1-st step of 3d reconstruction - explore disparities for each tile", this.clt_batch_explore);   // 24
    		gd.addCheckbox    ("Assign tiles to surfaces",                                           this.clt_batch_assign);    // 25
    		gd.addCheckbox    ("Create super-tile 2.5d surfaces",                                    this.clt_batch_surf);      // 25
    		gd.addCheckbox    ("Generate 3d output: x3d and/or obj+mtl",                             this.clt_batch_gen3d);     // 26
    		gd.addCheckbox    ("Assign tiles to surfaces",                                           this.clt_batch_assign);    // 26
    		gd.addCheckbox    ("Generate 3d output: x3d and/or obj+mtl",                             this.clt_batch_gen3d);     // 27
    		gd.addCheckbox    ("Generate debug images if a single set is selected",                  this.clt_batch_dbg1);      // 28
    		 
    		 
    		
    		
    		WindowTools.addScrollBars(gd);
    		WindowTools.addScrollBars(gd);
@@ -567,13 +575,15 @@ public class EyesisCorrectionParameters {
    		this.cltKernelPrefix=        gd.getNextString();  // 18
    		this.cltKernelPrefix=        gd.getNextString();  // 18
    		this.cltSuffix=              gd.getNextString();  // 19
    		this.cltSuffix=              gd.getNextString();  // 19


    		this.clt_batch_4img=         gd.getNextBoolean(); // 20
    		this.clt_batch_apply_man=    gd.getNextBoolean(); // 20
    		this.clt_batch_extrinsic=    gd.getNextBoolean(); // 21
    		this.clt_batch_extrinsic=    gd.getNextBoolean(); // 21
    		this.clt_batch_poly=         gd.getNextBoolean(); // 22
    		this.clt_batch_poly=         gd.getNextBoolean(); // 22
    		this.clt_batch_explore=      gd.getNextBoolean(); // 23
    		this.clt_batch_4img=         gd.getNextBoolean(); // 23
    		this.clt_batch_surf=         gd.getNextBoolean(); // 24
    		this.clt_batch_explore=      gd.getNextBoolean(); // 24
    		this.clt_batch_assign=       gd.getNextBoolean(); // 25
    		this.clt_batch_surf=         gd.getNextBoolean(); // 25
    		this.clt_batch_gen3d=        gd.getNextBoolean(); // 26
    		this.clt_batch_assign=       gd.getNextBoolean(); // 26
    		this.clt_batch_gen3d=        gd.getNextBoolean(); // 27
    		this.clt_batch_dbg1=         gd.getNextBoolean(); // 28
    		return true;
    		return true;
    	}
    	}
    	
    	
@@ -2131,6 +2141,8 @@ public class EyesisCorrectionParameters {
  		public double     fine_corr_y_2 =     0.0;   // additionally shift image in port 2 in y direction
  		public double     fine_corr_y_2 =     0.0;   // additionally shift image in port 2 in y direction
  		public double     fine_corr_x_3 =     0.0;   // additionally shift image in port 3 in x direction
  		public double     fine_corr_x_3 =     0.0;   // additionally shift image in port 3 in x direction
  		public double     fine_corr_y_3 =     0.0;   // additionally shift image in port 3 in y direction
  		public double     fine_corr_y_3 =     0.0;   // additionally shift image in port 3 in y direction
  		public boolean    fine_corr_ignore =  false; // Ignore manual pixel correction
  		public boolean    fine_corr_apply =   true;  // Apply and set to ignore manual pixel correction after extrinsics correction
  		
  		
  		public double     fcorr_radius =       0.75 ; // Do not try to correct outside this fraction of width/hight
  		public double     fcorr_radius =       0.75 ; // Do not try to correct outside this fraction of width/hight
  		public double     fcorr_min_strength = 0.15 ; // 0.005 minimal correlation strength to apply fine correction
  		public double     fcorr_min_strength = 0.15 ; // 0.005 minimal correlation strength to apply fine correction
@@ -2786,6 +2798,8 @@ public class EyesisCorrectionParameters {
  			properties.setProperty(prefix+"fine_corr_y_2",    this.fine_corr_y_2 +"");
  			properties.setProperty(prefix+"fine_corr_y_2",    this.fine_corr_y_2 +"");
  			properties.setProperty(prefix+"fine_corr_x_3",    this.fine_corr_x_3 +"");
  			properties.setProperty(prefix+"fine_corr_x_3",    this.fine_corr_x_3 +"");
  			properties.setProperty(prefix+"fine_corr_y_3",    this.fine_corr_y_3 +"");
  			properties.setProperty(prefix+"fine_corr_y_3",    this.fine_corr_y_3 +"");
			properties.setProperty(prefix+"fine_corr_ignore", this.fine_corr_ignore+"");
			properties.setProperty(prefix+"fine_corr_apply",  this.fine_corr_apply+"");


  			properties.setProperty(prefix+"fcorr_radius",     this.fcorr_radius +"");
  			properties.setProperty(prefix+"fcorr_radius",     this.fcorr_radius +"");
  			properties.setProperty(prefix+"fcorr_min_strength",this.fcorr_min_strength +"");
  			properties.setProperty(prefix+"fcorr_min_strength",this.fcorr_min_strength +"");
@@ -3385,6 +3399,8 @@ public class EyesisCorrectionParameters {
  			if (properties.getProperty(prefix+"fine_corr_y_2")!=null) this.fine_corr_y_2=Double.parseDouble(properties.getProperty(prefix+"fine_corr_y_2"));
  			if (properties.getProperty(prefix+"fine_corr_y_2")!=null) this.fine_corr_y_2=Double.parseDouble(properties.getProperty(prefix+"fine_corr_y_2"));
  			if (properties.getProperty(prefix+"fine_corr_x_3")!=null) this.fine_corr_x_3=Double.parseDouble(properties.getProperty(prefix+"fine_corr_x_3"));
  			if (properties.getProperty(prefix+"fine_corr_x_3")!=null) this.fine_corr_x_3=Double.parseDouble(properties.getProperty(prefix+"fine_corr_x_3"));
  			if (properties.getProperty(prefix+"fine_corr_y_3")!=null) this.fine_corr_y_3=Double.parseDouble(properties.getProperty(prefix+"fine_corr_y_3"));
  			if (properties.getProperty(prefix+"fine_corr_y_3")!=null) this.fine_corr_y_3=Double.parseDouble(properties.getProperty(prefix+"fine_corr_y_3"));
  			if (properties.getProperty(prefix+"fine_corr_ignore")!=null) this.fine_corr_ignore=Boolean.parseBoolean(properties.getProperty(prefix+"fine_corr_ignore"));
  			if (properties.getProperty(prefix+"fine_corr_apply")!=null)  this.fine_corr_apply=Boolean.parseBoolean(properties.getProperty(prefix+"fine_corr_apply"));
  			
  			
  			if (properties.getProperty(prefix+"fcorr_radius")!=null)      this.fcorr_radius=Double.parseDouble(properties.getProperty(prefix+"fcorr_radius"));
  			if (properties.getProperty(prefix+"fcorr_radius")!=null)      this.fcorr_radius=Double.parseDouble(properties.getProperty(prefix+"fcorr_radius"));
  			if (properties.getProperty(prefix+"fcorr_min_strength")!=null) this.fcorr_min_strength=Double.parseDouble(properties.getProperty(prefix+"fcorr_min_strength"));
  			if (properties.getProperty(prefix+"fcorr_min_strength")!=null) this.fcorr_min_strength=Double.parseDouble(properties.getProperty(prefix+"fcorr_min_strength"));
@@ -4000,7 +4016,9 @@ public class EyesisCorrectionParameters {
  			gd.addNumericField("X 2",                                                                     this.fine_corr_x_2,  3);
  			gd.addNumericField("X 2",                                                                     this.fine_corr_x_2,  3);
  			gd.addNumericField("Y 2",                                                                     this.fine_corr_y_2,  3);
  			gd.addNumericField("Y 2",                                                                     this.fine_corr_y_2,  3);
  			gd.addNumericField("X 3",                                                                     this.fine_corr_x_3,  3);
  			gd.addNumericField("X 3",                                                                     this.fine_corr_x_3,  3);
  			gd.addNumericField("Y 4",                                                                     this.fine_corr_y_3,  3);
  			gd.addNumericField("Y 3",                                                                     this.fine_corr_y_3,  3);
  			gd.addCheckbox    ("Ignore manual pixel correction (set/reset automatically if enabled below)",   this.fine_corr_ignore);
  			gd.addCheckbox    ("Apply and set to ignore manual pixel correction after extrinsics correction", this.fine_corr_apply);


  			gd.addNumericField("fcorr_radius",                                                            this.fcorr_radius,  3);
  			gd.addNumericField("fcorr_radius",                                                            this.fcorr_radius,  3);
  			gd.addNumericField("Do not try to correct outside this fraction of width/hight",              this.fcorr_min_strength,3);
  			gd.addNumericField("Do not try to correct outside this fraction of width/hight",              this.fcorr_min_strength,3);
@@ -4647,6 +4665,8 @@ public class EyesisCorrectionParameters {
  			this.fine_corr_y_2=         gd.getNextNumber();
  			this.fine_corr_y_2=         gd.getNextNumber();
  			this.fine_corr_x_3=         gd.getNextNumber();
  			this.fine_corr_x_3=         gd.getNextNumber();
  			this.fine_corr_y_3=         gd.getNextNumber();
  			this.fine_corr_y_3=         gd.getNextNumber();
  			this.fine_corr_ignore=      gd.getNextBoolean();
  			this.fine_corr_apply=       gd.getNextBoolean();
  			
  			
  			this.fcorr_radius=          gd.getNextNumber();
  			this.fcorr_radius=          gd.getNextNumber();
  			this.fcorr_min_strength=    gd.getNextNumber();
  			this.fcorr_min_strength=    gd.getNextNumber();
+1 −1
Original line number Original line Diff line number Diff line
@@ -2327,7 +2327,7 @@ public class EyesisCorrections {
		   saveAndShowEnable( imp,    correctionsParameters , true, true);
		   saveAndShowEnable( imp,    correctionsParameters , true, true);
	   }
	   }


	   private void saveAndShowEnable(
	   public void saveAndShowEnable(
			   ImagePlus             imp,
			   ImagePlus             imp,
			   EyesisCorrectionParameters.CorrectionParameters  correctionsParameters,
			   EyesisCorrectionParameters.CorrectionParameters  correctionsParameters,
			   boolean               enableSave,
			   boolean               enableSave,
+2 −2
Original line number Original line Diff line number Diff line
@@ -542,8 +542,8 @@ private Panel panel1,
		if (DCT_MODE) {
		if (DCT_MODE) {
			panelClt3 = new Panel();
			panelClt3 = new Panel();
			panelClt3.setLayout(new GridLayout(1, 0, 5, 5)); // rows, columns, vgap, hgap
			panelClt3.setLayout(new GridLayout(1, 0, 5, 5)); // rows, columns, vgap, hgap
			addButton("Setup CLT Batch parameters", panelClt3, color_configure);
			addButton("Setup CLT parameters",       panelClt3, color_configure);
			addButton("Setup CLT parameters",       panelClt3, color_configure);
			addButton("Setup CLT Batch parameters", panelClt3, color_configure);
			addButton("CLT batch process",          panelClt3, color_process);
			addButton("CLT batch process",          panelClt3, color_process);
			add(panelClt3);
			add(panelClt3);
		}
		}
@@ -4604,7 +4604,7 @@ private Panel panel1,
        		System.out.println("Created new QuadCLT instance, will need to read CLT kernels");
        		System.out.println("Created new QuadCLT instance, will need to read CLT kernels");
        	}
        	}
        }
        }
        QUAD_CLT.resetExtrinsicCorr();
        QUAD_CLT.resetExtrinsicCorr(CLT_PARAMETERS);
        return;
        return;
    } else if (label.equals("CLT show fine corr")) {
    } else if (label.equals("CLT show fine corr")) {
        if (QUAD_CLT == null){
        if (QUAD_CLT == null){
+410 −36

File changed.

Preview size limit exceeded, changes collapsed.

Loading