Commit 84e61b79 authored by Andrey Filippov's avatar Andrey Filippov

implementing rig adjustment

parent c5b6a7a7
......@@ -731,6 +731,7 @@ public class AlignmentCorrection {
double centerY = tileY * qc.tp.getTileSize() + qc.tp.getTileSize()/2;//- shiftY;
double [][] centersXY_disp = qc.geometryCorrection.getPortsCoordinatesAndDerivatives(
qc.geometryCorrection, // GeometryCorrection gc_main,
false, // boolean use_rig_offsets,
corr_rots, // Matrix [] rots,
null, // Matrix [][] deriv_rots,
......@@ -739,6 +740,7 @@ public class AlignmentCorrection {
centerY,
disp_strength[2 * s.series + 0][s.tile]/magic_coeff); // disparity
double [][] centersXY_inf = qc.geometryCorrection.getPortsCoordinatesAndDerivatives(
qc.geometryCorrection, // GeometryCorrection gc_main,
false, // boolean use_rig_offsets,
corr_rots, // Matrix [] rots,
null, // Matrix [][] deriv_rots,
......@@ -2436,6 +2438,7 @@ System.out.println("test1234");
double [][] deriv = new double [2 * NUM_SENSORS][];
int dbg_index =dbg_index (pXY, dbg_decimate);
geometryCorrection.getPortsCoordinatesAndDerivatives(
geometryCorrection, // GeometryCorrection gc_main,
false, // boolean use_rig_offsets,
corr_rots, // Matrix [] rots,
deriv_rots, // Matrix [][] deriv_rots,
......@@ -2600,6 +2603,7 @@ System.out.println("test1234");
Mismatch mm = mismatch_list.get(indx);
double [] pXY = mm.getPXY();
double [][] f = geometryCorrection.getPortsCoordinatesAndDerivatives( // 4x2
geometryCorrection, // GeometryCorrection gc_main,
false, // boolean use_rig_offsets,
corr_rots, // Matrix [] rots,
null, // Matrix [][] deriv_rots,
......
......@@ -61,7 +61,7 @@ public class BiQuadParameters {
public boolean rig_adjust_angle = true; //
public boolean rig_adjust_distance = false; // distance between camera centers
public boolean rig_adjust_forward = false; // aux camera forward from the principal plane (not implemented)
public double rig_correction_scale= 1.0; // scale calcualated correction
public double rig_correction_scale= 1.0; // scale calculaated correction
......
This diff is collapsed.
......@@ -981,6 +981,7 @@ public class ImageDtt {
// centerY,
// disparity);
double [][] centersXY = geometryCorrection.getPortsCoordinatesAndDerivatives(
geometryCorrection, // GeometryCorrection gc_main,
false, // boolean use_rig_offsets,
corr_rots, // Matrix [] rots,
null, // Matrix [][] deriv_rots,
......@@ -1749,6 +1750,7 @@ public class ImageDtt {
} else {
centersXY = geometryCorrection.getPortsCoordinatesAndDerivatives(
geometryCorrection, // GeometryCorrection gc_main,
false, // boolean use_rig_offsets,
corr_rots, // Matrix [] rots,
null, // Matrix [][] deriv_rots,
......@@ -5968,6 +5970,7 @@ public class ImageDtt {
} else {
centersXY = geometryCorrection.getPortsCoordinatesAndDerivatives(
geometryCorrection, // GeometryCorrection gc_main,
false, // boolean use_rig_offsets,
corr_rots, // Matrix [] rots,
null, // Matrix [][] deriv_rots,
......@@ -7808,6 +7811,7 @@ public class ImageDtt {
disparity_bimap[BI_TARGET_INDEX][tIndex] = disparity_main;
}
centersXY_main = geometryCorrection_main.getPortsCoordinatesAndDerivatives(
geometryCorrection_main, // GeometryCorrection gc_main,
false, // boolean use_rig_offsets,
corr_rots_main, // Matrix [] rots,
null, // Matrix [][] deriv_rots,
......@@ -7817,6 +7821,7 @@ public class ImageDtt {
disparity_main); // + disparity_corr);
centersXY_aux = geometryCorrection_aux.getPortsCoordinatesAndDerivatives(
geometryCorrection_main, // GeometryCorrection gc_main,
true, // boolean use_rig_offsets,
corr_rots_aux, // Matrix [] rots,
null, // Matrix [][] deriv_rots,
......
......@@ -985,7 +985,20 @@ public class TwoQuadCLT {
tilesX); // int tilesX
// do actual adjustment step, update rig parameters
quadCLT_aux.geometryCorrection.getRigCorrection(
clt_parameters.rig.rig_adjust_orientation, // boolean adjust_orientation,
clt_parameters.rig.rig_adjust_zoom, // boolean adjust_zoom,
clt_parameters.rig.rig_adjust_angle, // boolean adjust_angle,
clt_parameters.rig.rig_adjust_distance, // boolean adjust_distance,
clt_parameters.rig.rig_adjust_forward, // boolean adjust_forward, // not used
clt_parameters.rig.rig_correction_scale, // double scale_correction,
tile_list, // ArrayList<Integer> tile_list,
quadCLT_main, // QuadCLT qc_main,
disparity_bimap[ImageDtt.BI_STR_CROSS_INDEX], // double [] strength,
disparity_bimap[ImageDtt.BI_DISP_CROSS_DX_INDEX], // double [] diff_x, // used only with target_disparity == 0
disparity_bimap[ImageDtt.BI_DISP_CROSS_DY_INDEX], // double [] diff_y,
disparity_bimap[ImageDtt.BI_TARGET_INDEX], // double [] target_disparity,
debugLevel+1);
} // end of for (int num_short_cycle = 0; num_short_cycle < clt_parameters.rig.rig_adjust_short_cycles;num_short_cycle++) {
......
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