@@ -324,7 +397,9 @@ public class AlignmentCorrection {
...
@@ -324,7 +397,9 @@ public class AlignmentCorrection {
use_poly,// final boolean use_poly,
use_poly,// final boolean use_poly,
clt_parameters.fcorr_inf_quad,// final boolean use_quadratic,
clt_parameters.fcorr_inf_quad,// final boolean use_quadratic,
clt_parameters.fcorr_inf_vert,// final boolean use_vertical,
clt_parameters.fcorr_inf_vert,// final boolean use_vertical,
clt_parameters.ly_inf_en,// final boolean use_disparity, // for infinity
clt_parameters.ly_inf_en,// final boolean use_disparity, // for infinity - if true, restores differences in the direction of disparity that was subtracted during measurement)
// For ly_inf_en need to make sure that programmed disparity was 0.0, so
System.out.println("selectInfinityTiles(): Number of input samples exceeding "+min_strength+" strength is "+num_samples+", average disparity is "+sdw);
}
for(intpass=0;pass<max_iterations;pass++){
for(intpass=0;pass<max_iterations;pass++){
for(intnTile=0;nTile<numTiles;nTile++){
for(intnTile=0;nTile<numTiles;nTile++){
inttileX=nTile%tilesX;
inttileX=nTile%tilesX;
...
@@ -480,7 +585,7 @@ public class AlignmentCorrection {
...
@@ -480,7 +585,7 @@ public class AlignmentCorrection {
* Create Y-F(x) vector for 8 points per tile data from the mismatch_list. Groups of 8 uses linear combinations of the measured {dx0, dy0,..dx3,dy3},
* and the first 7 points in each group are invariant of disparity, the 8-th is optionally disabled by the corresponding weight (for points with unknown disparity)
*
* Actually there is no explicit F(x), because after each step, the correlations are recalculated instead, and the measured are already differences from "F(x)"
// convert Jacobian outputs to symmetrical measurement vectors (last one is non-zero only if disparity should be adjusted)
// Convert Jacobian outputs to symmetrical measurement vectors (last one is non-zero only if disparity should be adjusted)
// so now each group of 8 points (individual coordinate pairs for each sub-camera) is replaced by 8-point "measurement vector", where only the last component
// depends on disparity. That last component is optionally disabled by the corresponding weight for the samples that do not have absolute disparity data
// TODO: now works for small offsets. Maybe add re-calculate int argmax for each pair? xcenter is still needed to subtract Add switch? (small/large correction)
// TODO: now works for small offsets. Maybe add re-calculate int argmax for each pair? xcenter is still needed to subtract Add switch? (small/large correction)
clt_parameters.corr_magic_scale,// double magic_coeff, // still not understood coefficent that reduces reported disparity value. Seems to be around 8.5
clt_parameters.corr_magic_scale,// double magic_coeff, // still not understood coefficent that reduces reported disparity value. Seems to be around 8.5
debugLevel+(clt_parameters.fine_dbg?1:0));// int debugLevel)
debugLevel+(clt_parameters.fine_dbg?1:0));// int debugLevel)
if(debugLevel>-1){
if((new_corr!=null)&&(debugLevel>-1)){
System.out.println("process_infinity_corr(): ready to apply infinity correction");
System.out.println("process_infinity_corr(): ready to apply infinity correction");