System.out.print(String.format("Tiles per quadrants :[%d, %d, %d, %d], tiles at infinity %d",pq[0],pq[1],pq[2],pq[3],num_inf));
}
if(per_quad[1]<min_per_quadrant){
if(debugLevel>-20){
System.out.print(String.format("Too few tiles in quadrants :[%d, %d, %d, %d], minimum for the second worst is %d",pq[0],pq[1],pq[2],pq[3],min_per_quadrant));
}
returnnull;
}
if(num_inf<min_inf){
if(debugLevel>-20){
System.out.print(String.format("Too few tiles at infinity: %d minimum is %d",num_inf,min_inf));
System.out.println("Too few infinity tiles to boost ("+num_inf+" < "+min_inf_to_scale+", keeping original weights");
}
}elseif(weights[0]>weights[1]){
if(debugLevel>-1){
System.out.println("Boosting weights of far tiles (weights[0]="+weights[0]+", weights[1]="+weights[1]);
}
for(intns=0;ns<2;ns++){
for(intnTile=0;nTile<num_tiles;nTile++){
inf_and_ly[ns*NUM_SLICES+1][nTile]*=weights[ns];
}
}
for(Samples:inf_samples_list){
s.weight*=weights[0];
}
}else{
if(debugLevel>-1){
System.out.println("There are already more far tiles than requested (weights[0]="+weights[0]+", weights[1]="+weights[1]+", so keeping original weights");
}
}
for(Samples:inf_samples_list){
s.weight*=weights[0];
}
// } else {
// inf_samples_list = new ArrayList<Sample>(); // do not use infinity at all
System.out.print(String.format("Too few tiles in quadrants :[%d, %d, %d, %d], minimum for the second worst is %d",pq[0],pq[1],pq[2],pq[3],min_per_quadrant));
}
returnnull;
}
if(num_inf<min_inf){
if(debugLevel>-20){
System.out.print(String.format("Too few tiles at infinity (<%4f): %d minimum is %d",inf_max_disparity,num_inf,min_inf));
}
returnnull;
}
if(debugLevel>-20){
System.out.print(String.format("Tiles per quadrants :[%d, %d, %d, %d], tiles at infinity %d",pq[0],pq[1],pq[2],pq[3],num_inf));
if(equirectangularParameters.clearAllMaps)eyesisCorrections.pixelMapping.deleteEquirectangularMapAll(srcChannel);// save memory? //removeUnusedSensorData - no, use equirectangular specific settings
}
//pixelMapping
Runtime.getRuntime().gc();
// Runtime.getRuntime().gc();
if(debugLevel>-1)System.out.println("Processing image "+(iImage+1)+" (of "+fileIndices.length+") finished at "+
if(equirectangularParameters.clearAllMaps)eyesisCorrections.pixelMapping.deleteEquirectangularMapAll(srcChannel);// save memory? //removeUnusedSensorData - no, use equirectangular specific settings
}
//pixelMapping
Runtime.getRuntime().gc();
// Runtime.getRuntime().gc();
if(debugLevel>-1)System.out.println("Processing image "+(iImage+1)+" (of "+fileIndices.length+") finished at "+
clt_parameters.corr_magic_scale,// double magic_coeff, // still not understood coefficent that reduces reported disparity value. Seems to be around 8.5
debugLevelInner-1);// + (clt_parameters.fine_dbg ? 1:0)); // int debugLevel)
/// geometryCorrection_main, //final GeometryCorrection geometryCorrection_main, // if not null - this is an AUX camera of a rig
adjust_poly,// final boolean use_poly,
...
...
@@ -7232,8 +7271,8 @@ public class QuadCLT {
clt_parameters.ly_smpl_side,// 3, // final int lazyEyeSmplSide, // = 2; // Sample size (side of a square)
clt_parameters.ly_smpl_num,// 5, // final int lazyEyeSmplNum, // = 3; // Number after removing worst (should be >1)
clt_parameters.ly_smpl_rms,// 0.1, // final double lazyEyeSmplRms, // = 0.1; // Maximal RMS of the remaining tiles in a sample
clt_parameters.ly_disp_var,// 0.2, // final double lazyEyeDispVariation, // 0.2, maximal full disparity difference between tgh tile and 8 neighborxs
clt_parameters.ly_disp_rvar,// 0.2, // final double lazyEyeDispRelVariation, // 0.02 Maximal relative full disparity difference to 8 neighbors
clt_parameters.ly_disp_var_gt,// 0.2, // final double lazyEyeDispVariation, // 0.2, maximal full disparity difference between tgh tile and 8 neighborxs
clt_parameters.ly_disp_rvar_gt,// 0.2, // final double lazyEyeDispRelVariation, // 0.02 Maximal relative full disparity difference to 8 neighbors
clt_parameters.ly_norm_disp,// final double ly_norm_disp, // = 5.0; // Reduce weight of higher disparity tiles
clt_parameters.inf_smpl_side,// 3, // final int smplSide, // = 2; // Sample size (side of a square)
clt_parameters.inf_smpl_num,// 5, // final int smplNum, // = 3; // Number after removing worst (should be >1)
...
...
@@ -7248,6 +7287,10 @@ public class QuadCLT {
clt_parameters.ih_min_samples,// 10, // final int hist_min_samples,
clt_parameters.ih_norm_center,// true, // final boolean hist_norm_center, // if there are more tiles that fit than min_samples, replace with
clt_parameters.ly_inf_frac,// 0.5, // final double inf_fraction, // fraction of the weight for the infinity tiles
clt_parameters.getLyPerQuad(num_tiles),// final int min_per_quadrant, // minimal tiles per quadrant (not counting the worst) tp proceed
0,// clt_parameters.getLyInf(num_tiles), // final int min_inf, // minimal number of tiles at infinity to proceed
clt_parameters.getLyInfScale(num_tiles),// final int min_inf_to_scale, // minimal number of tiles at infinity to apply weight scaling
clt_parameters.ly_inf_max_disparity,// inf_max_disparity, // final double inf_max_disparity, // use all smaller disparities as inf_fraction
clt_parameters.corr_magic_scale,// double magic_coeff, // still not understood coefficent that reduces reported disparity value. Seems to be around 8.5
debugLevelInner-1);// + (clt_parameters.fine_dbg ? 1:0)); // int debugLevel)
thrownewException("Set names for cameras do not match: main camera: '"+set_channels_main[nSet].name()+"', aux. camera: '"+set_channels_main[nSet].name()+"'");
Stringx3d_path=quadCLT_main.correctionsParameters.selectX3dDirectory(// for x3d and obj
quadCLT_main.correctionsParameters.getModelName(quadCLT_main.image_name),// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
Stringx3d_path=quadCLT_main.correctionsParameters.selectX3dDirectory(// for x3d and obj
quadCLT_main.correctionsParameters.getModelName(quadCLT_main.image_name),// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false
Stringx3d_path=quadCLT_main.correctionsParameters.selectX3dDirectory(// for x3d and obj
quadCLT_main.correctionsParameters.getModelName(quadCLT_main.image_name),// quad timestamp. Will be ignored if correctionsParameters.use_x3d_subdirs is false