Loading src/main/java/com/elphel/imagej/cameras/CLTParameters.java +74 −11 Original line number Diff line number Diff line Loading @@ -181,7 +181,15 @@ public class CLTParameters { public int ly_par_sel = 0; // Manually select the parameter mask bit 0 - sym0, bit1 - sym1, ... (0 - use checkbox selections above) public boolean ly_right_left= false; // equalize weights of right/left FoV (use with horizon in both halves and gross infinity correction) public double ly_inf_frac = 0.5; // Relative weight of infinity calibration data public int ly_per_quad = 10; // minimal tiles per quadrant (not counting the worst) tp proceed public double ly_per_quad_r = 0.01; // minimal relative tiles per quadrant (not counting the worst) tp proceed public int ly_inf = 10; // minimal number of tiles at infinity to proceed public double ly_inf_r = 0.01; // minimal relative number of tiles at infinity to proceed public int ly_inf_scale = 20; // minimal number of tiles at infinity to apply weight scaling public double ly_inf_scale_r = 0.02; // minimal relative number of tiles at infinity to apply weight scaling public double ly_inf_frac = 0.7; // Relative weight of infinity calibration data public double ly_inf_max_disparity = 0.2; // Maximal disparity to be treated as infinity when adjusting with rig data public boolean ly_inf_disp= false; // Correct disparity for infinity tiles public boolean ly_inf_force= false; // Force convergence correction during extrinsic, even with no infinity data Loading @@ -191,8 +199,14 @@ public class CLTParameters { public int ly_smpl_num = 5; // Number after removing worst (should be >1) // public double ly_meas_disp = 1.5; // Maximal measured relative disparity - using (0.8*disp_scan_step) public double ly_smpl_rms = 0.2; // 1; // Maximal RMS of the remaining tiles in a sample public double ly_disp_var = 0.5; // 2; // Maximal full disparity difference to 8 neighbors public double ly_disp_rvar = 0.02; // Maximal relative full disparity difference to 8 neighbors public double ly_disp_var = 0.1; // Maximal full disparity difference to 8 neighbors public double ly_disp_rvar = 0.01; // Maximal relative full disparity difference to 8 neighbors public double ly_disp_var_gt = 0.5; // Maximal full disparity difference to 8 neighbors when GT is available public double ly_disp_rvar_gt = 0.05; // Maximal relative full disparity difference to 8 neighbors when GT is available public double ly_norm_disp = 5.0; // Reduce weight of higher disparity tiles // Lazy eye multi-step fitting Loading Loading @@ -796,6 +810,15 @@ public class CLTParameters { return aux ? lym_change_aux : lym_change; } public int getLyPerQuad (int num_tiles) { return (int) Math.max(ly_per_quad_r * num_tiles , ly_per_quad ); } public int getLyInf (int num_tiles) { return (int) Math.max(ly_inf_r * num_tiles , ly_inf ); } public int getLyInfScale (int num_tiles) { return (int) Math.max(ly_inf_scale_r * num_tiles , ly_inf_scale ); } public CLTParameters(){} public void setProperties(String prefix,Properties properties){ Loading Loading @@ -945,6 +968,13 @@ public class CLTParameters { properties.setProperty(prefix+"ly_par_sel", this.ly_par_sel+""); properties.setProperty(prefix+"ly_right_left", this.ly_right_left+""); properties.setProperty(prefix+"ly_per_quad", this.ly_per_quad +""); properties.setProperty(prefix+"ly_per_quad_r", this.ly_per_quad_r +""); properties.setProperty(prefix+"ly_inf", this.ly_inf +""); properties.setProperty(prefix+"ly_inf_r", this.ly_inf_r +""); properties.setProperty(prefix+"ly_inf_scale", this.ly_inf_scale +""); properties.setProperty(prefix+"ly_inf_scale_r", this.ly_inf_scale_r +""); properties.setProperty(prefix+"ly_inf_frac", this.ly_inf_frac +""); properties.setProperty(prefix+"ly_inf_max_disparity", this.ly_inf_max_disparity +""); Loading @@ -957,6 +987,8 @@ public class CLTParameters { properties.setProperty(prefix+"ly_smpl_rms", this.ly_smpl_rms +""); properties.setProperty(prefix+"ly_disp_var", this.ly_disp_var +""); properties.setProperty(prefix+"ly_disp_rvar", this.ly_disp_rvar +""); properties.setProperty(prefix+"ly_disp_var_gt", this.ly_disp_var_gt +""); properties.setProperty(prefix+"ly_disp_rvar_gt", this.ly_disp_rvar_gt +""); properties.setProperty(prefix+"ly_norm_disp", this.ly_norm_disp +""); properties.setProperty(prefix+"lym_overexp", this.lym_overexp +""); properties.setProperty(prefix+"lym_update_disp", this.lym_update_disp+""); Loading Loading @@ -1653,6 +1685,13 @@ public class CLTParameters { if (properties.getProperty(prefix+"ly_par_sel")!=null) this.ly_par_sel=Integer.parseInt(properties.getProperty(prefix+"ly_par_sel")); if (properties.getProperty(prefix+"ly_right_left")!=null) this.ly_right_left=Boolean.parseBoolean(properties.getProperty(prefix+"ly_right_left")); if (properties.getProperty(prefix+"ly_per_quad")!=null) this.ly_per_quad=Integer.parseInt(properties.getProperty(prefix+"ly_per_quad")); if (properties.getProperty(prefix+"ly_per_quad_r")!=null) this.ly_per_quad_r=Double.parseDouble(properties.getProperty(prefix+"ly_per_quad_r")); if (properties.getProperty(prefix+"ly_inf")!=null) this.ly_inf=Integer.parseInt(properties.getProperty(prefix+"ly_inf")); if (properties.getProperty(prefix+"ly_inf_r")!=null) this.ly_inf_r=Double.parseDouble(properties.getProperty(prefix+"ly_inf_r")); if (properties.getProperty(prefix+"ly_inf_scale")!=null) this.ly_inf_scale=Integer.parseInt(properties.getProperty(prefix+"ly_inf_scale")); if (properties.getProperty(prefix+"ly_inf_scale_r")!=null) this.ly_inf_scale_r=Double.parseDouble(properties.getProperty(prefix+"ly_inf_scale_r")); if (properties.getProperty(prefix+"ly_inf_frac")!=null) this.ly_inf_frac=Double.parseDouble(properties.getProperty(prefix+"ly_inf_frac")); if (properties.getProperty(prefix+"ly_inf_max_disparity")!=null) this.ly_inf_max_disparity=Double.parseDouble(properties.getProperty(prefix+"ly_inf_max_disparity")); Loading @@ -1668,6 +1707,8 @@ public class CLTParameters { if (properties.getProperty(prefix+"ly_smpl_rms")!=null) this.ly_smpl_rms=Double.parseDouble(properties.getProperty(prefix+"ly_smpl_rms")); if (properties.getProperty(prefix+"ly_disp_var")!=null) this.ly_disp_var=Double.parseDouble(properties.getProperty(prefix+"ly_disp_var")); if (properties.getProperty(prefix+"ly_disp_rvar")!=null) this.ly_disp_rvar=Double.parseDouble(properties.getProperty(prefix+"ly_disp_rvar")); if (properties.getProperty(prefix+"ly_disp_var_gt")!=null) this.ly_disp_var_gt=Double.parseDouble(properties.getProperty(prefix+"ly_disp_var_gt")); if (properties.getProperty(prefix+"ly_disp_rvar_gt")!=null) this.ly_disp_rvar_gt=Double.parseDouble(properties.getProperty(prefix+"ly_disp_rvar_gt")); if (properties.getProperty(prefix+"ly_norm_disp")!=null) this.ly_norm_disp=Double.parseDouble(properties.getProperty(prefix+"ly_norm_disp")); if (properties.getProperty(prefix+"lym_overexp")!=null) this.lym_overexp=Double.parseDouble(properties.getProperty(prefix+"lym_overexp")); if (properties.getProperty(prefix+"lym_update_disp")!=null) this.lym_update_disp=Boolean.parseBoolean(properties.getProperty(prefix+"lym_update_disp")); Loading Loading @@ -2227,6 +2268,8 @@ public class CLTParameters { // GenericDialog gd = new GenericDialog("Set CLT parameters"); GenericJTabbedDialog gd = new GenericJTabbedDialog("Set CLT parameters",800,900); gd.addTab ("General", "General parameters"); gd.addNumericField("Nominal (rectilinear) disparity between side of square cameras (pix)", this.disparity, 3,7,"pix", "Used when rendering 4 images"); gd.addNumericField("Transform size (default 8)", this.transform_size, 0, 6, "pixels","Should always be 8"); gd.addNumericField("Lapped transform window type (0- rectangular, 1 - sinus)", this.clt_window, 0); gd.addNumericField("shift_x", this.shift_x, 4); Loading Loading @@ -2261,8 +2304,6 @@ public class CLTParameters { gd.addNumericField("Value (max) in vignetting data to correspond to 1x in the kernel", this.vignetting_max, 3); gd.addNumericField("Do not try to correct vignetting smaller than this fraction of max", this.vignetting_range, 3); gd.addNumericField("Kernel step in pixels (has 1 kernel margin on each side)", this.kernel_step, 0); gd.addNumericField("Nominal (rectilinear) disparity between side of square cameras (pix)", this.disparity, 3,7,"pix", "Used when rendering 4 images"); gd.addNumericField("Inverse distance to infinity (misalignment correction)", this.z_correction, 6); gd.addCheckbox ("Perform correlation", this.correlate); gd.addNumericField("Bitmask of pairs to combine in the composite (top, bottom, left,righth)", this.corr_mask, 0); Loading Loading @@ -2406,6 +2447,14 @@ public class CLTParameters { gd.addCheckbox ("Equalize weights of right/left FoV", this.ly_right_left, "Use this mode use with horizon visible in both FoV halves when gross infinity correction is needed"); gd.addNumericField("Minimal tiles per quadrant (not counting the worst) tp proceed", this.ly_per_quad, 0); gd.addNumericField("Minimal tiles per quadrant (not counting the worst) tp proceed - fraction of all tiles", this.ly_per_quad_r, 3); gd.addNumericField("Minimal number of tiles at infinity to proceed", this.ly_inf, 0); gd.addNumericField("Minimal number of tiles at infinity to proceed - fraction of all tiles", this.ly_inf_r, 3); gd.addNumericField("Minimal number of tiles at infinity to apply weight scaling", this.ly_inf_scale, 0); gd.addNumericField("Minimal number of tiles at infinity to apply weight scaling - fraction of all tiles", this.ly_inf_scale_r, 3); gd.addNumericField("Relative weight of infinity calibration data", this.ly_inf_frac, 3); gd.addNumericField("Maximal disparity to be treated as infinity when adjusting with the rig data", this.ly_inf_max_disparity, 8,3,"pix", Loading @@ -2425,6 +2474,10 @@ public class CLTParameters { "Full allowed mismatch is a sum of absolute and disparity times relative"); gd.addNumericField("Maximal relative full disparity difference to 8 neighbors", this.ly_disp_rvar, 8,5,"", "Full allowed mismatch is a sum of absolute and disparity times relative"); gd.addNumericField("Maximal full disparity difference to 8 neighbors with GT", this.ly_disp_var_gt, 8,5,"pix", "Full allowed mismatch is a sum of absolute and disparity times relative (relaxed when ground truth is available)"); gd.addNumericField("Maximal relative full disparity difference to 8 neighbors with GT", this.ly_disp_rvar_gt, 8,5,"", "Full allowed mismatch is a sum of absolute and disparity times relative (relaxed when ground truth is available)"); gd.addNumericField("Reduce weight of higher disparity tiles", this.ly_norm_disp, 5); gd.addMessage ("--- Lazy eye multi-step fitting ---"); gd.addNumericField("Any (near) saturated pixels - discard tile (see sat_level also)", this.lym_overexp, 10); Loading Loading @@ -3067,6 +3120,7 @@ public class CLTParameters { gd.showDialog(); */ if (gd.wasCanceled()) return false; this.disparity= gd.getNextNumber(); this.transform_size= (int) gd.getNextNumber(); this.clt_window= (int) gd.getNextNumber(); this.shift_x = gd.getNextNumber(); Loading Loading @@ -3099,7 +3153,6 @@ public class CLTParameters { this.vignetting_max= gd.getNextNumber(); this.vignetting_range= gd.getNextNumber(); this.kernel_step= (int) gd.getNextNumber(); this.disparity= gd.getNextNumber(); this.z_correction= gd.getNextNumber(); this.correlate= gd.getNextBoolean(); this.corr_mask= (int) gd.getNextNumber(); Loading Loading @@ -3216,6 +3269,14 @@ public class CLTParameters { this.ly_par_sel= (int) gd.getNextNumber(); this.ly_right_left= gd.getNextBoolean(); this.ly_per_quad= (int) gd.getNextNumber(); this.ly_per_quad_r= gd.getNextNumber(); this.ly_inf= (int) gd.getNextNumber(); this.ly_inf_r= gd.getNextNumber(); this.ly_inf_scale= (int) gd.getNextNumber(); this.ly_inf_scale_r= gd.getNextNumber(); this.ly_inf_frac= gd.getNextNumber(); this.ly_inf_max_disparity= gd.getNextNumber(); Loading @@ -3228,6 +3289,8 @@ public class CLTParameters { this.ly_smpl_rms= gd.getNextNumber(); this.ly_disp_var= gd.getNextNumber(); this.ly_disp_rvar= gd.getNextNumber(); this.ly_disp_var_gt= gd.getNextNumber(); this.ly_disp_rvar_gt= gd.getNextNumber(); this.ly_norm_disp= gd.getNextNumber(); this.lym_overexp= gd.getNextNumber(); this.lym_update_disp= gd.getNextBoolean(); Loading src/main/java/com/elphel/imagej/cameras/EyesisCorrectionParameters.java +16 −0 Original line number Diff line number Diff line Loading @@ -169,6 +169,7 @@ public class EyesisCorrectionParameters { public String mlDirectory="ml"; public boolean thumb_overwrite = true; public int thumb_width = 200; public int thumb_height = 100; public double thumb_h_center = 0.5; Loading Loading @@ -296,6 +297,17 @@ public class EyesisCorrectionParameters { cp.clt_batch_dsi_aux= this.clt_batch_dsi_aux; cp.clt_batch_save_extrinsics= this.clt_batch_save_extrinsics; cp.clt_batch_save_all= this.clt_batch_save_all; cp.thumb_overwrite = this.thumb_overwrite; cp.thumb_width = this.thumb_width; cp.thumb_height = this.thumb_height; cp.thumb_h_center = this.thumb_h_center; cp.thumb_v_center = this.thumb_v_center; cp.thumb_size = this.thumb_size; cp.default_rating = this.default_rating; } Loading Loading @@ -462,6 +474,7 @@ public class EyesisCorrectionParameters { properties.setProperty(prefix+"clt_batch_save_extrinsics", this.clt_batch_save_extrinsics+""); properties.setProperty(prefix+"clt_batch_save_all", this.clt_batch_save_all+""); properties.setProperty(prefix+"thumb_overwrite", this.thumb_overwrite+""); properties.setProperty(prefix+"thumb_width", this.thumb_width+""); properties.setProperty(prefix+"thumb_height", this.thumb_height+""); properties.setProperty(prefix+"thumb_h_center", this.thumb_h_center+""); Loading Loading @@ -616,6 +629,7 @@ public class EyesisCorrectionParameters { if (properties.getProperty(prefix+"clt_batch_save_extrinsics")!= null) this.clt_batch_save_extrinsics=Boolean.parseBoolean(properties.getProperty(prefix+"clt_batch_save_extrinsics")); if (properties.getProperty(prefix+"clt_batch_save_all")!= null) this.clt_batch_save_all=Boolean.parseBoolean(properties.getProperty(prefix+"clt_batch_save_all")); if (properties.getProperty(prefix+"thumb_overwrite")!= null) this.thumb_overwrite=Boolean.parseBoolean(properties.getProperty(prefix+"thumb_overwrite")); if (properties.getProperty(prefix+"thumb_width")!=null) this.thumb_width=Integer.parseInt(properties.getProperty(prefix+"thumb_width")); if (properties.getProperty(prefix+"thumb_height")!=null) this.thumb_height=Integer.parseInt(properties.getProperty(prefix+"thumb_height")); if (properties.getProperty(prefix+"thumb_h_center")!=null) this.thumb_h_center= Double.parseDouble(properties.getProperty(prefix+"thumb_h_center")); Loading Loading @@ -769,6 +783,7 @@ public class EyesisCorrectionParameters { gd.addCheckbox ("Swap top and equator images", this.swapSubchannels01); gd.addTab("Thumbnails","Thumbnail image generation"); gd.addCheckbox("Overwrite existing thumbnail images",this.thumb_overwrite); gd.addNumericField("Thumbnail image width", this.thumb_width, 0,4,"pix", ""); gd.addNumericField("Thumbnail image height", this.thumb_height, 0,4,"pix", Loading Loading @@ -871,6 +886,7 @@ public class EyesisCorrectionParameters { this.removeUnusedSensorData= gd.getNextBoolean(); this.swapSubchannels01= gd.getNextBoolean(); this.thumb_overwrite = gd.getNextBoolean(); this.thumb_width= (int) gd.getNextNumber(); this.thumb_height= (int) gd.getNextNumber(); this.thumb_h_center= gd.getNextNumber(); Loading src/main/java/com/elphel/imagej/correction/Eyesis_Correction.java +70 −18 Original line number Diff line number Diff line Loading @@ -705,6 +705,10 @@ private Panel panel1, addButton("GPU files", panelClt_GPU, color_conf_process); addButton("Rig8 gpu", panelClt_GPU, color_conf_process); addButton("ShowGPU", panelClt_GPU, color_conf_process); addButton("LWIR_TEST", panelClt_GPU, color_conf_process); addButton("LWIR_ACQUIRE", panelClt_GPU, color_conf_process); plugInFrame.add(panelClt_GPU); } if (LWIR_MODE) { Loading @@ -730,13 +734,13 @@ private Panel panel1, addButton("AUX OUT 3D", panelLWIR, color_process_aux); addButton("Main img AUX", panelLWIR, color_process_aux); addButton("Main to AUX", panelLWIR, color_process_aux); addButton("LWIR_TEST", panelLWIR, color_conf_process); addButton("LWIR_ACQUIRE", panelLWIR, color_conf_process); addButton("LWIR batch", panelClt4, color_process); // addButton("LWIR_TEST", panelLWIR, color_conf_process); // addButton("LWIR_ACQUIRE", panelLWIR, color_conf_process); plugInFrame.add(panelLWIR); } plugInFrame.pack(); //"LWIR batch" GUI.center(plugInFrame); plugInFrame.setVisible(true); FHT_INSTANCE= new DoubleFHT(); Loading Loading @@ -3960,12 +3964,6 @@ private Panel panel1, IJ.showMessage("Warning",msg); return; } /* EYESIS_CORRECTIONS.initSensorFiles(DEBUG_LEVEL, true, // true - ignore missing files true, // boolean all_sensors, COLOR_PROC_PARAMETERS.correct_vignetting); //boolean correct_vignetting */ QUAD_CLT.resetGeometryCorrection(); QUAD_CLT.initGeometryCorrection(DEBUG_LEVEL+2); Loading Loading @@ -5016,6 +5014,14 @@ private Panel panel1, batchRig(); return; /* ======================================================================== */ } else if (label.equals("LWIR batch")) { DEBUG_LEVEL=MASTER_DEBUG_LEVEL; EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL); CLT_PARAMETERS.batch_run = true; batchLwir(); return; /* ======================================================================== */ } else if (label.equals("CLT rig edit")) { DEBUG_LEVEL=MASTER_DEBUG_LEVEL; Loading Loading @@ -5464,7 +5470,7 @@ private Panel panel1, return true; } // inverted false/true in initSensorFiles(), should work with LWIR also public boolean prepareRigImages() { if (QUAD_CLT == null){ QUAD_CLT = new QuadCLT ( Loading @@ -5489,8 +5495,6 @@ private Panel panel1, System.out.println("Created new QuadCLT instance, will need to read CLT kernels"); } } // QuadCLT dbg_QUAD_CLT = QUAD_CLT; // QuadCLT dbg_QUAD_CLT_AUX = QUAD_CLT_AUX; String configPath=getSaveCongigPath(); if (configPath.equals("ABORT")) return false; if (DEBUG_LEVEL > -2){ Loading @@ -5498,15 +5502,15 @@ private Panel panel1, } EYESIS_CORRECTIONS.initSensorFiles( DEBUG_LEVEL+2, true, false, false, // true, true, // false, COLOR_PROC_PARAMETERS.correct_vignetting); //boolean correct_vignetting if (DEBUG_LEVEL > -2){ System.out.println("++++++++++++++ Running initSensorFiles for the auxiliary camera ++++++++++++++"); } EYESIS_CORRECTIONS_AUX.initSensorFiles(DEBUG_LEVEL+2, true, false, false, // true, true, // false, COLOR_PROC_PARAMETERS_AUX.correct_vignetting); //boolean correct_vignetting Loading Loading @@ -6149,6 +6153,52 @@ private Panel panel1, return true; } public boolean batchLwir() { long startTime=System.nanoTime(); // load needed sensor and kernels files if (!prepareRigImages()) return false; String configPath=getSaveCongigPath(); if (configPath.equals("ABORT")) return false; setAllProperties(PROPERTIES); // batchRig may save properties with the model. Extrinsics will be updated, others should be set here if (DEBUG_LEVEL > -2){ System.out.println("++++++++++++++ Running batch processing of dual-quad EO/LWIR camera rig ++++++++++++++"); } // parameters are different /// if (COLOR_PROC_PARAMETERS_AUX == null) { /// COLOR_PROC_PARAMETERS_AUX = COLOR_PROC_PARAMETERS.clone(); /// } try { TWO_QUAD_CLT.batchLwirRig( QUAD_CLT, // QuadCLT quadCLT_main, QUAD_CLT_AUX, // QuadCLT quadCLT_aux, CLT_PARAMETERS, // EyesisCorrectionParameters.DCTParameters dct_parameters, DEBAYER_PARAMETERS, //EyesisCorrectionParameters.DebayerParameters debayerParameters, COLOR_PROC_PARAMETERS, //EyesisCorrectionParameters.ColorProcParameters colorProcParameters, COLOR_PROC_PARAMETERS_AUX, //EyesisCorrectionParameters.ColorProcParameters colorProcParameters_aux, CHANNEL_GAINS_PARAMETERS, //CorrectionColorProc.ColorGainsParameters channelGainParameters, RGB_PARAMETERS, //EyesisCorrectionParameters.RGBParameters rgbParameters, EQUIRECTANGULAR_PARAMETERS, // EyesisCorrectionParameters.EquirectangularParameters equirectangularParameters, PROPERTIES, // Properties properties, THREADS_MAX, //final int threadsMax, // maximal number of threads to launch UPDATE_STATUS, //final boolean updateStatus, DEBUG_LEVEL); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } //final int debugLevel); if (configPath!=null) { saveTimestampedProperties( // save config again configPath, // full path or null null, // use as default directory if path==null true, PROPERTIES); } System.out.println("batchRig(): Processing finished at "+ IJ.d2s(0.000000001*(System.nanoTime()-startTime),3)+" sec, --- Free memory="+ Runtime.getRuntime().freeMemory()+" (of "+Runtime.getRuntime().totalMemory()+")"); return true; } Loading Loading @@ -6337,7 +6387,9 @@ private Panel panel1, String mask = ".*EXTRINSICS\\.corr-xml"; String full_conf_suffix = ".corr-xml"; String dsi_suffix = "-DSI_COMBO.tiff"; // String dsi_suffix = "-DSI_COMBO.tiff"; String dsi_suffix = TwoQuadCLT.DSI_COMBO_SUFFIX+".tiff"; String correction_parameters_prefix = "CORRECTION_PARAMETERS."; System.out.println("File mask = "+mask); Loading src/main/java/com/elphel/imagej/tileprocessor/AlignmentCorrection.java +156 −20 File changed.Preview size limit exceeded, changes collapsed. Show changes src/main/java/com/elphel/imagej/tileprocessor/GeometryCorrection.java +11 −4 Original line number Diff line number Diff line Loading @@ -998,6 +998,9 @@ public class GeometryCorrection { } public void showRig() { if (this.rigOffset == null) { this.rigOffset = new RigOffset(); } this.rigOffset.showRigOffsets(); } Loading Loading @@ -1401,18 +1404,22 @@ public class GeometryCorrection { public void incrementVector(double [] incr, // returns false if any component is NaN, in that case do not increment public boolean incrementVector(double [] incr, double scale) { for (int i = 0; i < incr.length; i++){ if (Double.isNaN(vector[i])) return false; } for (int i = 0; i < incr.length; i++){ vector[i]+= incr[i] * scale; } return true; } public void incrementVector(CorrVector incr, double scale) public boolean incrementVector(CorrVector incr, double scale) { incrementVector(incr.toArray(), scale); return incrementVector(incr.toArray(), scale); } @Override Loading Loading
src/main/java/com/elphel/imagej/cameras/CLTParameters.java +74 −11 Original line number Diff line number Diff line Loading @@ -181,7 +181,15 @@ public class CLTParameters { public int ly_par_sel = 0; // Manually select the parameter mask bit 0 - sym0, bit1 - sym1, ... (0 - use checkbox selections above) public boolean ly_right_left= false; // equalize weights of right/left FoV (use with horizon in both halves and gross infinity correction) public double ly_inf_frac = 0.5; // Relative weight of infinity calibration data public int ly_per_quad = 10; // minimal tiles per quadrant (not counting the worst) tp proceed public double ly_per_quad_r = 0.01; // minimal relative tiles per quadrant (not counting the worst) tp proceed public int ly_inf = 10; // minimal number of tiles at infinity to proceed public double ly_inf_r = 0.01; // minimal relative number of tiles at infinity to proceed public int ly_inf_scale = 20; // minimal number of tiles at infinity to apply weight scaling public double ly_inf_scale_r = 0.02; // minimal relative number of tiles at infinity to apply weight scaling public double ly_inf_frac = 0.7; // Relative weight of infinity calibration data public double ly_inf_max_disparity = 0.2; // Maximal disparity to be treated as infinity when adjusting with rig data public boolean ly_inf_disp= false; // Correct disparity for infinity tiles public boolean ly_inf_force= false; // Force convergence correction during extrinsic, even with no infinity data Loading @@ -191,8 +199,14 @@ public class CLTParameters { public int ly_smpl_num = 5; // Number after removing worst (should be >1) // public double ly_meas_disp = 1.5; // Maximal measured relative disparity - using (0.8*disp_scan_step) public double ly_smpl_rms = 0.2; // 1; // Maximal RMS of the remaining tiles in a sample public double ly_disp_var = 0.5; // 2; // Maximal full disparity difference to 8 neighbors public double ly_disp_rvar = 0.02; // Maximal relative full disparity difference to 8 neighbors public double ly_disp_var = 0.1; // Maximal full disparity difference to 8 neighbors public double ly_disp_rvar = 0.01; // Maximal relative full disparity difference to 8 neighbors public double ly_disp_var_gt = 0.5; // Maximal full disparity difference to 8 neighbors when GT is available public double ly_disp_rvar_gt = 0.05; // Maximal relative full disparity difference to 8 neighbors when GT is available public double ly_norm_disp = 5.0; // Reduce weight of higher disparity tiles // Lazy eye multi-step fitting Loading Loading @@ -796,6 +810,15 @@ public class CLTParameters { return aux ? lym_change_aux : lym_change; } public int getLyPerQuad (int num_tiles) { return (int) Math.max(ly_per_quad_r * num_tiles , ly_per_quad ); } public int getLyInf (int num_tiles) { return (int) Math.max(ly_inf_r * num_tiles , ly_inf ); } public int getLyInfScale (int num_tiles) { return (int) Math.max(ly_inf_scale_r * num_tiles , ly_inf_scale ); } public CLTParameters(){} public void setProperties(String prefix,Properties properties){ Loading Loading @@ -945,6 +968,13 @@ public class CLTParameters { properties.setProperty(prefix+"ly_par_sel", this.ly_par_sel+""); properties.setProperty(prefix+"ly_right_left", this.ly_right_left+""); properties.setProperty(prefix+"ly_per_quad", this.ly_per_quad +""); properties.setProperty(prefix+"ly_per_quad_r", this.ly_per_quad_r +""); properties.setProperty(prefix+"ly_inf", this.ly_inf +""); properties.setProperty(prefix+"ly_inf_r", this.ly_inf_r +""); properties.setProperty(prefix+"ly_inf_scale", this.ly_inf_scale +""); properties.setProperty(prefix+"ly_inf_scale_r", this.ly_inf_scale_r +""); properties.setProperty(prefix+"ly_inf_frac", this.ly_inf_frac +""); properties.setProperty(prefix+"ly_inf_max_disparity", this.ly_inf_max_disparity +""); Loading @@ -957,6 +987,8 @@ public class CLTParameters { properties.setProperty(prefix+"ly_smpl_rms", this.ly_smpl_rms +""); properties.setProperty(prefix+"ly_disp_var", this.ly_disp_var +""); properties.setProperty(prefix+"ly_disp_rvar", this.ly_disp_rvar +""); properties.setProperty(prefix+"ly_disp_var_gt", this.ly_disp_var_gt +""); properties.setProperty(prefix+"ly_disp_rvar_gt", this.ly_disp_rvar_gt +""); properties.setProperty(prefix+"ly_norm_disp", this.ly_norm_disp +""); properties.setProperty(prefix+"lym_overexp", this.lym_overexp +""); properties.setProperty(prefix+"lym_update_disp", this.lym_update_disp+""); Loading Loading @@ -1653,6 +1685,13 @@ public class CLTParameters { if (properties.getProperty(prefix+"ly_par_sel")!=null) this.ly_par_sel=Integer.parseInt(properties.getProperty(prefix+"ly_par_sel")); if (properties.getProperty(prefix+"ly_right_left")!=null) this.ly_right_left=Boolean.parseBoolean(properties.getProperty(prefix+"ly_right_left")); if (properties.getProperty(prefix+"ly_per_quad")!=null) this.ly_per_quad=Integer.parseInt(properties.getProperty(prefix+"ly_per_quad")); if (properties.getProperty(prefix+"ly_per_quad_r")!=null) this.ly_per_quad_r=Double.parseDouble(properties.getProperty(prefix+"ly_per_quad_r")); if (properties.getProperty(prefix+"ly_inf")!=null) this.ly_inf=Integer.parseInt(properties.getProperty(prefix+"ly_inf")); if (properties.getProperty(prefix+"ly_inf_r")!=null) this.ly_inf_r=Double.parseDouble(properties.getProperty(prefix+"ly_inf_r")); if (properties.getProperty(prefix+"ly_inf_scale")!=null) this.ly_inf_scale=Integer.parseInt(properties.getProperty(prefix+"ly_inf_scale")); if (properties.getProperty(prefix+"ly_inf_scale_r")!=null) this.ly_inf_scale_r=Double.parseDouble(properties.getProperty(prefix+"ly_inf_scale_r")); if (properties.getProperty(prefix+"ly_inf_frac")!=null) this.ly_inf_frac=Double.parseDouble(properties.getProperty(prefix+"ly_inf_frac")); if (properties.getProperty(prefix+"ly_inf_max_disparity")!=null) this.ly_inf_max_disparity=Double.parseDouble(properties.getProperty(prefix+"ly_inf_max_disparity")); Loading @@ -1668,6 +1707,8 @@ public class CLTParameters { if (properties.getProperty(prefix+"ly_smpl_rms")!=null) this.ly_smpl_rms=Double.parseDouble(properties.getProperty(prefix+"ly_smpl_rms")); if (properties.getProperty(prefix+"ly_disp_var")!=null) this.ly_disp_var=Double.parseDouble(properties.getProperty(prefix+"ly_disp_var")); if (properties.getProperty(prefix+"ly_disp_rvar")!=null) this.ly_disp_rvar=Double.parseDouble(properties.getProperty(prefix+"ly_disp_rvar")); if (properties.getProperty(prefix+"ly_disp_var_gt")!=null) this.ly_disp_var_gt=Double.parseDouble(properties.getProperty(prefix+"ly_disp_var_gt")); if (properties.getProperty(prefix+"ly_disp_rvar_gt")!=null) this.ly_disp_rvar_gt=Double.parseDouble(properties.getProperty(prefix+"ly_disp_rvar_gt")); if (properties.getProperty(prefix+"ly_norm_disp")!=null) this.ly_norm_disp=Double.parseDouble(properties.getProperty(prefix+"ly_norm_disp")); if (properties.getProperty(prefix+"lym_overexp")!=null) this.lym_overexp=Double.parseDouble(properties.getProperty(prefix+"lym_overexp")); if (properties.getProperty(prefix+"lym_update_disp")!=null) this.lym_update_disp=Boolean.parseBoolean(properties.getProperty(prefix+"lym_update_disp")); Loading Loading @@ -2227,6 +2268,8 @@ public class CLTParameters { // GenericDialog gd = new GenericDialog("Set CLT parameters"); GenericJTabbedDialog gd = new GenericJTabbedDialog("Set CLT parameters",800,900); gd.addTab ("General", "General parameters"); gd.addNumericField("Nominal (rectilinear) disparity between side of square cameras (pix)", this.disparity, 3,7,"pix", "Used when rendering 4 images"); gd.addNumericField("Transform size (default 8)", this.transform_size, 0, 6, "pixels","Should always be 8"); gd.addNumericField("Lapped transform window type (0- rectangular, 1 - sinus)", this.clt_window, 0); gd.addNumericField("shift_x", this.shift_x, 4); Loading Loading @@ -2261,8 +2304,6 @@ public class CLTParameters { gd.addNumericField("Value (max) in vignetting data to correspond to 1x in the kernel", this.vignetting_max, 3); gd.addNumericField("Do not try to correct vignetting smaller than this fraction of max", this.vignetting_range, 3); gd.addNumericField("Kernel step in pixels (has 1 kernel margin on each side)", this.kernel_step, 0); gd.addNumericField("Nominal (rectilinear) disparity between side of square cameras (pix)", this.disparity, 3,7,"pix", "Used when rendering 4 images"); gd.addNumericField("Inverse distance to infinity (misalignment correction)", this.z_correction, 6); gd.addCheckbox ("Perform correlation", this.correlate); gd.addNumericField("Bitmask of pairs to combine in the composite (top, bottom, left,righth)", this.corr_mask, 0); Loading Loading @@ -2406,6 +2447,14 @@ public class CLTParameters { gd.addCheckbox ("Equalize weights of right/left FoV", this.ly_right_left, "Use this mode use with horizon visible in both FoV halves when gross infinity correction is needed"); gd.addNumericField("Minimal tiles per quadrant (not counting the worst) tp proceed", this.ly_per_quad, 0); gd.addNumericField("Minimal tiles per quadrant (not counting the worst) tp proceed - fraction of all tiles", this.ly_per_quad_r, 3); gd.addNumericField("Minimal number of tiles at infinity to proceed", this.ly_inf, 0); gd.addNumericField("Minimal number of tiles at infinity to proceed - fraction of all tiles", this.ly_inf_r, 3); gd.addNumericField("Minimal number of tiles at infinity to apply weight scaling", this.ly_inf_scale, 0); gd.addNumericField("Minimal number of tiles at infinity to apply weight scaling - fraction of all tiles", this.ly_inf_scale_r, 3); gd.addNumericField("Relative weight of infinity calibration data", this.ly_inf_frac, 3); gd.addNumericField("Maximal disparity to be treated as infinity when adjusting with the rig data", this.ly_inf_max_disparity, 8,3,"pix", Loading @@ -2425,6 +2474,10 @@ public class CLTParameters { "Full allowed mismatch is a sum of absolute and disparity times relative"); gd.addNumericField("Maximal relative full disparity difference to 8 neighbors", this.ly_disp_rvar, 8,5,"", "Full allowed mismatch is a sum of absolute and disparity times relative"); gd.addNumericField("Maximal full disparity difference to 8 neighbors with GT", this.ly_disp_var_gt, 8,5,"pix", "Full allowed mismatch is a sum of absolute and disparity times relative (relaxed when ground truth is available)"); gd.addNumericField("Maximal relative full disparity difference to 8 neighbors with GT", this.ly_disp_rvar_gt, 8,5,"", "Full allowed mismatch is a sum of absolute and disparity times relative (relaxed when ground truth is available)"); gd.addNumericField("Reduce weight of higher disparity tiles", this.ly_norm_disp, 5); gd.addMessage ("--- Lazy eye multi-step fitting ---"); gd.addNumericField("Any (near) saturated pixels - discard tile (see sat_level also)", this.lym_overexp, 10); Loading Loading @@ -3067,6 +3120,7 @@ public class CLTParameters { gd.showDialog(); */ if (gd.wasCanceled()) return false; this.disparity= gd.getNextNumber(); this.transform_size= (int) gd.getNextNumber(); this.clt_window= (int) gd.getNextNumber(); this.shift_x = gd.getNextNumber(); Loading Loading @@ -3099,7 +3153,6 @@ public class CLTParameters { this.vignetting_max= gd.getNextNumber(); this.vignetting_range= gd.getNextNumber(); this.kernel_step= (int) gd.getNextNumber(); this.disparity= gd.getNextNumber(); this.z_correction= gd.getNextNumber(); this.correlate= gd.getNextBoolean(); this.corr_mask= (int) gd.getNextNumber(); Loading Loading @@ -3216,6 +3269,14 @@ public class CLTParameters { this.ly_par_sel= (int) gd.getNextNumber(); this.ly_right_left= gd.getNextBoolean(); this.ly_per_quad= (int) gd.getNextNumber(); this.ly_per_quad_r= gd.getNextNumber(); this.ly_inf= (int) gd.getNextNumber(); this.ly_inf_r= gd.getNextNumber(); this.ly_inf_scale= (int) gd.getNextNumber(); this.ly_inf_scale_r= gd.getNextNumber(); this.ly_inf_frac= gd.getNextNumber(); this.ly_inf_max_disparity= gd.getNextNumber(); Loading @@ -3228,6 +3289,8 @@ public class CLTParameters { this.ly_smpl_rms= gd.getNextNumber(); this.ly_disp_var= gd.getNextNumber(); this.ly_disp_rvar= gd.getNextNumber(); this.ly_disp_var_gt= gd.getNextNumber(); this.ly_disp_rvar_gt= gd.getNextNumber(); this.ly_norm_disp= gd.getNextNumber(); this.lym_overexp= gd.getNextNumber(); this.lym_update_disp= gd.getNextBoolean(); Loading
src/main/java/com/elphel/imagej/cameras/EyesisCorrectionParameters.java +16 −0 Original line number Diff line number Diff line Loading @@ -169,6 +169,7 @@ public class EyesisCorrectionParameters { public String mlDirectory="ml"; public boolean thumb_overwrite = true; public int thumb_width = 200; public int thumb_height = 100; public double thumb_h_center = 0.5; Loading Loading @@ -296,6 +297,17 @@ public class EyesisCorrectionParameters { cp.clt_batch_dsi_aux= this.clt_batch_dsi_aux; cp.clt_batch_save_extrinsics= this.clt_batch_save_extrinsics; cp.clt_batch_save_all= this.clt_batch_save_all; cp.thumb_overwrite = this.thumb_overwrite; cp.thumb_width = this.thumb_width; cp.thumb_height = this.thumb_height; cp.thumb_h_center = this.thumb_h_center; cp.thumb_v_center = this.thumb_v_center; cp.thumb_size = this.thumb_size; cp.default_rating = this.default_rating; } Loading Loading @@ -462,6 +474,7 @@ public class EyesisCorrectionParameters { properties.setProperty(prefix+"clt_batch_save_extrinsics", this.clt_batch_save_extrinsics+""); properties.setProperty(prefix+"clt_batch_save_all", this.clt_batch_save_all+""); properties.setProperty(prefix+"thumb_overwrite", this.thumb_overwrite+""); properties.setProperty(prefix+"thumb_width", this.thumb_width+""); properties.setProperty(prefix+"thumb_height", this.thumb_height+""); properties.setProperty(prefix+"thumb_h_center", this.thumb_h_center+""); Loading Loading @@ -616,6 +629,7 @@ public class EyesisCorrectionParameters { if (properties.getProperty(prefix+"clt_batch_save_extrinsics")!= null) this.clt_batch_save_extrinsics=Boolean.parseBoolean(properties.getProperty(prefix+"clt_batch_save_extrinsics")); if (properties.getProperty(prefix+"clt_batch_save_all")!= null) this.clt_batch_save_all=Boolean.parseBoolean(properties.getProperty(prefix+"clt_batch_save_all")); if (properties.getProperty(prefix+"thumb_overwrite")!= null) this.thumb_overwrite=Boolean.parseBoolean(properties.getProperty(prefix+"thumb_overwrite")); if (properties.getProperty(prefix+"thumb_width")!=null) this.thumb_width=Integer.parseInt(properties.getProperty(prefix+"thumb_width")); if (properties.getProperty(prefix+"thumb_height")!=null) this.thumb_height=Integer.parseInt(properties.getProperty(prefix+"thumb_height")); if (properties.getProperty(prefix+"thumb_h_center")!=null) this.thumb_h_center= Double.parseDouble(properties.getProperty(prefix+"thumb_h_center")); Loading Loading @@ -769,6 +783,7 @@ public class EyesisCorrectionParameters { gd.addCheckbox ("Swap top and equator images", this.swapSubchannels01); gd.addTab("Thumbnails","Thumbnail image generation"); gd.addCheckbox("Overwrite existing thumbnail images",this.thumb_overwrite); gd.addNumericField("Thumbnail image width", this.thumb_width, 0,4,"pix", ""); gd.addNumericField("Thumbnail image height", this.thumb_height, 0,4,"pix", Loading Loading @@ -871,6 +886,7 @@ public class EyesisCorrectionParameters { this.removeUnusedSensorData= gd.getNextBoolean(); this.swapSubchannels01= gd.getNextBoolean(); this.thumb_overwrite = gd.getNextBoolean(); this.thumb_width= (int) gd.getNextNumber(); this.thumb_height= (int) gd.getNextNumber(); this.thumb_h_center= gd.getNextNumber(); Loading
src/main/java/com/elphel/imagej/correction/Eyesis_Correction.java +70 −18 Original line number Diff line number Diff line Loading @@ -705,6 +705,10 @@ private Panel panel1, addButton("GPU files", panelClt_GPU, color_conf_process); addButton("Rig8 gpu", panelClt_GPU, color_conf_process); addButton("ShowGPU", panelClt_GPU, color_conf_process); addButton("LWIR_TEST", panelClt_GPU, color_conf_process); addButton("LWIR_ACQUIRE", panelClt_GPU, color_conf_process); plugInFrame.add(panelClt_GPU); } if (LWIR_MODE) { Loading @@ -730,13 +734,13 @@ private Panel panel1, addButton("AUX OUT 3D", panelLWIR, color_process_aux); addButton("Main img AUX", panelLWIR, color_process_aux); addButton("Main to AUX", panelLWIR, color_process_aux); addButton("LWIR_TEST", panelLWIR, color_conf_process); addButton("LWIR_ACQUIRE", panelLWIR, color_conf_process); addButton("LWIR batch", panelClt4, color_process); // addButton("LWIR_TEST", panelLWIR, color_conf_process); // addButton("LWIR_ACQUIRE", panelLWIR, color_conf_process); plugInFrame.add(panelLWIR); } plugInFrame.pack(); //"LWIR batch" GUI.center(plugInFrame); plugInFrame.setVisible(true); FHT_INSTANCE= new DoubleFHT(); Loading Loading @@ -3960,12 +3964,6 @@ private Panel panel1, IJ.showMessage("Warning",msg); return; } /* EYESIS_CORRECTIONS.initSensorFiles(DEBUG_LEVEL, true, // true - ignore missing files true, // boolean all_sensors, COLOR_PROC_PARAMETERS.correct_vignetting); //boolean correct_vignetting */ QUAD_CLT.resetGeometryCorrection(); QUAD_CLT.initGeometryCorrection(DEBUG_LEVEL+2); Loading Loading @@ -5016,6 +5014,14 @@ private Panel panel1, batchRig(); return; /* ======================================================================== */ } else if (label.equals("LWIR batch")) { DEBUG_LEVEL=MASTER_DEBUG_LEVEL; EYESIS_CORRECTIONS.setDebug(DEBUG_LEVEL); CLT_PARAMETERS.batch_run = true; batchLwir(); return; /* ======================================================================== */ } else if (label.equals("CLT rig edit")) { DEBUG_LEVEL=MASTER_DEBUG_LEVEL; Loading Loading @@ -5464,7 +5470,7 @@ private Panel panel1, return true; } // inverted false/true in initSensorFiles(), should work with LWIR also public boolean prepareRigImages() { if (QUAD_CLT == null){ QUAD_CLT = new QuadCLT ( Loading @@ -5489,8 +5495,6 @@ private Panel panel1, System.out.println("Created new QuadCLT instance, will need to read CLT kernels"); } } // QuadCLT dbg_QUAD_CLT = QUAD_CLT; // QuadCLT dbg_QUAD_CLT_AUX = QUAD_CLT_AUX; String configPath=getSaveCongigPath(); if (configPath.equals("ABORT")) return false; if (DEBUG_LEVEL > -2){ Loading @@ -5498,15 +5502,15 @@ private Panel panel1, } EYESIS_CORRECTIONS.initSensorFiles( DEBUG_LEVEL+2, true, false, false, // true, true, // false, COLOR_PROC_PARAMETERS.correct_vignetting); //boolean correct_vignetting if (DEBUG_LEVEL > -2){ System.out.println("++++++++++++++ Running initSensorFiles for the auxiliary camera ++++++++++++++"); } EYESIS_CORRECTIONS_AUX.initSensorFiles(DEBUG_LEVEL+2, true, false, false, // true, true, // false, COLOR_PROC_PARAMETERS_AUX.correct_vignetting); //boolean correct_vignetting Loading Loading @@ -6149,6 +6153,52 @@ private Panel panel1, return true; } public boolean batchLwir() { long startTime=System.nanoTime(); // load needed sensor and kernels files if (!prepareRigImages()) return false; String configPath=getSaveCongigPath(); if (configPath.equals("ABORT")) return false; setAllProperties(PROPERTIES); // batchRig may save properties with the model. Extrinsics will be updated, others should be set here if (DEBUG_LEVEL > -2){ System.out.println("++++++++++++++ Running batch processing of dual-quad EO/LWIR camera rig ++++++++++++++"); } // parameters are different /// if (COLOR_PROC_PARAMETERS_AUX == null) { /// COLOR_PROC_PARAMETERS_AUX = COLOR_PROC_PARAMETERS.clone(); /// } try { TWO_QUAD_CLT.batchLwirRig( QUAD_CLT, // QuadCLT quadCLT_main, QUAD_CLT_AUX, // QuadCLT quadCLT_aux, CLT_PARAMETERS, // EyesisCorrectionParameters.DCTParameters dct_parameters, DEBAYER_PARAMETERS, //EyesisCorrectionParameters.DebayerParameters debayerParameters, COLOR_PROC_PARAMETERS, //EyesisCorrectionParameters.ColorProcParameters colorProcParameters, COLOR_PROC_PARAMETERS_AUX, //EyesisCorrectionParameters.ColorProcParameters colorProcParameters_aux, CHANNEL_GAINS_PARAMETERS, //CorrectionColorProc.ColorGainsParameters channelGainParameters, RGB_PARAMETERS, //EyesisCorrectionParameters.RGBParameters rgbParameters, EQUIRECTANGULAR_PARAMETERS, // EyesisCorrectionParameters.EquirectangularParameters equirectangularParameters, PROPERTIES, // Properties properties, THREADS_MAX, //final int threadsMax, // maximal number of threads to launch UPDATE_STATUS, //final boolean updateStatus, DEBUG_LEVEL); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } //final int debugLevel); if (configPath!=null) { saveTimestampedProperties( // save config again configPath, // full path or null null, // use as default directory if path==null true, PROPERTIES); } System.out.println("batchRig(): Processing finished at "+ IJ.d2s(0.000000001*(System.nanoTime()-startTime),3)+" sec, --- Free memory="+ Runtime.getRuntime().freeMemory()+" (of "+Runtime.getRuntime().totalMemory()+")"); return true; } Loading Loading @@ -6337,7 +6387,9 @@ private Panel panel1, String mask = ".*EXTRINSICS\\.corr-xml"; String full_conf_suffix = ".corr-xml"; String dsi_suffix = "-DSI_COMBO.tiff"; // String dsi_suffix = "-DSI_COMBO.tiff"; String dsi_suffix = TwoQuadCLT.DSI_COMBO_SUFFIX+".tiff"; String correction_parameters_prefix = "CORRECTION_PARAMETERS."; System.out.println("File mask = "+mask); Loading
src/main/java/com/elphel/imagej/tileprocessor/AlignmentCorrection.java +156 −20 File changed.Preview size limit exceeded, changes collapsed. Show changes
src/main/java/com/elphel/imagej/tileprocessor/GeometryCorrection.java +11 −4 Original line number Diff line number Diff line Loading @@ -998,6 +998,9 @@ public class GeometryCorrection { } public void showRig() { if (this.rigOffset == null) { this.rigOffset = new RigOffset(); } this.rigOffset.showRigOffsets(); } Loading Loading @@ -1401,18 +1404,22 @@ public class GeometryCorrection { public void incrementVector(double [] incr, // returns false if any component is NaN, in that case do not increment public boolean incrementVector(double [] incr, double scale) { for (int i = 0; i < incr.length; i++){ if (Double.isNaN(vector[i])) return false; } for (int i = 0; i < incr.length; i++){ vector[i]+= incr[i] * scale; } return true; } public void incrementVector(CorrVector incr, double scale) public boolean incrementVector(CorrVector incr, double scale) { incrementVector(incr.toArray(), scale); return incrementVector(incr.toArray(), scale); } @Override Loading