clt_parameters.corr_magic_scale,// double magic_coeff, // still not understood coefficent that reduces reported disparity value. Seems to be around 8.5
debugLevel+1);// int debugLevel)
if(debugLevel>-1){
System.out.println("Ready to apply infinity correction");
show_fine_corr(
new_corr,// double [][][] corr,
"");// String prefix)
}
if(debugLevel>100){
if(debugLevel>100){
double[][][]new_corr=infinityCorrection(
clt_parameters.fcorr_inf_strength,// final double min_strenth,
clt_parameters.fcorr_inf_diff,// final double max_diff,
clt_parameters.corr_magic_scale,// double magic_coeff, // still not understood coefficent that reduces reported disparity value. Seems to be around 8.5
debugLevel+1);// int debugLevel)
if(debugLevel>-1){
System.out.println("Ready to apply infinity correction");
show_fine_corr(
new_corr,// double [][][] corr,
"");// String prefix)
}
apply_fine_corr(
new_corr,
debugLevel+1);
...
...
@@ -4121,8 +4145,14 @@ public class QuadCLT {
}
returncoeff_full;
}
/**
* Calculate quadratic polynomials for each subcamera X/Y correction to match disparity = 0 at infinity
* Next parameters are made separate to be able to modify them between different runs keeping clt_parameters
* @param min_strenth minimal correlation strength to use tile
* @param max_diff maximal disparity difference between tiles and previous approximation to use tiles
* @param max_iterations maximal number of iterations to find disparity surface
* @param max_coeff_diff coefficients maximal change to continue iterations
* @param clt_parameters CLT parameters
* @param disp_strength array of a single or multiple disparity/strength pairs (0,2, .. - disparity,
* 1,3,.. - corresponding strengths
...
...
@@ -4132,29 +4162,194 @@ public class QuadCLT {
* @return per sub-camera, per direction (x,y) 6 quadratic polynomial coefficients, same format as fine_geometry_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+1);// int debugLevel)
if(debugLevel>-1){
System.out.println("process_infinity_corr(): ready to apply infinity correction");
show_fine_corr(
...
...
@@ -5110,7 +5285,33 @@ public class QuadCLT {
new_corr,
debugLevel+2);
}
/*
double [][][] new_corr1 = ac.infinityCorrection(
clt_parameters.fcorr_inf_strength, // final double min_strenth,
clt_parameters.fcorr_inf_diff, // final double max_diff,
clt_parameters.corr_magic_scale, // double magic_coeff, // still not understood coefficent that reduces reported disparity value. Seems to be around 8.5