Commit 52e7ddde authored by Andrey Filippov's avatar Andrey Filippov
Browse files

reparing grid updtae, fixed typo

parent a1118d6f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -320,7 +320,7 @@ public static MatchSimulatedPattern.DistortionParameters DISTORTION =new MatchSi
		  // TODO: adjust to a reasonable number
		  1.0, //this.correlationMinAbsoluteInitialContrast,   // minimal contrast for the pattern of the center (initial point)
		  
		  0.8, //	scaleFirstPassContrast, // Decrease contrast of cells that are too close to the border to be processed in rifinement pass
		  0.8, //	scaleFirstPassContrast, // Decrease contrast of cells that are too close to the border to be processed in refinement pass
		  0.1, // contrastSelectSigma, // Gaussian sigma to select correlation centers (fraction of UV period), 0.1
		  0.5, //contrastAverageSigma, // Gaussian sigma to average correlation variations (as contrast reference) 0.5
		  
@@ -19725,7 +19725,7 @@ use the result to create a rejectiobn mask - if the energy was high, (multiplica
			gd.addNumericField("Correlation minimal contrast (absolute)",         distortionParameters.correlationMinAbsoluteContrast, 3);
			gd.addNumericField("Correlation minimal contrast for initial search (absolute)", distortionParameters.correlationMinAbsoluteInitialContrast, 3);
			
			gd.addNumericField("Decrease contrast of cells that are too close to the border to be processed in rifinement pass", distortionParameters.scaleFirstPassContrast, 3);
			gd.addNumericField("Decrease contrast of cells that are too close to the border to be processed in refinement pass", distortionParameters.scaleFirstPassContrast, 3);
			gd.addNumericField("Gaussian sigma to select correlation centers (fraction of UV period), 0.1", distortionParameters.contrastSelectSigma, 3);
			gd.addNumericField("Gaussian sigma to average correlation variations (as contrast reference), 0.5", distortionParameters.contrastAverageSigma, 3);
+2 −2
Original line number Diff line number Diff line
@@ -124,8 +124,8 @@ public class LensAdjustment {
		int numAbsolutePoints=0;
		if (updating) {		
			// add new nodes if the appeared after shift of the pattern
			if (debug_level>1) { // calculate/print number of defined nodes in the grid
				System.out.println("updateFocusGrid(), number of defined grid cells (before distortions()) = "+matchSimulatedPattern.numDefinedCells());
			if (debug_level>0) { // calculate/print number of defined nodes in the grid
				System.out.println("updateFocusGrid(), number of already defined grid cells (before distortions()) = "+matchSimulatedPattern.numDefinedCells());
			}
			matchSimulatedPattern.distortions(
					null, // is not used in update mode
+7 −7
Original line number Diff line number Diff line
@@ -3312,11 +3312,11 @@ public class MatchSimulatedPattern {
//		   double [][][] nodes=null;
		   Queue<GridNode> nodeQueue = new ConcurrentLinkedQueue<GridNode>();		   
		   boolean fromVeryBeginning=true;
		   for (int i=3;i<triedIndices.length;i++) if (triedIndices[i]){ // do not count first three
		   if (!updating) {
			   for (int i=3;i<triedIndices.length;i++) if (triedIndices[i]){ // do not count first three NPE
				   fromVeryBeginning=false;
				   break;
			   }
		   if (!updating) {
			   double [] point = new double[2];
			   int tryHor=0,tryVert=0;
//				distortionParameters.searchOverlap=goniometerParameters.searchOverlap;
@@ -10299,7 +10299,7 @@ error=Sum(W(x,y)*(F^2 + 2*F*(A*x^2+B*y^2+C*x*y+D*x+E*y-Z(x,y)) +(...) )
				double correlationMinAbsoluteContrast,   // minimal contrast for the pattern to pass, does not compensate for low ligt
				double correlationMinAbsoluteInitialContrast,   // minimal contrast for the pattern of the center (initial point)
				double scaleFirstPassContrast, // Decrease contrast of cells that are too close to the border to be processed in rifinement pass
				double scaleFirstPassContrast, // Decrease contrast of cells that are too close to the border to be processed in refinement pass
				double contrastSelectSigma, // Gaussian sigma to select correlation centers (fraction of UV period), 0.1
				double contrastAverageSigma, // Gaussian sigma to average correlation variations (as contrast reference) 0.5
				int    minimalPatternCluster,       //    minimal pattern cluster size (0 - disable retries)
@@ -10360,7 +10360,7 @@ error=Sum(W(x,y)*(F^2 + 2*F*(A*x^2+B*y^2+C*x*y+D*x+E*y-Z(x,y)) +(...) )
			this.correlationMinInitialContrast=correlationMinInitialContrast;
			this.correlationMinAbsoluteContrast=correlationMinAbsoluteContrast;   // minimal contrast for the pattern to pass, does not compensate for low ligt
			this.correlationMinAbsoluteInitialContrast=correlationMinAbsoluteInitialContrast;   // minimal contrast for the pattern of the center (initial point)
			this.scaleFirstPassContrast=scaleFirstPassContrast; // Decrease contrast of cells that are too close to the border to be processed in rifinement pass
			this.scaleFirstPassContrast=scaleFirstPassContrast; // Decrease contrast of cells that are too close to the border to be processed in refinement pass
			this.contrastSelectSigma=contrastSelectSigma; // Gaussian sigma to select correlation centers (fraction of UV period), 0.1
			this.contrastAverageSigma=contrastAverageSigma; // Gaussian sigma to average correlation variations (as contrast reference) 0.5
			this.minimalPatternCluster=minimalPatternCluster;        //    minimal pattern cluster size (0 - disable retries)
@@ -10423,7 +10423,7 @@ error=Sum(W(x,y)*(F^2 + 2*F*(A*x^2+B*y^2+C*x*y+D*x+E*y-Z(x,y)) +(...) )
			this.correlationMinInitialContrast,
			this.correlationMinAbsoluteContrast,   // minimal contrast for the pattern to pass, does not compensate for low ligt
			this.correlationMinAbsoluteInitialContrast,   // minimal contrast for the pattern of the center (initial point)
			this.scaleFirstPassContrast, // Decrease contrast of cells that are too close to the border to be processed in rifinement pass
			this.scaleFirstPassContrast, // Decrease contrast of cells that are too close to the border to be processed in refinement pass
			this.contrastSelectSigma, // Gaussian sigma to select correlation centers (fraction of UV period), 0.1
			this.contrastAverageSigma, // Gaussian sigma to average correlation variations (as contrast reference) 0.5
			this.minimalPatternCluster,        //    minimal pattern cluster size (0 - disable retries)