Commit 0895e5a9 authored by Andrey Filippov's avatar Andrey Filippov

starting lwir16 branch, may be incompatible with all configuration files

parent 6d1c1772
...@@ -3073,7 +3073,8 @@ B = |+dy0 -dy1 -2*dy3 | ...@@ -3073,7 +3073,8 @@ B = |+dy0 -dy1 -2*dy3 |
int dbg_owidth = dbg_width/dbg_decimate; int dbg_owidth = dbg_width/dbg_decimate;
int dbg_oheight = dbg_height/dbg_decimate; int dbg_oheight = dbg_height/dbg_decimate;
int dbg_length = dbg_owidth*dbg_oheight; int dbg_length = dbg_owidth*dbg_oheight;
String [] dbg_titles_tar=GeometryCorrection.CORR_NAMES; // String [] dbg_titles_tar=GeometryCorrection.CORR_NAMES;
String [] dbg_titles_tar=geometryCorrection.getCorrNames();
String [] dbg_titles_sym= {"sym0","sym1","sym2","sym3","sym4","sym5","sroll0","sroll1","sroll2","sroll3"}; String [] dbg_titles_sym= {"sym0","sym1","sym2","sym3","sym4","sym5","sroll0","sroll1","sroll2","sroll3"};
String [] dbg_titles_xy= {"x0","y0","x1","y1","x2","y2","x3","y3"}; String [] dbg_titles_xy= {"x0","y0","x1","y1","x2","y2","x3","y3"};
double [][] dbg_img_deriv = null; // compare derivatives with delta-diffs double [][] dbg_img_deriv = null; // compare derivatives with delta-diffs
......
...@@ -43,31 +43,52 @@ public class CorrVector{ // TODO: Update to non-quad (extract to a file first)? ...@@ -43,31 +43,52 @@ public class CorrVector{ // TODO: Update to non-quad (extract to a file first)?
// replacing static constants (they will be different for diffrent numSensors) // replacing static constants (they will be different for diffrent numSensors)
// 1 step - add methods, 2-nd update methods themselves // 1 step - add methods, 2-nd update methods themselves
public int getLength() {return LENGTH;} public int getLength() {return getLength (geometryCorrection.getNumSensors());}
public int getLengthAngles() {return LENGTH_ANGLES;} public int getLengthAngles() {return getLengthAngles(geometryCorrection.getNumSensors());}
public int getTiltIndex() {return TILT_INDEX;} public int getTiltIndex() {return getTiltIndex (geometryCorrection.getNumSensors());}
public int getAzimuthIndex() {return AZIMUTH_INDEX;} public int getAzimuthIndex() {return getAzimuthIndex(geometryCorrection.getNumSensors());}
public int getRollIndex() {return ROLL_INDEX;} public int getRollIndex() {return getRollIndex (geometryCorrection.getNumSensors());}
public int getZoomIndex() {return ZOOM_INDEX;} public int getZoomIndex() {return getZoomIndex (geometryCorrection.getNumSensors());}
public int getIMUIndex() {return IMU_INDEX;} public int getIMUIndex() {return getIMUIndex (geometryCorrection.getNumSensors());}
public double getRotAzSgn() {return ROT_AZ_SGN;} public double getRotAzSgn() {return ROT_AZ_SGN;}
public double getRotTlSgn() {return ROT_TL_SGN;} public double getRotTlSgn() {return ROT_TL_SGN;}
public double getRotRlzSgn() {return ROT_RL_SGN;} public double getRotRlzSgn() {return ROT_RL_SGN;}
public double[] getVector() {return vector;} public double[] getVector() {return vector;}
// static that (will) use number of subcameras // static that (will) use number of subcameras
public static int getLength(int num_chn) {return LENGTH;} public static int getLength (int num_chn) {return 4 * num_chn + 4;}
public static int getLengthAngles(int num_chn) {return LENGTH_ANGLES;} public static int getLengthAngles (int num_chn) {return 3 * num_chn - 2;}
public static int getTiltIndex(int num_chn) {return TILT_INDEX;} public static int getTiltIndex (int num_chn) {return 0;}
public static int getAzimuthIndex(int num_chn) {return AZIMUTH_INDEX;} public static int getAzimuthIndex (int num_chn) {return num_chn - 1;}
public static int getRollIndex(int num_chn) {return ROLL_INDEX;} public static int getRollIndex (int num_chn) {return 2 * num_chn - 2;}
public static int getZoomIndex(int num_chn) {return ZOOM_INDEX;} public static int getZoomIndex (int num_chn) {return 3 * num_chn - 2;}
public static int getIMUIndex(int num_chn) {return IMU_INDEX;} public static int getIMUIndex (int num_chn) {return 4 * num_chn - 3;}
// public static double getRotAzSgn(int num_chn) {return ROT_AZ_SGN;} // public static double getRotAzSgn(int num_chn) {return ROT_AZ_SGN;}
// public static double getRotTlSgn(int num_chn) {return ROT_TL_SGN;} // public static double getRotTlSgn(int num_chn) {return ROT_TL_SGN;}
// public static double getRotRlzSgn(int num_chn) {return ROT_RL_SGN;} // public static double getRotRlzSgn(int num_chn) {return ROT_RL_SGN;}
public static String [] getCorrNames(int num_chn) {
String [] corr_names = new String[getLength(num_chn)];
for (int n = 0; n < num_chn; n++) {
if (n < (num_chn - 1)) {
corr_names[getTiltIndex(num_chn) + n]= "tilt" + n;
corr_names[getAzimuthIndex(num_chn) + n]= "azimuth" + n;
corr_names[getZoomIndex(num_chn) + n]= "zoom" + n;
}
corr_names[getRollIndex(num_chn) + n]= "roll" + n;
}
corr_names[getIMUIndex(num_chn) + 0]= "omega_tilt";
corr_names[getIMUIndex(num_chn) + 1]= "omega_azimuth";
corr_names[getIMUIndex(num_chn) + 2]= "omega_roll";
corr_names[getIMUIndex(num_chn) + 3]= "velocity_x";
corr_names[getIMUIndex(num_chn) + 4]= "velocity_y";
corr_names[getIMUIndex(num_chn) + 5]= "velocity_z";
return corr_names;
}
public String [] getCorrNames() {
return getCorrNames(geometryCorrection.getNumSensors());
}
public Matrix [] getRotMatrices(Matrix rigMatrix)// USED in lwir public Matrix [] getRotMatrices(Matrix rigMatrix)// USED in lwir
......
...@@ -49,6 +49,12 @@ public class GeometryCorrection { ...@@ -49,6 +49,12 @@ public class GeometryCorrection {
public static String RIG_PREFIX = "rig-"; public static String RIG_PREFIX = "rig-";
static double SCENE_UNITS_SCALE = 0.001; // meters from mm static double SCENE_UNITS_SCALE = 0.001; // meters from mm
static String SCENE_UNITS_NAME = "m"; static String SCENE_UNITS_NAME = "m";
// use static CorrVector.getCorrNames(numSensors)
// or non-static corrVector.getCorrNames();
public String [] getCorrNames() {
return CorrVector.getCorrNames(numSensors);
}
static final String [] CORR_NAMES = { // need to be fixed too! static final String [] CORR_NAMES = { // need to be fixed too!
"tilt0","tilt1","tilt2", "tilt0","tilt1","tilt2",
"azimuth0","azimuth1","azimuth2", "azimuth0","azimuth1","azimuth2",
...@@ -109,6 +115,9 @@ public class GeometryCorrection { ...@@ -109,6 +115,9 @@ public class GeometryCorrection {
this.rXY_ideal = rXY_ideal; this.rXY_ideal = rXY_ideal;
} }
public int getNumSensors() {
return numSensors;
}
protected double [][] get_rXY_ideal(){ protected double [][] get_rXY_ideal(){
if (rXY_ideal == null) { if (rXY_ideal == null) {
if (numSensors == 4) { if (numSensors == 4) {
......
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