Commit e1fd09c9 authored by Andrey Filippov's avatar Andrey Filippov

Implementing multi-frame ERS matching

parent 48429931
......@@ -119,6 +119,21 @@
<version>1.7.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-numbers-quaternion -->
<!--
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-numbers-quaternion</artifactId>
<version>1.0-beta1</version>
</dependency>
-->
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-math3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.6.1</version>
</dependency>
</dependencies>
<build>
......
......@@ -88,6 +88,7 @@ import com.elphel.imagej.lwir.LwirReader;
import com.elphel.imagej.readers.EyesisTiff;
import com.elphel.imagej.tensorflow.TensorflowInferModel;
import com.elphel.imagej.tileprocessor.DttRad2;
import com.elphel.imagej.tileprocessor.ErsCorrection;
import com.elphel.imagej.tileprocessor.ImageDtt;
import com.elphel.imagej.tileprocessor.MLStats;
import com.elphel.imagej.tileprocessor.QuadCLT;
......@@ -718,6 +719,8 @@ private Panel panel1,
addButton("IMU aux", panelClt_GPU, color_conf_process_aux);
addButton("ERS aux", panelClt_GPU, color_process_aux);
addButton("Rotations_test", panelClt_GPU, color_stop);
plugInFrame.add(panelClt_GPU);
}
if (LWIR_MODE) {
......@@ -5193,7 +5196,9 @@ private Panel panel1,
/// imp.show();
/// }
}
/* ======================================================================== */
} else if (label.equals("Rotations_test")) {
ErsCorrection.test_rotations();
//JTabbedTest
// End of buttons code
}
......
......@@ -80,30 +80,30 @@ public class GeometryCorrection {
public double heading = 0.0; // degrees, CW (from top) - positive
public int numSensors = 4;
private double [] forward = null;
private double [] right = null;
private double [] height = null;
private double [] roll = null; // degrees, CW (to target) - positive
protected double [] forward = null;
protected double [] right = null;
protected double [] height = null;
protected double [] roll = null; // degrees, CW (to target) - positive
public double [][] pXY0 = null; // sensor center XY in pixels
private double common_right; // mm right, camera center
private double common_forward; // mm forward (to target), camera center
private double common_height; // mm up, camera center
private double common_roll; // degrees CW (to target) camera as a whole
private double [][] XYZ_he; // all cameras coordinates transformed to eliminate heading and elevation (rolls preserved)
private double [][] XYZ_her = null; // XYZ of the lenses in a corrected CCS (adjusted for to elevation, heading, common_roll)
private double [][] rXY = null; // XY pairs of the in a normal plane, relative to disparityRadius
private double [][] rXY_ideal = {{-0.5, -0.5}, {0.5,-0.5}, {-0.5, 0.5}, {0.5,0.5}};
protected double common_right; // mm right, camera center
protected double common_forward; // mm forward (to target), camera center
protected double common_height; // mm up, camera center
protected double common_roll; // degrees CW (to target) camera as a whole
protected double [][] XYZ_he; // all cameras coordinates transformed to eliminate heading and elevation (rolls preserved)
protected double [][] XYZ_her = null; // XYZ of the lenses in a corrected CCS (adjusted for to elevation, heading, common_roll)
protected double [][] rXY = null; // XY pairs of the in a normal plane, relative to disparityRadius
protected double [][] rXY_ideal = {{-0.5, -0.5}, {0.5,-0.5}, {-0.5, 0.5}, {0.5,0.5}};
public double cameraRadius=0; // average distance from the "mass center" of the sensors to the sensors
public double disparityRadius=150.0; // distance between cameras to normalize disparity units to. sqrt(2)*disparityRadius for quad camera (~=150mm)?
private double [] rByRDist=null;
private double stepR=0.0004; // 0004 - double, 0.0002 - float to fit into GPU shared memory (was 0.001);
private double maxR=2.0; // calculate up to this*distortionRadius
protected double [] rByRDist=null;
protected double stepR=0.0004; // 0004 - double, 0.0002 - float to fit into GPU shared memory (was 0.001);
protected double maxR=2.0; // calculate up to this*distortionRadius
private Matrix m_balance_xy = null; // [2*numSensors][2*numSensors] 8x8 matrix to make XY ports correction to have average == 0
private Matrix m_balance_dd = null; // [2*numSensors+1)][2*numSensors] 9x8 matrix to extract disparity from dd
protected Matrix m_balance_xy = null; // [2*numSensors][2*numSensors] 8x8 matrix to make XY ports correction to have average == 0
protected Matrix m_balance_dd = null; // [2*numSensors+1)][2*numSensors] 9x8 matrix to extract disparity from dd
......@@ -3631,9 +3631,6 @@ matrix([[-0.125, -0.125, 0.125, 0.125, -0.125, 0.125, -0. , -0. , -0.
return pXY;
}
// private Matrix m_balance_xy = null; // [2*numSensors][2*numSensors] 8x8 matrix to make XY ports correction to have average == 0
// private Matrix m_balance_dd = null; // [2*numSensors+1)][2*numSensors] 9x8 matrix to extract disparity from dd
// calculate non-distorted x/y pairs (relative to optical centers) for each port and derivatives
public double [] getPortsDDNDAndDerivativesNew( // USED in lwir
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment