Commit 54ecece0 authored by Andrey Filippov's avatar Andrey Filippov

moving objects detection during pose matching

parent 2790d745
......@@ -519,7 +519,7 @@ public class CorrVector{ // TODO: Update to non-quad (extract to a file first)?
public double [] getIMU() {
// double [] imu = {vector[IMU_INDEX + 0], vector[IMU_INDEX + 1], vector[IMU_INDEX + 2],vector[IMU_INDEX + 3], vector[IMU_INDEX + 4], vector[IMU_INDEX + 5]};
int indx = getZoomIndex();
int indx = getIMUIndex(); // Was bug: getZoomIndex();
double [] imu = new double[6];
for (int i = 0; i < imu.length; i++) {
imu[i] = vector[indx + i];
......@@ -528,10 +528,15 @@ public class CorrVector{ // TODO: Update to non-quad (extract to a file first)?
}
public void setIMU(double [] imu) {
int indx = getZoomIndex();
int indx = getIMUIndex(); // Was bug: getZoomIndex();
for (int i = 0; i < imu.length; i++) {
vector [indx + i] = imu[i];
}
System.out.print("setIMU(");
for (int i = 0; i < imu.length; i++) {
System.out.print(imu[i]+",");
}
System.out.println(")");
}
public double setZoomsFromF(double [] f) { // USED in lwir
......
......@@ -67,22 +67,22 @@ public class IntersceneLma {
full_vector[ErsCorrection.DP_DAZ],full_vector[ErsCorrection.DP_DTL],full_vector[ErsCorrection.DP_DRL]};
}
public double [] getSceneERSXYZ(boolean initial) {
public double [] getSceneERSXYZ(boolean initial) { // never used
double [] full_vector = initial? backup_parameters_full: getFullVector(parameters_vector);
return new double[] {
full_vector[ErsCorrection.DP_DSVX],full_vector[ErsCorrection.DP_DSVY],full_vector[ErsCorrection.DP_DSVZ]};
}
public double [] getSceneERSATR(boolean initial) {
public double [] getSceneERSATR(boolean initial) { // never used
double [] full_vector = initial? backup_parameters_full: getFullVector(parameters_vector);
return new double[] {
full_vector[ErsCorrection.DP_DSVAZ],full_vector[ErsCorrection.DP_DSVTL],full_vector[ErsCorrection.DP_DSVRL]};
}
public double [] getReferenceERSXYZ(boolean initial) {
public double [] getReferenceERSXYZ(boolean initial) { // never used
double [] full_vector = initial? backup_parameters_full: getFullVector(parameters_vector);
return new double[] {
full_vector[ErsCorrection.DP_DSVX],full_vector[ErsCorrection.DP_DSVY],full_vector[ErsCorrection.DP_DSVZ]};
}
public double [] getReferenceERSATR(boolean initial) {
public double [] getReferenceERSATR(boolean initial) { // never used
double [] full_vector = initial? backup_parameters_full: getFullVector(parameters_vector);
return new double[] {
full_vector[ErsCorrection.DP_DSVAZ],full_vector[ErsCorrection.DP_DSVTL],full_vector[ErsCorrection.DP_DSVRL]};
......@@ -389,7 +389,7 @@ public class IntersceneLma {
Matrix wjtjlambda = new Matrix(getWJtJlambda(
lambda, // *10, // temporary
this.last_jt)); // double [][] jt)
if (debug_level > 2) {
if (debug_level > 3) {
try {
System.out.println("getFxDerivs(): getChecksum(this.y_vector)="+ getChecksum(this.y_vector));
System.out.println("getFxDerivs(): getChecksum(this.weights)="+ getChecksum(this.weights));
......@@ -793,7 +793,7 @@ public class IntersceneLma {
fx [i + 2 * macrotile_centers.length] = vector[i]; // - parameters_initial[i]; // scale will be combined with weights
jt[i][i + 2 * macrotile_centers.length] = 1.0; // scale will be combined with weights
}
if (debug_level > 2) {
if (debug_level > 3) {
try {
System.out.println ("getFxDerivs(): getChecksum(fx)="+getChecksum(fx));
if (jt != null) {
......
......@@ -2045,6 +2045,7 @@ public class QuadCLT extends QuadCLTCPU {
final double [] scene_xyz, // camera center in world coordinates
final double [] scene_atr, // camera orientation relative to world frame
final QuadCLT scene,
final QuadCLT ref_scene, // now - may be null - for testing if scene is rotated ref
final boolean toRGB,
String suffix,
int threadsMax,
......@@ -2056,7 +2057,7 @@ public class QuadCLT extends QuadCLTCPU {
scene_xyz, // final double [] scene_xyz, // camera center in world coordinates
scene_atr, // final double [] scene_atr, // camera orientation relative to world frame
scene, // final QuadCLT scene_QuadClt,
null, // scene, // final QuadCLT reference_QuadClt, // now - may be null - for testing if scene is rotated ref
ref_scene, // final QuadCLT reference_QuadClt, // now - may be null - for testing if scene is rotated ref
threadsMax); // int threadsMax)
int rendered_width = scene.getErsCorrection().getSensorWH()[0];
if (full_woi_in != null) {
......@@ -2238,8 +2239,7 @@ public class QuadCLT extends QuadCLTCPU {
return null;
}
saveQuadClt(); // to re-load new set of Bayer images to the GPU (do nothing for CPU) and Geometry
// GPU-specific
boolean showCoord = debugLevel > 1;
boolean is_mono = isMonochrome();
......
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