Commit 03a9cc77 authored by Andrey Filippov's avatar Andrey Filippov
Browse files

Working snapshot, before implementing CuasMotion.refineMotionVectors()

parent c95105bc
Loading
Loading
Loading
Loading
+149 −105
Original line number Diff line number Diff line
@@ -1286,8 +1286,10 @@ public class CuasMotion {
		boolean skip_empty = true;
		int nseq0 = 0;
		int nseq1 = multi_targets.length -1;
		int tx = wh[0] / 2;
		int ty = wh[1] / 2;
		int tx0 = wh[0] / 2;
		int ty0 = wh[1] / 2;
		int twidth =  1;
		int theight = 1;
		int num_pars = CuasMotionLMA.RSLT_LEN; //  pvf_top_titles[0].length; // .RSLT_LEN;
		int npar = CuasMotionLMA.RSLT_A;
		int fw = 9;
@@ -1300,14 +1302,17 @@ public class CuasMotion {
		for (int i = 0; i < num_pars; i++) {
			choices[i + extra_choices.length] = String.format("%2d: %s", i, CuasMotionLMA.LMA_TITLES[i]); // pvf_top_titles[0])
		}
		
		while (true) {
			GenericJTabbedDialog gd1 = new GenericJTabbedDialog("Select Range",600,500);
//			gd1.addMessage(target_path);
			gd1.addNumericField("tile X (0.."+(wh[0] -1)+")", tx, 0, 3, "",
			gd1.addNumericField("tile X (0.."+(wh[0] -1)+")", tx0, 0, 3, "",
					"Select tile X");
			gd1.addNumericField("tile Y (0.."+(wh[1] -1)+")", ty, 0, 3, "",
			gd1.addNumericField("tile Y (0.."+(wh[1] -1)+")", ty0, 0, 3, "",
					"Select tile Y");
			gd1.addNumericField("tiles width (1.."+(wh[0])+")", twidth, 0, 3, "",
					"Select tiles rectangle width");
			gd1.addNumericField("tile height (1.."+(wh[1])+")", theight, 0, 3, "",
					"Select tile rectangle height");
			gd1.addNumericField("Start sequence (0.."+(multi_targets.length -1)+")", nseq0, 0, 3, "",
					"Select first scene to output");
			gd1.addNumericField("End sequence (0.."+(multi_targets.length -1)+")", nseq1, 0, 3, "",
@@ -1328,8 +1333,10 @@ public class CuasMotion {
			gd1.showDialog();
			if (gd1.wasCanceled()) return;
			final int tileSize = GPUTileProcessor.DTT_SIZE; // 8
			tx =          (int) gd1.getNextNumber();
			ty =          (int) gd1.getNextNumber();
			tx0 =          (int) gd1.getNextNumber();
			ty0 =          (int) gd1.getNextNumber();
			twidth =       (int) gd1.getNextNumber();
			theight =      (int) gd1.getNextNumber();
			nseq0 =       (int) gd1.getNextNumber();
			nseq1 =       (int) gd1.getNextNumber();
			npar =              gd1.getNextChoiceIndex() - extra_choices.length;
@@ -1341,8 +1348,10 @@ public class CuasMotion {
			max_targets = (int) gd1.getNextNumber();
			
			
			tx =    Math.max(Math.min(tx, wh[0] -1), 0);
			ty =    Math.max(Math.min(ty, wh[1] -1), 0);
			tx0 =     Math.max(Math.min(tx0, wh[0] -1), 0);
			ty0 =     Math.max(Math.min(ty0, wh[1] -1), 0);
			twidth = Math.max(Math.min(twidth, wh[0] - tx0), 1);
			theight =Math.max(Math.min(theight, wh[1] - ty0), 1);
			nseq0 =  Math.max(Math.min(nseq0, multi_targets.length -1), 0);
			nseq1 =  Math.max(Math.min(nseq1, multi_targets.length -1), nseq0);
			npar =   Math.max(Math.min(npar, num_pars -1), -extra_choices.length);
@@ -1351,13 +1360,33 @@ public class CuasMotion {
			switch (mode) {
			case ANLZ_SECT:
				System.out.println("Displaying scenes from "+nseq0+" to "+nseq1+", parameter: "+choices[npar+extra_choices.length]); // CuasMotionLMA.LMA_TITLES
				System.out.println("tx="+tx+", ty="+ty);
				int ntile = tx + ty * wh[0];		
				System.out.println("tx="+tx0+", ty="+ty0+", twidth="+twidth+", theight="+theight);
//				int ntile = tx0 + ty0 * wh[0];
				
				for (int nseq = nseq0; nseq <= nseq1; nseq++) {
					boolean has_targets = (multi_targets[nseq] != null) && (multi_targets[nseq][ntile] != null) && (multi_targets[nseq][ntile].length > 0);
					boolean [][] has_targ = new boolean [theight][twidth];
					boolean has_targets = false;
					for (int ty = ty0; ty < (ty0+theight); ty++) {
						for (int tx = tx0; tx < (tx0+twidth); tx++) {
							int ntile = tx + ty * wh[0];
							has_targ[ty-ty0][tx-tx0] = (multi_targets[nseq] != null) &&
									(multi_targets[nseq][ntile] != null) &&
									(multi_targets[nseq][ntile].length > 0);
							has_targets |= has_targ[ty-ty0][tx-tx0];   
						}
					}
					if (has_targets || !skip_empty) {
						System.out.print(String.format("%17s, %4d, ",pvf_titles[0][nseq],nseq));
						if (has_targets) {
						for (int ty = ty0; ty < (ty0+theight); ty++) {
							for (int tx = tx0; tx < (tx0+twidth); tx++) {
								int ntile = tx + ty * wh[0];
//								boolean has_targets = (multi_targets[nseq] != null) && (multi_targets[nseq][ntile] != null) && (multi_targets[nseq][ntile].length > 0);
								if (has_targ[ty-ty0][tx-tx0] || !skip_empty) {
									if ((theight * twidth) > 1) {
										System.out.print(String.format("%5s,%2d:%2d, ",ntile,tx,ty));			
									}
//									System.out.print(String.format("%17s, %4d, ",pvf_titles[0][nseq],nseq));
									if (has_targ[ty-ty0][tx-tx0]) {
										int num_targ = multi_targets[nseq][ntile].length;
										for (int ntarg = 0; ntarg < num_targ; ntarg++) {
											switch (npar) {
@@ -1391,8 +1420,12 @@ public class CuasMotion {
											default:
												System.out.print(String.format("%"+fw+"f",multi_targets[nseq][ntile][ntarg][npar]));
											}
								if (ntarg < (num_targ-1)) {
//											if (ntarg < (num_targ-1)) {
												System.out.print(", ");
//											}
										}
									}
//									System.out.println();
								}
							}
						}
@@ -1406,7 +1439,8 @@ public class CuasMotion {
			case ANLZ_EQ:      // list tiles with targets with parameter equal (such as FAILURE==0)
			case ANLZ_GE:      // list tiles with targets with parameter >= value (such as AMPLITUDE >= 1.0)
			case ANLZ_LE:      // list tiles with targets with parameter <= value (such as RMSE <= 0.5)
				System.out.print("\nLooking for tiles in each scene from "+nseq0+" to "+nseq1);
				System.out.print("\nLooking for tiles in each scene from "+nseq0+" to "+nseq1+
						", "+tx0+"<=tx<="+(tx0 + twidth-1)+", "+ty0+"<=ty<="+(ty0 + theight-1));
				switch (mode) {
				case ANLZ_NEMPTY:  System.out.print(" that contain at least one target"); break;
				case ANLZ_DEFINED: System.out.print(" that contain at least one target with non-NaN "+choices[npar+extra_choices.length]+" value"); break;
@@ -1427,7 +1461,9 @@ public class CuasMotion {
				}
				for (int nseq = nseq0; nseq <= nseq1; nseq++) {
					ArrayList<Integer> tiles_list = new ArrayList<Integer>();
					for (ntile = 0; ntile < num_tiles; ntile++){
					for (int ty = ty0; ty < (ty0+theight); ty++) {
						for (int tx = tx0; tx < (tx0+twidth); tx++) {
							int ntile = tx + ty * wh[0];
							boolean has_targets = (multi_targets[nseq] != null) &&
									(multi_targets[nseq][ntile] != null) &&
									(multi_targets[nseq][ntile].length > 0);
@@ -1469,7 +1505,9 @@ public class CuasMotion {
									}
								}
							}
					}
						} // for (int tx = tx0; tx < (tx0+twidth); tx++) {
					} // for (int ty = ty0; ty < (ty0+theight); ty++) {
					
					if (!tiles_list.isEmpty() || !skip_empty) {
						System.out.print(String.format("%17s, %4d, targets:%5d",pvf_titles[0][nseq],nseq, tiles_list.size()));
						if (!tiles_list.isEmpty()) {
@@ -1485,7 +1523,7 @@ public class CuasMotion {
						}
						System.out.println();
					}					
				}				
				} // for (int nseq = nseq0; nseq <= nseq1; nseq++)				
				break;
			} // switch (mode)
		}
@@ -7250,17 +7288,14 @@ public class CuasMotion {
		int     corr_pairs =     clt_parameters.imp.cuas_corr_pairs; // 20 (50)
		
		double  boost_pairs =    slow_mode? 1.0: clt_parameters.imp.cuas_boost_slow; //  4.0;   // if >1 and the motion vector is below tile_size/cuas_boost_slow, scale corr_pairs
		double  boost_mv_lim =   clt_parameters.imp.cuas_boost_mv_lim; // 0.2; // Do not boost if motion vector faster than this (before in code equiv 1.8 pix)  
		double  boost_mstr =     clt_parameters.imp.cuas_boost_mstr; // 0.007; // scale corr_pairs if motion strength is below  
		
//		int     precorr_ra =     clt_parameters.imp.cuas_precorr_ra; //  4 (10)
		double  boost_xstr =     clt_parameters.imp.cuas_boost_xstr; // 0.007; // scale corr_pairs if motion strength is below  
		int     corr_ra_step =   clt_parameters.imp.cuas_corr_step;  //  2 ( 2)
		double  fat_zero =       clt_parameters.imp.cuas_fat_zero;
		double  cent_radius =    clt_parameters.imp.cuas_cent_radius;
		int     n_recenter =     clt_parameters.imp.cuas_n_recenter;
		double  rstr =           clt_parameters.imp.cuas_rstr;// 0.003; //  clt_parameters.imp.rln_sngl_rstr; // FIXME: ADD
//		double  speed_min =      clt_parameters.imp.cuas_speed_min;
//		double  speed_pref =     clt_parameters.imp.cuas_speed_pref;
//		double  speed_boost =    clt_parameters.imp.cuas_speed_boost;
		boolean smooth =         clt_parameters.imp.cuas_smooth; // true;
		boolean half_step =      clt_parameters.imp.cuas_half_step; // true;
		double [][] target_frac = new double [clt_parameters.imp.cuas_target_frac.length][2];
@@ -7404,7 +7439,9 @@ public class CuasMotion {
					 target_sequence,       // final double [][][] target_sequence,
					 target_sequence_boost, // final double [][][] target_boosted,
					 boost_pairs,           // final double        boost_slow, // 4.0;
					 boost_mv_lim,          // final double        boost_mv_lim, 1.5-1.8        
					 boost_mstr,            // final double        boost_mstr,
					 boost_xstr,            // final double        boost_xstr, // 0.2 
					 debugLevel);           // final int           debugLevel)
			 
				if (corr2d_save_show) { // may be read to re-process with vector field
@@ -7495,20 +7532,24 @@ public class CuasMotion {
	 * @param target_sequence target sequence with only motion vectors defined for specified number of correlation pairs
	 * @param target_boosted same for increased number of correlation
	 * @param boost_slow use boosted if motion vector is smaller than this
	 * @param boost_mv_lim Do not boost if faster  
	 * @param boost_mstr use boosted if motion vector strength is smaller than this
	 * @param boost_xstr never boost if stronger  
	 * @param debugLevel debug level
	 */
	public static void combineSlowBoosted(
			 final double [][][] target_sequence,
			 final double [][][] target_boosted,
			 final double        boost_slow, // 4.0;
			 final double        boost_mv_lim,
			 final double        boost_mstr,
			 final double        boost_xstr, 
			 final int           debugLevel) {
		if (boost_slow >1) {
			final Thread[] threads = ImageDtt.newThreadArray();
			final AtomicInteger ai = new AtomicInteger(0);
			final double max_v = 0.9 * GPUTileProcessor.DTT_SIZE / boost_slow;
			final double max_v2 = max_v * max_v;
//			final double max_v = 0.9 * GPUTileProcessor.DTT_SIZE / boost_slow;
			final double max_v2 = boost_mv_lim * boost_mv_lim; // max_v * max_v;
			if (debugLevel > -4) {
				System.out.println("combineSlowBoosted(): boost_slow="+boost_slow+", boost_mstr="+boost_mstr+", max_v2="+max_v2);
			}
@@ -7524,9 +7565,9 @@ public class CuasMotion {
										target[ntile] = target_b[ntile];
									} else {
										boolean replace = false;
										if (!(target[ntile][CuasMotionLMA.RSLT_VSTR] >= boost_mstr)) {
										if (!(target[ntile][CuasMotionLMA.RSLT_VSTR] >= boost_mstr)) { // boost all weak MV
											replace = true;
										} else {
										} else if (!(target[ntile][CuasMotionLMA.RSLT_VSTR] > boost_xstr)){ // do not boost strong MV
											double vx = target[ntile][CuasMotionLMA.RSLT_VX];
											double vy = target[ntile][CuasMotionLMA.RSLT_VY];
											double vv = vx*vx+vy*vy;
@@ -8201,6 +8242,9 @@ public class CuasMotion {
			// Calculate both centroid and LMA target parametes, return both
			// targets_new will contain motion vectors, centroid, and LMA results combined
			//save_filtered_high
			
			
			
			float [][] accum_debug = save_filtered_high? new float [num_corr_samples][]:null; //fpixels_accumulated.length]
			boolean    keep_failed = false; // keep failed targets
			double [][][][] targets_new_multi = 	getAccumulatedCoordinatesMulti(
+55 −3
Original line number Diff line number Diff line
@@ -794,8 +794,10 @@ min_str_neib_fpn 0.35
    public boolean  cuas_smooth =        true;    // used cosine window when averaging correlations
    public int      cuas_corr_pairs =     20;     // number of correlation pairs to accumulate
    public double   cuas_boost_slow =      4.0;   // if >1 and the motion vector is below tile_size/cuas_boost_slow, scale corr_pairs
    public double   cuas_boost_mv_lim =    1.8;   // Do not boost if motion vector faster than this (before in code equiv 1.8 pix)
    public double   cuas_boost_accum =     4.0;   // if >1 increase tracking camera exposure (TODO: conditional / compete)  
    public double   cuas_boost_mstr =      0.007; // scale corr_pairs if motion strength is below  
    public double   cuas_boost_xstr =      0.2;   // never scale if stronger  
    public int      cuas_corr_offset =     5;     // offset between motion detection pairs
    public boolean  cuas_gaussian_ra =   true;    // use gaussian temporal Gaussian instead of running average
    public int      cuas_temporal_um =    100;    // temporal "unsharp mask" - subtract running
@@ -808,6 +810,13 @@ min_str_neib_fpn 0.35
    public int      cuas_max_range =       2;     // how far to extend local max: 1 3x3 neighbors, 2 - 5x5 neighbs
    public int      cuas_fin_range =       2;     // for final filtering
    public int      cuas_num_cycles =     25;     // number of cycles of testing and removing bad targets // will get out earlier
    
    // Recalculate Motion Vectors before centered \"tracking camera\"
    public boolean  cuas_recalc_mv =      true;   // Recalculate motion vectors before centered targets accumulation by masking far-from target areas
    public double   cuas_recalc_mv_boost = 4.0;   // Scale default number of correlation pairs for motion vectors calculation
    public double   cuas_recalc_mv_r0 =    2.0;   // Masking window parameters: for r <= r0, w = 1.0
    public double   cuas_recalc_mv_r1 =    6.0;   // Masking window parameters: for r >= r1, w = 0.0, r0<r<r1: w = 0.5*(cos(PI*(r-r0)/(r1-r0))+1)
    
    public int      cuas_mul_samples =     3;     // multiply number of samples in slow mode 
    public int      cuas_mul_offset =      5;     // multiply correlation offset in slow mode 
    
@@ -2689,10 +2698,14 @@ min_str_neib_fpn 0.35
				"The number of correlation pairs to accumulate.");
		gd.addNumericField("Boost pairs for slow targets",           this.cuas_boost_slow, 5,8,"",
				"If >1 and the motion vector is below tile_size/cuas_boost_slow, scale corr_pairs.");
		gd.addNumericField("Maximal MV to boost",                    this.cuas_boost_mv_lim, 5,8,"",
				"Do not boost if motion vector faster than this (before in code equiv 1.8 pix).");
		gd.addNumericField("Increase tracking camera exposure",      this.cuas_boost_accum, 5,8,"",
				"If >1 increase tracking camera exposure (later - conditional).");
		gd.addNumericField("Boost pairs for weak targets",           this.cuas_boost_mstr, 5,8,"",
				"Scale corr_pairs if motion strength is below.");
				"Scale corr_pairs if motion strength is below, regardless of speed.");
		gd.addNumericField("Never boost stronger",                   this.cuas_boost_xstr, 5,8,"",
				"Do not boost strong non-boosted, if confidence is higher.");
		gd.addNumericField("Pairs offset",                           this.cuas_corr_offset, 0,3,"scenes",
				"Offset between the correlation pairs");
		gd.addCheckbox    ("Gaussian instead of Running Average",    this.cuas_gaussian_ra,
@@ -2715,6 +2728,16 @@ min_str_neib_fpn 0.35
		gd.addNumericField("Number of enhancement cycles",           this.cuas_num_cycles, 0,3,"",
				"Number of cycles of testing and removing bad targets from compoetition with weaker neighbors.");
		gd.addMessage("=== Recalculate Motion Vectors before centered \"tracking camera\" ===");
		gd.addCheckbox    ("Refine motion vectors",                 this.cuas_recalc_mv,
				"Recalculate motion vectors before centered targets accumulation by masking far-from target areas.");
		gd.addNumericField("Boost number of correlation pairs",      this.cuas_recalc_mv_boost, 5,8,"x",
				"Scale default number of correlation pairs for motion vectors calculation.");
		gd.addNumericField("Center selection window R0 (inner)",     this.cuas_recalc_mv_r0, 5,8,"pix",
				"Masking window parameters: for r <= r0, w = 1.0");
		gd.addNumericField("Center selection window R1 (outer)",     this.cuas_recalc_mv_r1, 5,8,"pix",
				"Masking window parameters: for r >= r1, w = 0.0, r0<r<r1: w = 0.5*(cos(PI*(r-r0)/(r1-r0))+1).");
		
		gd.addMessage("=== Scale correlation parameters while detecting slow targets ===");
		gd.addNumericField("Scale number of correlation samples",    this.cuas_mul_samples, 0,3,"",
				"Multiply number of samples in slow mode, keep center.");
@@ -4349,8 +4372,10 @@ min_str_neib_fpn 0.35
		this.cuas_smooth =              gd.getNextBoolean();   
		this.cuas_corr_pairs =    (int) gd.getNextNumber();
		this.cuas_boost_slow =          gd.getNextNumber();
		this.cuas_boost_mv_lim =        gd.getNextNumber();
		this.cuas_boost_accum =         gd.getNextNumber();
		this.cuas_boost_mstr =          gd.getNextNumber();
		this.cuas_boost_xstr =          gd.getNextNumber();
		this.cuas_corr_offset =   (int) gd.getNextNumber();
		this.cuas_gaussian_ra =         gd.getNextBoolean();
		this.cuas_temporal_um =   (int) gd.getNextNumber();
@@ -4364,6 +4389,11 @@ min_str_neib_fpn 0.35
		this.cuas_fin_range =     (int) gd.getNextNumber();
		this.cuas_num_cycles =    (int) gd.getNextNumber();
		this.cuas_recalc_mv =           gd.getNextBoolean();
		this.cuas_recalc_mv_boost =     gd.getNextNumber();
		this.cuas_recalc_mv_r0 =        gd.getNextNumber();
		this.cuas_recalc_mv_r1 =        gd.getNextNumber();
		
		this.cuas_mul_samples =   (int) gd.getNextNumber();
		this.cuas_mul_offset =    (int) gd.getNextNumber();
		
@@ -5649,8 +5679,10 @@ min_str_neib_fpn 0.35
        properties.setProperty(prefix+"cuas_smooth",          this.cuas_smooth+"");         // boolean
        properties.setProperty(prefix+"cuas_corr_pairs",      this.cuas_corr_pairs+"");     // int
		properties.setProperty(prefix+"cuas_boost_slow",      this.cuas_boost_slow+"");     // double
		properties.setProperty(prefix+"cuas_boost_mv_lim",    this.cuas_boost_mv_lim+"");   // double
		properties.setProperty(prefix+"cuas_boost_accum",     this.cuas_boost_accum+"");    // double
		properties.setProperty(prefix+"cuas_boost_mstr",      this.cuas_boost_mstr+"");     // double
		properties.setProperty(prefix+"cuas_boost_xstr",      this.cuas_boost_xstr+"");     // double
        properties.setProperty(prefix+"cuas_corr_offset",     this.cuas_corr_offset+"");    // int
        properties.setProperty(prefix+"cuas_gaussian_ra",     this.cuas_gaussian_ra+"");    // boolean
		properties.setProperty(prefix+"cuas_temporal_um",     this.cuas_temporal_um+"");    // int
@@ -5664,6 +5696,11 @@ min_str_neib_fpn 0.35
		properties.setProperty(prefix+"cuas_fin_range",       this.cuas_fin_range+"");      // int
		properties.setProperty(prefix+"cuas_num_cycles",      this.cuas_num_cycles+"");     // int
        properties.setProperty(prefix+"cuas_recalc_mv",       this.cuas_recalc_mv+"");      // boolean
		properties.setProperty(prefix+"cuas_recalc_mv_boost", this.cuas_recalc_mv_boost+"");// double
		properties.setProperty(prefix+"cuas_recalc_mv_r0",    this.cuas_recalc_mv_r0+"");   // double
		properties.setProperty(prefix+"cuas_recalc_mv_r1",    this.cuas_recalc_mv_r1+"");   // double
		
		properties.setProperty(prefix+"cuas_mul_samples",     this.cuas_mul_samples+"");    // int
		properties.setProperty(prefix+"cuas_mul_offset",      this.cuas_mul_offset+"");     // int
@@ -6884,8 +6921,10 @@ min_str_neib_fpn 0.35
		if (properties.getProperty(prefix+"cuas_smooth")!=null)          this.cuas_smooth=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_smooth"));
		if (properties.getProperty(prefix+"cuas_corr_pairs")!=null)      this.cuas_corr_pairs=Integer.parseInt(properties.getProperty(prefix+"cuas_corr_pairs"));
		if (properties.getProperty(prefix+"cuas_boost_slow")!=null)      this.cuas_boost_slow=Double.parseDouble(properties.getProperty(prefix+"cuas_boost_slow"));
		if (properties.getProperty(prefix+"cuas_boost_mv_lim")!=null)    this.cuas_boost_mv_lim=Double.parseDouble(properties.getProperty(prefix+"cuas_boost_mv_lim"));
		if (properties.getProperty(prefix+"cuas_boost_accum")!=null)     this.cuas_boost_accum=Double.parseDouble(properties.getProperty(prefix+"cuas_boost_accum"));
		if (properties.getProperty(prefix+"cuas_boost_mstr")!=null)      this.cuas_boost_mstr=Double.parseDouble(properties.getProperty(prefix+"cuas_boost_mstr"));
		if (properties.getProperty(prefix+"cuas_boost_xstr")!=null)      this.cuas_boost_xstr=Double.parseDouble(properties.getProperty(prefix+"cuas_boost_xstr"));
		if (properties.getProperty(prefix+"cuas_corr_offset")!=null)     this.cuas_corr_offset=Integer.parseInt(properties.getProperty(prefix+"cuas_corr_offset"));
		if (properties.getProperty(prefix+"cuas_gaussian_ra")!=null)     this.cuas_gaussian_ra=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_gaussian_ra"));
		if (properties.getProperty(prefix+"cuas_temporal_um")!=null)     this.cuas_temporal_um=Integer.parseInt(properties.getProperty(prefix+"cuas_temporal_um"));
@@ -6899,6 +6938,11 @@ min_str_neib_fpn 0.35
		if (properties.getProperty(prefix+"cuas_fin_range")!=null)       this.cuas_fin_range=Integer.parseInt(properties.getProperty(prefix+"cuas_fin_range"));
		if (properties.getProperty(prefix+"cuas_num_cycles")!=null)      this.cuas_num_cycles=Integer.parseInt(properties.getProperty(prefix+"cuas_num_cycles"));
		if (properties.getProperty(prefix+"cuas_recalc_mv")!=null)       this.cuas_recalc_mv=Boolean.parseBoolean(properties.getProperty(prefix+"cuas_recalc_mv"));
		if (properties.getProperty(prefix+"cuas_recalc_mv_boost")!=null) this.cuas_recalc_mv_boost=Double.parseDouble(properties.getProperty(prefix+"cuas_recalc_mv_boost"));
		if (properties.getProperty(prefix+"cuas_recalc_mv_r0")!=null)    this.cuas_recalc_mv_r0=Double.parseDouble(properties.getProperty(prefix+"cuas_recalc_mv_r0"));
		if (properties.getProperty(prefix+"cuas_recalc_mv_r1")!=null)    this.cuas_recalc_mv_r1=Double.parseDouble(properties.getProperty(prefix+"cuas_recalc_mv_r1"));
		
		if (properties.getProperty(prefix+"cuas_mul_samples")!=null)     this.cuas_mul_samples=Integer.parseInt(properties.getProperty(prefix+"cuas_mul_samples"));
		if (properties.getProperty(prefix+"cuas_mul_offset")!=null)      this.cuas_mul_offset=Integer.parseInt(properties.getProperty(prefix+"cuas_mul_offset"));
@@ -8136,8 +8180,10 @@ min_str_neib_fpn 0.35
		imp.cuas_smooth =           this.cuas_smooth;
		imp.cuas_corr_pairs =       this.cuas_corr_pairs;
		imp.cuas_boost_slow =       this.cuas_boost_slow;
		imp.cuas_boost_mv_lim =     this.cuas_boost_mv_lim;
		imp.cuas_boost_accum =      this.cuas_boost_accum;
		imp.cuas_boost_mstr =       this.cuas_boost_mstr;
		imp.cuas_boost_xstr =       this.cuas_boost_xstr;
		imp.cuas_corr_offset =      this.cuas_corr_offset;
		imp.cuas_gaussian_ra =      this.cuas_gaussian_ra;
		imp.cuas_temporal_um =      this.cuas_temporal_um;
@@ -8149,6 +8195,12 @@ min_str_neib_fpn 0.35
		imp.cuas_max_range =        this.cuas_max_range;
		imp.cuas_fin_range =        this.cuas_fin_range;
		imp.cuas_num_cycles =       this.cuas_num_cycles;
		
		imp.cuas_recalc_mv =        this.cuas_recalc_mv;
		imp.cuas_recalc_mv_boost =  this.cuas_recalc_mv_boost;
		imp.cuas_recalc_mv_r0 =     this.cuas_recalc_mv_r0;
		imp.cuas_recalc_mv_r1 =     this.cuas_recalc_mv_r1;
		
		imp.cuas_mul_samples =      this.cuas_mul_samples;
		imp.cuas_mul_offset =       this.cuas_mul_offset;
		imp.cuas_speed_min =        this.cuas_speed_min;