System.out.println("Vignetting data for channel "+srcChannel+" has "+eyesisCorrections.channelVignettingCorrection[srcChannel].length+" pixels, image "+sourceFiles[nFile]+" has "+pixels.length);
processCLTSetImage(// returns ImagePlus, but it already should be saved/shown
imp_srcs[srcChannel],// should have properties "name"(base for saving results), "channel","path"
clt_parameters,
debayerParameters,
nonlinParameters,
colorProcParameters,
channelGainParameters,
rgbParameters,
convolveFFTSize,// 128 - fft size, kernel size should be size/2
scaleExposure[srcChannel],
threadsMax,// maximal number of threads to launch
updateStatus,
debugLevel);
// warp result (add support for different color modes)
if(this.correctionsParameters.equirectangular){
if(equirectangularParameters.clearFullMap)eyesisCorrections.pixelMapping.deleteEquirectangularMapFull(srcChannel);// save memory? //removeUnusedSensorData - no, use equirectangular specific settings
if(equirectangularParameters.clearAllMaps)eyesisCorrections.pixelMapping.deleteEquirectangularMapAll(srcChannel);// save memory? //removeUnusedSensorData - no, use equirectangular specific settings
}
//pixelMapping
Runtime.getRuntime().gc();
if(debugLevel>-1)System.out.println("Processing image "+(iImage+1)+" (of "+fileIndices.length+") finished at "+
(tilesX + 1) * dct_parameters.dct_size, // final int width,
dct_parameters.dct_size, // final int step, //(does not need to be this) // just for multi-threading efficiency?
dct_parameters.nonlin_max_y, // final double nonlin_max_y = 1.0; // maximal amount of nonlinear line/edge emphasis for Y component
dct_parameters.nonlin_max_c, // final double nonlin_max_c = 1.0; // maximal amount of nonlinear line/edge emphasis for C component
dct_parameters.nonlin_y, // final double nonlin_y, // = 0.01; // amount of nonlinear line/edge emphasis for Y component
dct_parameters.nonlin_c, // final double nonlin_c, // = 0.01; // amount of nonlinear line/edge emphasis for C component
dct_parameters.nonlin_corn, // final double nonlin_corn, // = 0.5; // relative weight for nonlinear corner elements
(dct_parameters.denoise? dct_parameters.denoise_y:0.0), // final double denoise_y, // = 1.0; // maximal total smoothing of the Y post-kernel (will compete with edge emphasis)
(dct_parameters.denoise? dct_parameters.denoise_c:0.0), // final double denoise_c, // = 1.0; // maximal total smoothing of the color differences post-kernel (will compete with edge emphasis)
dct_parameters.denoise_y_corn, // final double denoise_y_corn, // = 0.5; // weight of the 4 corner pixels during denoise y (relative to 4 straight)
dct_parameters.denoise_c_corn, // final double denoise_c_corn, // = 0.5; // weight of the 4 corner pixels during denoise y (relative to 4 straight)
dct_parameters.dct_size, //, // final int threadsMax, // maximal number of threads to launch
publicdouble[][]pXY0=null;// sensor center XY in pixels
publicdoublecommon_right;// mm right, camera center
publicdoublecommon_forward;// mm forward (to target), camera center
publicdoublecommon_height;// mm up, camera center
publicdoublecommon_roll;// degrees CW (to target) camera as a whole
publicdouble[][]XYZ_he;// all cameras coordinates transformed to eliminate heading and elevation (rolls preserved)
publicdouble[][]XYZ_her=null;// XYZ of the lenses in a corrected CCS (adjusted for to elevation, heading, common_roll)
publicdouble[][]rXY=null;// XY pairs of the in a normal plane, relative to disparityRadius
publicdoublecameraRadius=0;// average distance from the "mass center" of the sencors to the sensors
publicdoubledisparityRadius=0;// distance between cameras to normalize disparity units to. sqrt(2)*disparityRadius for quad camera
privatedouble[]rByRDist=null;
privatedoublestepR=0.001;
privatedoublemaxR=2.0;// calculate up to this*distortionRadius
publicvoidsetDistortion(){
// imp.setProperty("distortion_formula", "(normalized by distortionRadius in mm) Rdist/R=A8*R^7+A7*R^6+A6*R^5+A5*R^4+A*R^3+B*R^2+C*R+(1-A6-A7-A6-A5-A-B-C)");
// imp.setProperty("distortion_formula", "(normalized by distortionRadius in mm) Rdist/R=A8*R^7+A7*R^6+A6*R^5+A5*R^4+A*R^3+B*R^2+C*R+(1-A6-A7-A6-A5-A-B-C)");