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

re-implemented LMA, found problem in the original one

parent 9898d7a6
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1663,6 +1663,7 @@ public class EyesisCorrectionParameters {
  		public double dbg_y1 =0;
  		public double dbg_sigma =2.0;
  		public String dbg_mask = ".........:::::::::.........:::::::::......*..:::::*:::.........:::::::::.........";
  		public int dbg_mode = 1; // 0 - old LMA, 1 - new LMA

  		public DCTParameters(int dct_size, int asym_size, int asym_pixels, int asym_distance, int dct_window, double compactness, int asym_tax_free) {
  			this.dct_size =       dct_size;
@@ -1689,6 +1690,7 @@ public class EyesisCorrectionParameters {
  			properties.setProperty(prefix+"dbg_y1",     this.dbg_y1+"");
  			properties.setProperty(prefix+"dbg_sigma",  this.dbg_sigma+"");
  			properties.setProperty(prefix+"dbg_mask",   this.dbg_mask+"");
  			properties.setProperty(prefix+"dbg_mode",   this.dbg_mode+"");
  		
  		}
  		public void getProperties(String prefix,Properties properties){
@@ -1707,6 +1709,7 @@ public class EyesisCorrectionParameters {
  			if (properties.getProperty(prefix+"dbg_y1")!=null) this.dbg_y1=Double.parseDouble(properties.getProperty(prefix+"dbg_y1"));
  			if (properties.getProperty(prefix+"dbg_sigma")!=null) this.dbg_sigma=Double.parseDouble(properties.getProperty(prefix+"dbg_sigma"));
  			if (properties.getProperty(prefix+"dbg_mask")!=null) this.dbg_mask=properties.getProperty(prefix+"dbg_mask");
  			if (properties.getProperty(prefix+"dbg_mode")!=null) this.dbg_mode=Integer.parseInt(properties.getProperty(prefix+"dbg_mode"));
  		}
  		public boolean showDialog() {
  			GenericDialog gd = new GenericDialog("Set DCT parameters");
@@ -1726,6 +1729,8 @@ public class EyesisCorrectionParameters {
  			gd.addNumericField("dbg_y1",                                                         this.dbg_y1,  2); //0..2
  			gd.addNumericField("dbg_sigma",                                                      this.dbg_sigma, 3); //0..2
			gd.addStringField ("Debug mask (anything but * is false)",                           this.dbg_mask,100);
  			gd.addNumericField("LMA implementation: 0 - old, 1 - new",                           this.dbg_mode,     0); //32
			
  			//  	    gd.addNumericField("Debug Level:",                          MASTER_DEBUG_LEVEL,      0);
  			gd.showDialog();
  			if (gd.wasCanceled()) return false;
@@ -1744,6 +1749,7 @@ public class EyesisCorrectionParameters {
  			this.dbg_y1=                gd.getNextNumber();
  			this.dbg_sigma=             gd.getNextNumber();
			this.dbg_mask=              gd.getNextString();
  			this.dbg_mode=        (int) gd.getNextNumber();

  			//  	    MASTER_DEBUG_LEVEL= (int) gd.getNextNumber();
  			return true;
+1 −1
Original line number Diff line number Diff line
@@ -2835,7 +2835,7 @@ private Panel panel1,panel2,panel3,panel4,panel5,panel5a, panel6,panel7,panelPos
    } else if (label.equals("Test Kernel Factorization")){
    	DEBUG_LEVEL=MASTER_DEBUG_LEVEL;
        if (!DCT_PARAMETERS.showDialog()) return;
        FactorConvKernel factorConvKernel = new FactorConvKernel();
        FactorConvKernel factorConvKernel = new FactorConvKernel(DCT_PARAMETERS.dbg_mode == 1);
        factorConvKernel.setDebugLevel(DEBUG_LEVEL);
        factorConvKernel.numIterations = DCT_PARAMETERS.LMA_steps;
        factorConvKernel.setAsymCompactness(
+1166 −215

File changed.

Preview size limit exceeded, changes collapsed.