kernel_centered,// double [] kernel, // should be (2*dtt_size-1) * (2*dtt_size-1) +2 size (last 2 are not modified)
kernel_centered,// double [] kernel, // should be (2*dtt_size-1) * (2*dtt_size-1) +4 size (last 4 are not modified)
clt_kernels[chn][tileY][tileX],// double [][] sym_kernels, // set of 4 SS, AS, SA, AA kdernels, each dtt_size * dtt_size (may have 5-th with center shift
if(globalDebugLevel>1)System.out.println("Threads done at "+IJ.d2s(0.000000001*(System.nanoTime()-startTime),3));
System.out.println("1.Threads done at "+IJ.d2s(0.000000001*(System.nanoTime()-startTime),3));
/* prepare result stack to return */
// Calculate differential offsets to interpolate for tiles between kernel centers
ImageDttimage_dtt=newImageDtt();
image_dtt.clt_fill_coord_corr(
clt_parameters.kernel_step,// final int kern_step, // distance between kernel centers, in pixels.
clt_kernels,// final double [][][][] clt_data,
threadsMax,// maximal number of threads to launch
globalDebugLevel);
returnclt_kernels;
}
publicdouble[][]flattenCLTKernels(// per color, save 4 kernelas and displacement as (2*dtt_size+1)*(2*dtt_size) tiles in an image (last row - shift x,y)
publicdouble[][]flattenCLTKernels(// per color, save 4 kernelas and displacement as (2*dtt_size+1)*(2*dtt_size) tiles in an image (last row - 4 values shift x,y)
finaldouble[][][][][]kernels,// per color/per tileY/ per tileX/per quadrant (plus offset as 5-th)/per pixel
finalintthreadsMax,// maximal number of threads to launch
double[][]flat_kernels=flattenCLTKernels(// per color, save 4 kernelas and displacement as (2*dtt_size+1)*(2*dtt_size) tiles in an image (last row - shift x,y)
kernels,// per color/per tileY/ per tileX/per quadrant (plus offset as 5-th)/per pixel
threadsMax,// maximal number of threads to launch
...
...
@@ -1261,7 +1283,7 @@ public class EyesisDCT {
}else{
scale_asym=1.0;
}
// Compensate for Bayer pattern where there are twice less R,B than G
// Compensate for Bayer pattern where there are twice less R,B than G green red blue
imp_src.setProperty("channel",srcChannel);// it may already have channel
imp_src.setProperty("path",sourceFiles[nFile]);// it may already have channel
// ImagePlus result=processChannelImage( // returns ImagePlus, but it already should be saved/shown
processCLTChannelImage(// returns ImagePlus, but it already should be saved/shown
imp_src,// 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,
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 "+
System.out.println("Vignetting data for channel "+channel+" has "+eyesisCorrections.channelVignettingCorrection[channel].length+" pixels, image "+path+" has "+pixels.length);
(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
double[]dst_kernel,// should be (2*dtt_size-1) * (2*dtt_size-1) +2 size - kernel and dx, dy to the nearest 1/2 pixels
double[]dst_kernel,// should be (2*dtt_size-1) * (2*dtt_size-1) + extra_items size - kernel and dx, dy to the nearest 1/2 pixels + actual full center shift)