tile[chn],// will be filled, should have correct size before call
...
...
@@ -193,7 +193,7 @@ 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
/*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"
*/
...
...
@@ -206,31 +206,35 @@ public class DebayerScissors {
@@ -503,12 +576,14 @@ public class deBayerScissors {
returngenPolarMask(polarAmps,0,mode);
}
publicdouble[]genPolarRedBlueMask(double[]polarAmps,// polar array of amplitude values, <0 - stop
intmode){// result mode - 0: output mask as 0/1, 1 -output proportional, positive - pass, negative - rejected
returngenPolarMask(polarAmps,1,mode);
publicdouble[]genPolarRedBlueMask(
double[]polarAmps,// polar array of amplitude values, <0 - stop
intmode)
{// result mode - 0: output mask as 0/1, 1 -output proportional, positive - pass, negative - rejected
returngenPolarMask(polarAmps,1,mode);
}
// **** Seems to be most time-critical ****
publicdouble[]genPolarMask(double[]polarAmps,// polar array of amplitude values, <0 - stop
inttype,// 0 - green, 1 red/blue
intmode){// result mode - 0: output mask as 0/1, 1 -output proportional, positive - pass, negative - rejected
...
...
@@ -536,11 +611,14 @@ public class deBayerScissors {
step++;
/* add polar point index */
newVal=good?step:-step;
// index=iMax*iRadiusPlus1+rayLength[iMax]; // rayLength[iMax] should point to a new cell (with intMap[]==0) may ommit - set in the end of the loop and before the loop?