fft_size*subpixel,// number of Bayer cells in width of the square selection (half number of pixels)
fft_size*subpixel,// number of Bayer cells in width of the square selection (half number of pixels)
0.0,// selection center, X (in pixels)
0.0,// selection center, X (in pixels)
0.0);// selection center, y (in pixels)
0.0);// selection center, y (in pixels)
if(subpixel>1){
if(subpixel>1){
if(colorComponents.colorsToCorrect[5])simul_pixels=combineCheckerGreens(simul_pixels,// pixel arrays after oversampleFFTInput() or extractSimulPatterns())
if(colorComponents.colorsToCorrect[5])simul_pixels=combineCheckerGreens(simul_pixels,// pixel arrays after oversampleFFTInput() or extractSimulPatterns())
subpixel);// same as used in oversampleFFTInput() - oversampling ratio
subpixel);// same as used in oversampleFFTInput() - oversampling ratio
...
@@ -2791,23 +2790,20 @@ public class EyesisAberrations {
...
@@ -2791,23 +2790,20 @@ public class EyesisAberrations {
if(colorComponents.colorsToCorrect[5])input_bayer=combineCheckerGreens(input_bayer,// pixel arrays after oversampleFFTInput() or extractSimulPatterns())
if(colorComponents.colorsToCorrect[5])input_bayer_or_mono=combineCheckerGreens(input_bayer_or_mono,// pixel arrays after oversampleFFTInput() or extractSimulPatterns())
subpixel);// same as used in oversampleFFTInput() - oversampling ratio
subpixel);// same as used in oversampleFFTInput() - oversampling ratio
}
}
for(i=0;i<4;i++)if(!colorComponents.colorsToCorrect[i])input_bayer[i]=null;// leave composite greens even if disabled
for(i=0;i<4;i++)if(!colorComponents.colorsToCorrect[i])input_bayer_or_mono[i]=null;// leave composite greens even if disabled
double[][]PSF_shifts=newdouble[input_bayer.length][];// X/Y shift of the PSF array, in Bayer component pixel coordinates (same as PSF arrays)
double[][]PSF_centroids=newdouble[input_bayer.length][];// X/Y coordinates of the centroids of PSF in Bayer component pioxel coordinates (same as PSF arrays) (after they were optionally shifted)
double[][]PSF_shifts=newdouble[input_bayer_or_mono.length][];// X/Y shift of the PSF array, in Bayer component pixel coordinates (same as PSF arrays)
double[][]lateralChromatic=newdouble[input_bayer.length][];// X/Y coordinates of the centroids of Bayer component PSF in sensor pixel coordinates
double[][]PSF_centroids=newdouble[input_bayer_or_mono.length][];// X/Y coordinates of the centroids of PSF in Bayer component pioxel coordinates (same as PSF arrays) (after they were optionally shifted)
double[][]lateralChromatic=newdouble[input_bayer_or_mono.length][];// X/Y coordinates of the centroids of Bayer component PSF in sensor pixel coordinates
kernels[i]=combinePSF(inverted[i],// Square array of pixels with multiple repeated PSF (alternating sign)
inverted[i],// Square array of pixels with multiple repeated PSF (alternating sign)
!psfParameters.absoluteCenter,//true, // master, force ignoreChromatic
!psfParameters.absoluteCenter,//true, // master, force ignoreChromatic
PSF_shifts[i],// centerXY[] - will be modified inside combinePSF() if PSF_PARS.ignoreChromatic is true
PSF_shifts[i],// centerXY[] - will be modified inside combinePSF() if PSF_PARS.ignoreChromatic is true
PSF_centroids[i],// will return array of XY coordinates of the result centroid
PSF_centroids[i],// will return array of XY coordinates of the result centroid
...
@@ -2940,12 +2937,13 @@ public class EyesisAberrations {
...
@@ -2940,12 +2937,13 @@ public class EyesisAberrations {
title+"_"+i,// reduce the PSF cell size to this part of the area connecting first negative clones
title+"_"+i,// reduce the PSF cell size to this part of the area connecting first negative clones
(globalDebugLevel>4),
(globalDebugLevel>4),
globalDebugLevel
globalDebugLevel
);
);
if(globalDebugLevel>debugThreshold)System.out.println(x0+":"+y0+"After-1: color Component "+i+" PSF_shifts["+i+"][0]="+IJ.d2s(PSF_shifts[i][0],3)+" PSF_shifts["+i+"][1]="+IJ.d2s(PSF_shifts[i][1],3));
if(globalDebugLevel>debugThreshold)System.out.println(x0+":"+y0+"After-1: color Component "+i+" PSF_shifts["+i+"][0]="+IJ.d2s(PSF_shifts[i][0],3)+" PSF_shifts["+i+"][1]="+IJ.d2s(PSF_shifts[i][1],3));
if(globalDebugLevel>debugThreshold)System.out.println(x0+":"+y0+"After-1: color Component "+i+" PSF_centroids["+i+"][0]="+IJ.d2s(PSF_centroids[i][0],3)+" PSF_centroids["+i+"][1]="+IJ.d2s(PSF_centroids[i][1],3));
if(globalDebugLevel>debugThreshold)System.out.println(x0+":"+y0+"After-1: color Component "+i+" PSF_centroids["+i+"][0]="+IJ.d2s(PSF_centroids[i][0],3)+" PSF_centroids["+i+"][1]="+IJ.d2s(PSF_centroids[i][1],3));
if(!psfParameters.ignoreChromatic&&!psfParameters.absoluteCenter){/* Recalculate center to pixels from greens (diagonal)) and supply it to other colors (lateral chromatic aberration correction) */
if(!psfParameters.ignoreChromatic&&!psfParameters.absoluteCenter){/* Recalculate center to pixels from greens (diagonal)) and supply it to other colors (lateral chromatic aberration correction) */
System.out.println("#!# "+x0+":"+y0+" "+"Lateral shift green from simulation "+IJ.d2s(lateralChromaticAbs[referenceComp],3)+"pix(sensor): ["+referenceComp+"][0]="+IJ.d2s(lateralChromatic[referenceComp][0],3)+
System.out.println("#!# "+x0+":"+y0+" "+"Lateral shift green from simulation "+IJ.d2s(lateralChromaticAbs[referenceComp],3)+"pix(sensor): ["+referenceComp+"][0]="+IJ.d2s(lateralChromatic[referenceComp][0],3)+