tile[chn],// will be filled, should have correct size before call
...
...
@@ -149,8 +175,8 @@ public class DebayerScissors {
debayerParameters.debayerThreshold,// no high frequencies - use default uniform filter
debayerParameters.debayerGamma,// power function applied to the amplitudes before generating spectral masks
debayerParameters.debayerBonus,// scale far pixels as (1.0+bonus*r/rmax)
debayerParameters.mainToAlias,// relative main/alias amplitudes to enable lixels (i.e. 0.5 means that if alias is >0.5*main, the pixel will be masked out)
debayerParameters.debayerMaskBlur,// for both masks sigma for gaussian blur of the binary masks (<0 -do not use "scissors")
debayerParameters.mainToAlias,// relative main/alias amplitudes to enable pixels (i.e. 0.5 means that if alias is >0.5*main, the pixel will be masked out)
debayerParameters.debayerMaskBlur,// for both masks sigma for Gaussian blur of the binary masks (<0 -do not use "scissors")
debayerParameters.debayerUseScissors,// use "scissors", if false - just apply "diamond" ands "square" with DEBAYER_PARAMETERS.debayerRelativeWidthGreen and DEBAYER_PARAMETERS.debayerRelativeWidthRedblue
@@ -166,11 +192,13 @@ public class DebayerScissors {
fht_instance.inverseTransform(tile[chn]);
fht_instance.swapQuadrants(tile[chn]);
/* accumulate result */
/*This is synchronized method. It is possible to make threads to write to non-overlapping regions of the outPixles, but as the accumulation
* takes just small fraction of severtal FHTs, it should be OK - reasonable number of threads will spread and not "stay in line"
/*This is (now was) a synchronized method. It is possible to make threads to write to non-overlapping regions of the outPixles, but as the accumulation
* takes just small fraction of several FHTs, it should be OK - reasonable number of threads will spread and not "stay in line"
*/
accumulateSquareTile(outPixles[chn],// float pixels array to accumulate tile
//accumulateSquareTile(
nonSyncAccumulateSquareTile(
outPixles[chn],// float pixels array to accumulate tile
tile[chn],// data to accumulate to the pixels array
imgWidth,// width of pixels array
tileX*step,// left corner X
...
...
@@ -178,22 +206,34 @@ public class DebayerScissors {
finalinttilesY=imgHeight/step-1;// vertical number of overlapping tiles in the source image (should be expanded from the registerd one by "step" in each direction)
finalintkernelWidth=kernelStack.getWidth();
finalintkernelNumHor=kernelWidth/(size/2);
finalintnChn=imageStack.getSize();
finalfloat[][]outPixels=newfloat[nChn][length];// GLOBAL same as input
// float [][] outPixels=new float[nChn][length]; // same as input
// System.out.println("----- physical camera #"+cam_port_arr[i].x+", sensor_port="+cam_port_arr[i].y);
// }
System.out.println("----- This filename subcamera "+subCamera+": physical camera "+cam_port_arr[subCamera].x+", sensor_port "+cam_port_arr[subCamera].y);
if(subCamera>=cam_port_arr.length){
System.out.println("Error: Subcamera "+subCamera+" > that total namera of sensor ports in the system = "+cam_port_arr.length);