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

Bug fixing to make run for many scenes. Started LPF for the ground w/o

SfM
parent 3f84a242
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -5090,7 +5090,7 @@ public class Eyesis_Correction implements PlugIn, ActionListener {
			System.out.println("=== IMS ===");
			QUAD_CLT_AUX.showQuatCorr();
			System.out.println("=== IMU ===");
			QUAD_CLT_AUX.showPimuOffsets();
			QUAD_CLT_AUX.showPimuOffsets(CLT_PARAMETERS); //
			@SuppressWarnings("unused")
			QuadCLT dbg_QUAD_CLT = QUAD_CLT;
			@SuppressWarnings("unused")
+1 −1
Original line number Diff line number Diff line
@@ -295,7 +295,7 @@ public class ElphelTiffWriter {
	private static IIOMetadataNode createTimeStamp(LocalDateTime dt, int digits_after) { // 3
		int denom = 1;
		for (int i = 0; i < digits_after; i++) denom *= 10;
		int fsec = dt.getSecond()*denom+((int) Math.round(denom * dt.getNano()*1E-9));
		int fsec = dt.getSecond()*denom+((int) Math.round(denom * (dt.getNano()*1E-9)));
		
	    IIOMetadataNode node_rationals = new IIOMetadataNode(TIFF_RATIONALS_TAG);
	    IIOMetadataNode node_hrs =       new IIOMetadataNode(TIFF_RATIONAL_TAG);
+180 −9

File changed.

Preview size limit exceeded, changes collapsed.

+17 −2

File changed.

Preview size limit exceeded, changes collapsed.

+37 −15
Original line number Diff line number Diff line
@@ -29,8 +29,10 @@ import java.awt.Rectangle;
import java.io.File;
import java.io.IOException;
import java.security.NoSuchAlgorithmException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
@@ -5426,15 +5428,30 @@ public class OpticalFlow {
				}				
			}
		}
		
//		quadCLTs[ref_index].getSmoothGround(clt_parameters);
		
		// later move to the right place
		if (adjust_imu_orient) { // (quadCLTs[ref_index].getNumOrient() >= clt_parameters.imp.mb_all_index)) {
			boolean orient_combo =     clt_parameters.imp.orient_combo; // use combined rotation+orientation for IMU/camera matching
			QuadCLT.adjustImuOrient(
					clt_parameters,     //CLTParameters clt_parameters,     // CLTParameters clt_parameters,
					orient_combo, // boolean orient_combo =     clt_parameters.imp.orient_combo; // use combined rotation+orientation for IMU/camera matching
					quadCLTs, // QuadCLT[]     quadCLTs,
					ref_index, // int           ref_index,
					earliest_scene, // int           earliest_scene,
					last_index, // int           last_index,
					debugLevel); // 			    		int debugLevel
			// Try both orient_combo/!orient_combo for the log!
			QuadCLT.adjustImuOrient(
					clt_parameters,     //CLTParameters clt_parameters,     // CLTParameters clt_parameters,
					!orient_combo, // boolean orient_combo =     clt_parameters.imp.orient_combo; // use combined rotation+orientation for IMU/camera matching
					quadCLTs, // QuadCLT[]     quadCLTs,
					ref_index, // int           ref_index,
					earliest_scene, // int           earliest_scene,
					last_index, // int           last_index,
					debugLevel); // 			    		int debugLevel
			
		}
		if (run_ly) {
			if (debugLevel > -3) {
@@ -5548,15 +5565,20 @@ public class OpticalFlow {
				quadCLTs[ref_index].saveInterProperties( // save properties for interscene processing (extrinsics, ers, ...)
						null, // String path,             // full name with extension or w/o path to use x3d directory
						debugLevel+1);
				if (debugLevel > -3) {
	        	StringBuffer sb = new StringBuffer();
	        	sb.append(new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(Calendar.getInstance().getTime())+"\n");
	        	Rotation rot = new Rotation(quatCorr[0],quatCorr[1],quatCorr[2],quatCorr[3], false); // no normalization - see if can be scaled
					System.out.println("Applying correction to the IMS to world orientation (rotating around IMS vertical):");
				sb.append("Applying correction to the IMS to world orientation (rotating around IMS vertical):\n");
				double []  corr_angles = rot.getAngles(RotationOrder.YXZ, ErsCorrection.ROT_CONV);
				double []  corr_degrees = new double[3];
				for (int i = 0; i < 3; i++) corr_degrees[i]=corr_angles[i]*180/Math.PI;
					System.out.println("quatCorr=["+quatCorr[0]+", "+quatCorr[1]+", "+quatCorr[2]+", "+quatCorr[3]+"]");
					System.out.println("ATR(rad)=["+corr_angles[0]+", "+corr_angles[1]+", "+corr_angles[2]+"]");
					System.out.println("ATR(deg)=["+corr_degrees[0]+", "+corr_degrees[1]+", "+corr_degrees[2]+"]");
				sb.append("compass: quatCorr=["+quatCorr[0]+", "+quatCorr[1]+", "+quatCorr[2]+", "+quatCorr[3]+"]\n");
				sb.append("compass: ATR(rad)=["+corr_angles[0]+", "+corr_angles[1]+", "+corr_angles[2]+"]\n");
				sb.append("compass: ATR(deg)=["+corr_degrees[0]+", "+corr_degrees[1]+", "+corr_degrees[2]+"]\n");
	        	sb.append("------------------------\n\n");
	    		quadCLTs[ref_index].saveStringInModelDirectory(sb.toString(),QuadCLT.IMU_CALIB_LOGS_SUFFIX); // String  suffix)
				if (debugLevel > -3) {
					System.out.print(sb.toString());
				}
			} else {
				if (debugLevel> -3) {
Loading