Commit 1a329010 authored by Andrey Filippov's avatar Andrey Filippov
Browse files

Updating Corr2dLMA to support variable number of image sensors

parent e6a1d91b
Loading
Loading
Loading
Loading
+345 −248

File changed.

Preview size limit exceeded, changes collapsed.

+52 −22
Original line number Diff line number Diff line
@@ -278,6 +278,10 @@ public class Correlation2d {
    	corr_pairs = sel.clone();
    }
    
    public int getNumSensors() {
    	return this.numSensors;
    }
    
    public void setCorrPairsFilter(double [][][][][][] clt_data, int tileY, int tileX ) { // these pairs will be correlated
    	corr_pairs_filter = new boolean [pair_start_end.length];
    	boolean [] en = new boolean [numSensors];
@@ -322,6 +326,20 @@ public class Correlation2d {
    	return cor_titles_combo;
    }
    
    public static boolean [] longToArray(long sel_bits, int num_pairs) {
    	boolean [] sel = new boolean [num_pairs];
    	for (int i = 0; i < sel.length;i++) {
    		sel[i] = (sel_bits & 1) > 0;
    		sel_bits >>= 1;
    	}
    	return sel;
    }

    public boolean [] longToArray(long sel_bits) {
    	return longToArray (sel_bits, pair_start_end.length);
    }
    
    
    /**
     * Add 2D correlation for a pair to the combined correlation tile, applying rotation/scaling
     * @param accum_tile tile for accumulation in line-scan order, same dimension as during generateResample()
@@ -1621,10 +1639,10 @@ public class Correlation2d {
    *        (1 - largest, 2 - half, 4 - quarter)
    * @return single square correlation array, same dimension as the input (now 15x15)
    */

    @Deprecated
    public double [] combineCompatiblePairs(// USED in lwir
    		double [][] correlations,
    		int         pairs_mask,
    		boolean []  pairs_mask,
        	boolean     diagonal,
        	int         baseline_scale
    		) {
@@ -1632,7 +1650,9 @@ public class Correlation2d {
    	double [] combo = new double [width * width];
    	int number_combined = 0;
    	// find diagonal/ortho and scale that determine compatible correlations
    	for (int npair = 0; npair < PAIRS.length; npair++) if ((((pairs_mask >> npair) & 1) != 0 ) && (correlations[npair]!=null) &&
    	//       			if (pairs_mask[npair] && (correlations[npair]!=null)){
//    	for (int npair = 0; npair < PAIRS.length; npair++) if ((((pairs_mask >> npair) & 1) != 0 ) && (correlations[npair]!=null) &&
    	for (int npair = 0; npair < PAIRS.length; npair++) if (pairs_mask[npair] && (correlations[npair]!=null) &&
    		(isDiagonalPair(npair) == diagonal) && (PAIRS[npair][3] == baseline_scale)){
    		if (isHorizontalPair(npair) || isDiagonalMainPair(npair)) {
    			for (int i = 0; i < combo.length; i++) combo[i]+= correlations[npair][i];
@@ -1662,9 +1682,10 @@ public class Correlation2d {
     *        (1 - largest, 2 - half, 4 - quarter)
     * @return {number of compatible pairs among the selection, index of the base pair}
     */
    @Deprecated
    public int [] getNumberBaseOfCompatiblePairs(// USED in lwir
    		double [][] correlations,
    		int         pairs_mask,
    		boolean []  pairs_mask,
        	boolean     diagonal,
        	int         baseline_scale
    		) {
@@ -1674,7 +1695,8 @@ public class Correlation2d {
    	for (int npair = 0; npair < PAIRS.length; npair++) {
    		if ((isDiagonalPair(npair) == diagonal) && (PAIRS[npair][3] == baseline_scale)){
    			if (base_pair < 0) base_pair = npair;
    			if ((((pairs_mask >> npair) & 1) != 0 ) && (correlations[npair]!=null)){
//    			if ((((pairs_mask >> npair) & 1) != 0 ) && (correlations[npair]!=null)){
       			if (pairs_mask[npair] && (correlations[npair]!=null)){
    				number_combined++;
    			}
    		}
@@ -2795,7 +2817,7 @@ public class Correlation2d {
    		Correlations2dLMA lma=corrLMA(
    				imgdtt_params, // ImageDttParameters  imgdtt_params,
    				corrs,         // double [][]         corrs,
    				this_mask,     // int                 pair_mask, // which pairs to process
    				longToArray(this_mask), //this_mask,     // int                 pair_mask, // which pairs to process
    				true,          // boolean             run_poly_instead, // true - run LMA, false - run 2d polynomial approximation
    				xcenter,       // double              xcenter,   // preliminary center x in pixels for largest baseline
    				vasw_pwr,      // double              vasw_pwr,  // value as weight to this power,
@@ -2946,7 +2968,7 @@ public class Correlation2d {
    			Correlations2dLMA lma=corrLMA(
    					imgdtt_params, // ImageDttParameters  imgdtt_params,
    					corrs,         // double [][]         corrs,
    		    		this_mask,     // int                 pair_mask, // which pairs to process
    					longToArray(this_mask), // this_mask,     // int                 pair_mask, // which pairs to process
    		    		false,         // boolean             run_poly_instead, // true - run LMA, false - run 2d polynomial approximation
    		    		xcenter,       // double              xcenter,   // preliminary center x in pixels for largest baseline
    		    		vasw_pwr,      // double              vasw_pwr,  // value as weight to this power,
@@ -3141,7 +3163,7 @@ public class Correlation2d {
    		double [][][]       corrs, // per tile, per pair, 2 correlation in line-scan order
    		double [][][]       disp_dist, // per tile, per camera disparity matrix as a 1d (linescan order)
    		double [][]         rXY, // non-distorted X,Y offset per nominal pixel of disparity
    		int                 pair_mask, // which pairs to process
    		boolean []          pair_mask, // which pairs to process
    		double[][]          disp_str,   // -preliminary center x in pixels for largest baseline
    		double              vasw_pwr,  // value as weight to this power,
    		int                 debug_level,
@@ -3165,6 +3187,7 @@ public class Correlation2d {
    	}
    		Corr2dLMA lma = new Corr2dLMA(
    			corrs.length,
				this, // Correlation2d correlation2d,
    			transform_size,
    			corr_wnd,
    			rXY, //double [][] rXY, // non-distorted X,Y offset per nominal pixel of disparity
@@ -3194,8 +3217,8 @@ public class Correlation2d {
    			((disp_str == null) || ((disp_str[ntile] != null) && (disp_str[ntile][1] > 0.0)))){
    		double[][] corr = new double[corrs[ntile].length][];
    		double [][] filtWeight = new double [corrs[ntile].length][];
//    		blur_max[ntile] = new double [corrs[ntile].length];
    		for (int npair = 0; npair < corrs[ntile].length; npair++) if ((corrs[ntile][npair] != null) && (((pair_mask >> npair) & 1) !=0)){
//    		for (int npair = 0; npair < corrs[ntile].length; npair++) if ((corrs[ntile][npair] != null) && (((pair_mask >> npair) & 1) !=0)){
       		for (int npair = 0; npair < corrs[ntile].length; npair++) if ((corrs[ntile][npair] != null) && (pair_mask[npair])){
    			corr[npair] = corrs[ntile][npair].clone();
    			if (corr_wnd_inv_limited != null) {
    				for (int i = 0; i < corr.length; i++) {
@@ -3253,8 +3276,8 @@ public class Correlation2d {
    		// numpairs
    		if (numpairs >= imgdtt_params.cnvx_min_pairs) {
    			for (int npair = 0; npair < corrs[ntile].length; npair++) if (filtWeight[npair] != null){
    				int fcam = PAIRS[npair][0];
    				int scam = PAIRS[npair][1];
//    				int fcam = PAIRS[npair][0];
//    				int scam = PAIRS[npair][1];
    				for (int i = 1; i < filtWeight[npair].length; i++) if (filtWeight[npair][i] > 0.0) {
    					int ix = i % corr_size; // >=0
    					int iy = i / corr_size; // >=0
@@ -3265,8 +3288,9 @@ public class Correlation2d {
    					}
    					lma.addSample( // x = 0, y=0 - center
    							ntile, // tile
    							fcam,  // int    fcam, // first  camera index
    							scam,  // int    scam, // second camera index
    							npair,
//    							fcam,  // int    fcam, // first  camera index
//    							scam,  // int    scam, // second camera index
    							ix,    // int    x,      // x coordinate on the common scale (corresponding to the largest baseline), along the disparity axis
    							iy,    // int    y,      // y coordinate (0 - disparity axis)
    							v,     // double v,       // correlation value at that point
@@ -3390,6 +3414,7 @@ public class Correlation2d {
    				} else { // have to restart LMA initialization
    					lma = new Corr2dLMA(
    							corrs.length,
    							this, // 				Correlation2d correlation2d,
    							transform_size,
    							corr_wnd,
    							rXY, //double [][] rXY, // non-distorted X,Y offset per nominal pixel of disparity
@@ -3540,7 +3565,7 @@ public class Correlation2d {
    		double [][]         corrs,
    		double [][]         disp_dist, // per camera disparity matrix as a 1d (linescan order)
    		double [][]         rXY, // non-distorted X,Y offset per nominal pixel of disparity
    		int                 pair_mask, // which pairs to process
    		boolean []          pair_mask, // which pairs to process
    		double[]            disp_str,   // -preliminary center x in pixels for largest baseline
    		double[]            poly_ds,    // null or pair of disparity/strength
    		double              vasw_pwr,  // value as weight to this power,
@@ -3564,6 +3589,7 @@ public class Correlation2d {
    	int corr_size = 2 * transform_size - 1;
    	Corr2dLMA lma = new Corr2dLMA(
    			1,
				this, // Correlation2d correlation2d,
    			transform_size,
    			corr_wnd,
    			rXY,                       //double [][] rXY, // non-distorted X,Y offset per nominal pixel of disparity
@@ -3584,7 +3610,9 @@ public class Correlation2d {
    	}


    	for (int npair = 0; npair < corrs.length; npair++) if ((corrs[npair] != null) && (((pair_mask >> npair) & 1) !=0)){
//    	for (int npair = 0; npair < corrs.length; npair++) if ((corrs[npair] != null) && (((pair_mask >> npair) & 1) !=0)){
   		for (int npair = 0; npair < corrs.length; npair++) if ((corrs[npair] != null) && (pair_mask[npair])){
    		
//    		double[] corr = corrs[npair].clone();
    		double [] corr_blur = corrs[npair].clone();
    		if (corr_wnd_inv_limited != null) {
@@ -3620,8 +3648,8 @@ public class Correlation2d {

    	    // Normalize weight for each pair to compensate for different number of convex samples?

    	    int fcam = PAIRS[npair][0];
    	    int scam = PAIRS[npair][1];
//    	    int fcam = PAIRS[npair][0];
//    	    int scam = PAIRS[npair][1];
    	    for (int i = 1; i < filtWeight.length; i++) if (filtWeight[i] > 0.0) {
    	    	int ix = i % corr_size; // >=0
    	    	int iy = i / corr_size; // >=0
@@ -3633,8 +3661,9 @@ public class Correlation2d {
//    	        if (v > blur_max[npair]) blur_max[npair] = v;
    	    	lma.addSample( // x = 0, y=0 - center
    	    			0,    // tile
    	    			fcam, // int    fcam,  // first  camera index
    	    			scam, // int    scam,  // second camera index
    	    			npair,
//    	    			fcam, // int    fcam,  // first  camera index
//   	    			scam, // int    scam,  // second camera index
    	    			ix,   // int    x,     // x coordinate on the common scale (corresponding to the largest baseline), along the disparity axis
    	    			iy,   // int    y,     // y coordinate (0 - disparity axis)
    	    			v,    // double v,     // correlation value at that point
@@ -3816,7 +3845,8 @@ public class Correlation2d {
    public Correlations2dLMA corrLMA( // USED in lwir
    		ImageDttParameters  imgdtt_params,
    		double [][]         corrs,
    		int                 pair_mask, // which pairs to process
//    		int                 pair_mask, // which pairs to process
    		boolean []          pair_mask, // which pairs to process
    		boolean             run_poly_instead, // true - run LMA, false - run 2d polynomial approximation
    		double              xcenter,   // preliminary center x in pixels for largest baseline
    		double              vasw_pwr,  // value as weight to this power,
@@ -3967,7 +3997,7 @@ public class Correlation2d {
    		ImageDttParameters  imgdtt_params,
    		double [][]         disparity_distortions, // {d_disp/dx, d_ndisp/dx, d_disp/dy, d_ndisp/dy} for each camera
    		double [][]         corrs,
    		int                 pair_mask, // which pairs to process
    		boolean[]           pair_mask, // which pairs to process
    		boolean             run_poly_instead, // true - run LMA, false - run 2d polynomial approximation
    		double              xcenter,   // preliminary center x in pixels for largest baseline
    		double              vasw_pwr,  // value as weight to this power,
+4 −4
Original line number Diff line number Diff line
@@ -2591,7 +2591,7 @@ public class ImageDtt extends ImageDttCPU {
					lma = corr2d.corrLMA(
							imgdtt_params,                // ImageDttParameters  imgdtt_params,
							fake_corrs,                   // double [][]         corrs,
							0x11, // imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
							corr2d.longToArray(0x11), // 0x11, // imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
							false,                        // boolean             run_poly_instead, // true - run LMA, false - run 2d polynomial approximation
							corr_stat[0],                 // double    xcenter,   // preliminary center x in pixels for largest baseline
							imgdtt_params.ortho_vasw_pwr, // double    vasw_pwr,  // value as weight to this power,
@@ -2602,7 +2602,7 @@ public class ImageDtt extends ImageDttCPU {
					lma = corr2d.corrLMA(
							imgdtt_params,                // ImageDttParameters  imgdtt_params,
							corrs,                        // double [][]         corrs,
							used_pairs, // imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
							corr2d.longToArray(used_pairs), // used_pairs, // imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
							false,                        // boolean             run_poly_instead, // true - run LMA, false - run 2d polynomial approximation
							corr_stat[0],                 // double    xcenter,   // preliminary center x in pixels for largest baseline
							imgdtt_params.ortho_vasw_pwr, // double    vasw_pwr,  // value as weight to this power,
@@ -3253,7 +3253,7 @@ public class ImageDtt extends ImageDttCPU {
								corrs,                        // double [][]         corrs,
								tile_disp_dist,
								rXY,                          // double [][]         rXY, // non-distorted X,Y offset per nominal pixel of disparity
								imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
								corr2d.longToArray(imgdtt_params.dbg_pair_mask), // imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
								null,                         // disp_str[cTile],  //corr_stat[0],                 // double    xcenter,   // preliminary center x in pixels for largest baseline
								poly_disp,                    // double[]            poly_ds,    // null or pair of disparity/strength
								imgdtt_params.ortho_vasw_pwr, // double    vasw_pwr,  // value as weight to this power,
@@ -3571,7 +3571,7 @@ public class ImageDtt extends ImageDttCPU {
								corrs,                        // double [][]         corrs,
								tile_disp_dist,
								rXY,                          // double [][]         rXY, // non-distorted X,Y offset per nominal pixel of disparity
								imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
								corr2d.longToArray(imgdtt_params.dbg_pair_mask), // imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
								null,                         // disp_str[cTile],  //corr_stat[0],                 // double    xcenter,   // preliminary center x in pixels for largest baseline
								poly_disp,                    // double[]            poly_ds,    // null or pair of disparity/strength
								imgdtt_params.ortho_vasw_pwr, // double    vasw_pwr,  // value as weight to this power,
+20 −15
Original line number Diff line number Diff line
@@ -2266,7 +2266,7 @@ public class ImageDttCPU {
													corrs[cTile],                        // double [][]         corrs,
													disp_dist[cTile],
													rXY,                          // double [][]         rXY, // non-distorted X,Y offset per nominal pixel of disparity
													imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
													corr2d.longToArray(imgdtt_params.dbg_pair_mask), // imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
													null,                         // disp_str[cTile],  //corr_stat[0],                 // double    xcenter,   // preliminary center x in pixels for largest baseline
													poly_disp,                    // double[]            poly_ds,    // null or pair of disparity/strength
													imgdtt_params.ortho_vasw_pwr, // double    vasw_pwr,  // value as weight to this power,
@@ -2322,7 +2322,7 @@ public class ImageDttCPU {
									corrs, // [tIndex],                        // double [][]         corrs,
									disp_dist, // [tIndex],
									rXY,                          // double [][]         rXY, // non-distorted X,Y offset per nominal pixel of disparity
									imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
									corr2d.longToArray(imgdtt_params.dbg_pair_mask), // imgdtt_params.dbg_pair_mask  // int                 pair_mask, // which pairs to process
									disp_str, // corr_stat,                    // double[][]    xcenter_str,   // preliminary center x in pixels for largest baseline
									imgdtt_params.ortho_vasw_pwr, // double    vasw_pwr,  // value as weight to this power,
									clust_lma_debug_level + 0, // 2,    // int                 debug_level, // for a single cluster
@@ -3348,7 +3348,6 @@ public class ImageDttCPU {
								}
								*/
							}
							/*
							// proceed only if CM correlation result is non-null // for compatibility with old code we need it to run regardless of the strength of the normal correlation
							if (corr_stat != null) {
// skipping DISPARITY_VARIATIONS_INDEX - it was not used
@@ -3359,19 +3358,20 @@ public class ImageDttCPU {
								}
								// debug new LMA correlations
								if (debugTile) {
								if (debugTile0) { // should be debugTile
									System.out.println("Will run new LMA for tileX="+tileX+", tileY="+tileY);
									double [] poly_disp = {Double.NaN, 0.0};
							    	Corr2dLMA lma2 = corr2d.corrLMA2Single(
							    	Corr2dLMA lma2 = correlation2d.corrLMA2Single(
							    			imgdtt_params,                // ImageDttParameters  imgdtt_params,
								    		false,                        // boolean             adjust_ly, // adjust Lazy Eye
							    			corr_wnd,                     // double [][]         corr_wnd, // correlation window to save on re-calculation of the window
							    			corr_wnd_inv_limited,         // corr_wnd_limited, // correlation window, limited not to be smaller than threshold - used for finding max/convex areas (or null)
							    			corrs,                        // double [][]         corrs,
							    			corr_tiles, // corrs,          // double [][]         corrs,
							    			disp_dist,
											rXY,                          // double [][]         rXY, // non-distorted X,Y offset per nominal pixel of disparity
							    			imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
											// all that are not null in corr_tiles
											correlation2d.selectAll(),   // longToArray(imgdtt_params.dbg_pair_mask),  // int                 pair_mask, // which pairs to process
							    			disp_str,  //corr_stat[0],                 // double    xcenter,   // preliminary center x in pixels for largest baseline
											poly_disp,                    // double[]            poly_ds,    // null or pair of disparity/strength
							    			imgdtt_params.ortho_vasw_pwr, // double    vasw_pwr,  // value as weight to this power,
@@ -3393,6 +3393,8 @@ public class ImageDttCPU {
							    	}
								}
								
								/*
//								disparity_map[DISPARITY_INDEX_CM + 1][tIndex] = // y not available here
								// calculate/fill out hor and vert
								// convert to multi-baseline combining results from several integer scales
@@ -3605,7 +3607,9 @@ public class ImageDttCPU {
										}
							    	}
								}
								*/
							} // end of if (corr_stat != null)
							/*
							if      (corr_mode == 0) extra_disparity = disparity_map[DISPARITY_INDEX_INT][tIndex];
							else if (corr_mode == 1) extra_disparity = disparity_map[DISPARITY_INDEX_CM][tIndex];
							else if (corr_mode == 2) extra_disparity = disparity_map[DISPARITY_INDEX_POLY][tIndex];
@@ -6973,12 +6977,13 @@ public class ImageDttCPU {
				// create LMA instance, calculate LMA composite argmax
				// Create 2 groups: ortho & diag
				Correlations2dLMA lma;
				int num_pairs = (quad * (quad-1)) / 2;
				if (imgdtt_params.pcorr_use) { // new group phase correlation
					double [][] fake_corrs = {corrs[6],null,null,null,corrs[7],null};
					lma = corr2d.corrLMA(
							imgdtt_params,                // ImageDttParameters  imgdtt_params,
							fake_corrs,                   // double [][]         corrs,
							0x11, // imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
							corr2d.longToArray(0x11), // imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
							false,                        // boolean             run_poly_instead, // true - run LMA, false - run 2d polynomial approximation
							corr_stat[0],                 // double    xcenter,   // preliminary center x in pixels for largest baseline
							imgdtt_params.ortho_vasw_pwr, // double    vasw_pwr,  // value as weight to this power,
@@ -6989,7 +6994,7 @@ public class ImageDttCPU {
					lma = corr2d.corrLMA(
							imgdtt_params,                // ImageDttParameters  imgdtt_params,
							corrs,                        // double [][]         corrs,
							used_pairs, // imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
							corr2d.longToArray(used_pairs), // used_pairs, // imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
							false,                        // boolean             run_poly_instead, // true - run LMA, false - run 2d polynomial approximation
							corr_stat[0],                 // double    xcenter,   // preliminary center x in pixels for largest baseline
							imgdtt_params.ortho_vasw_pwr, // double    vasw_pwr,  // value as weight to this power,
@@ -9822,7 +9827,7 @@ public class ImageDttCPU {
		    	Correlations2dLMA lma = corr2d.corrLMA(
		    			clt_parameters.img_dtt,                // ImageDttParameters  clt_parameters.img_dtt,
		    			corrs,                        // double [][]         corrs,
		    			clt_parameters.img_dtt.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
		    			corr2d.longToArray(clt_parameters.img_dtt.dbg_pair_mask), // clt_parameters.img_dtt.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
		        		false,                        // boolean             run_poly_instead, // true - run LMA, false - run 2d polynomial approximation
		    			corr_stat[0],                 // double    xcenter,   // preliminary center x in pixels for largest baseline
		    			clt_parameters.img_dtt.ortho_vasw_pwr, // double    vasw_pwr,  // value as weight to this power,
@@ -13391,7 +13396,7 @@ public class ImageDttCPU {
							    			corrs,                        // double [][]         corrs,
							    			disp_dist,
											rXY,                          // double [][]         rXY, // non-distorted X,Y offset per nominal pixel of disparity
							    			imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
											corr2d.longToArray(imgdtt_params.dbg_pair_mask), // imgdtt_params.dbg_pair_mask  // int                 pair_mask, // which pairs to process
							    			disp_str,  //corr_stat[0],                 // double    xcenter,   // preliminary center x in pixels for largest baseline
											poly_disp,                    // double[]            poly_ds,    // null or pair of disparity/strength
							    			imgdtt_params.ortho_vasw_pwr, // double    vasw_pwr,  // value as weight to this power,
@@ -13427,7 +13432,7 @@ public class ImageDttCPU {
										lma = corr2d.corrLMA(
								    			imgdtt_params,                // ImageDttParameters  imgdtt_params,
								    			fake_corrs,                   // double [][]         corrs,
								    			0x11, // imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
								    			corr2d.longToArray(0x11),     // 0x11, // imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
								        		false,                        // boolean             run_poly_instead, // true - run LMA, false - run 2d polynomial approximation
								    			corr_stat[0],                 // double    xcenter,   // preliminary center x in pixels for largest baseline
								    			imgdtt_params.ortho_vasw_pwr, // double    vasw_pwr,  // value as weight to this power,
@@ -13440,7 +13445,7 @@ public class ImageDttCPU {
										lma = corr2d.corrLMA(
								    			imgdtt_params,                // ImageDttParameters  imgdtt_params,
								    			fake_corrs,                   // double [][]         corrs,
								    			0x11, // imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
								    			corr2d.longToArray(0x11),     // 0x11, // imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
								        		false,                        // boolean             run_poly_instead, // true - run LMA, false - run 2d polynomial approximation
								    			corr_stat[0],                 // double    xcenter,   // preliminary center x in pixels for largest baseline
								    			imgdtt_params.ortho_vasw_pwr, // double    vasw_pwr,  // value as weight to this power,
@@ -13453,7 +13458,7 @@ public class ImageDttCPU {
										lma = corr2d.corrLMA(
								    			imgdtt_params,                // ImageDttParameters  imgdtt_params,
								    			corrs,                        // double [][]         corrs,
								    			imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
								    			corr2d.longToArray(imgdtt_params.dbg_pair_mask),     // imgdtt_params.dbg_pair_mask,  // int                 pair_mask, // which pairs to process
								        		false,                        // boolean             run_poly_instead, // true - run LMA, false - run 2d polynomial approximation
								    			corr_stat[0],                 // double    xcenter,   // preliminary center x in pixels for largest baseline
								    			imgdtt_params.ortho_vasw_pwr, // double    vasw_pwr,  // value as weight to this power,