tile[chn],// will be filled, should have correct size before call
tile[chn],// will be filled, should have correct size before call
...
@@ -193,7 +193,7 @@ public class DebayerScissors {
...
@@ -193,7 +193,7 @@ public class DebayerScissors {
fht_instance.inverseTransform(tile[chn]);
fht_instance.inverseTransform(tile[chn]);
fht_instance.swapQuadrants(tile[chn]);
fht_instance.swapQuadrants(tile[chn]);
/* accumulate result */
/* 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"
* 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 {
...
@@ -206,31 +206,35 @@ public class DebayerScissors {
@@ -503,12 +576,14 @@ public class deBayerScissors {
...
@@ -503,12 +576,14 @@ public class deBayerScissors {
returngenPolarMask(polarAmps,0,mode);
returngenPolarMask(polarAmps,0,mode);
}
}
publicdouble[]genPolarRedBlueMask(double[]polarAmps,// polar array of amplitude values, <0 - stop
publicdouble[]genPolarRedBlueMask(
intmode){// result mode - 0: output mask as 0/1, 1 -output proportional, positive - pass, negative - rejected
double[]polarAmps,// polar array of amplitude values, <0 - stop
returngenPolarMask(polarAmps,1,mode);
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
publicdouble[]genPolarMask(double[]polarAmps,// polar array of amplitude values, <0 - stop
inttype,// 0 - green, 1 red/blue
inttype,// 0 - green, 1 red/blue
intmode){// result mode - 0: output mask as 0/1, 1 -output proportional, positive - pass, negative - rejected
intmode){// result mode - 0: output mask as 0/1, 1 -output proportional, positive - pass, negative - rejected
...
@@ -536,11 +611,14 @@ public class deBayerScissors {
...
@@ -536,11 +611,14 @@ public class deBayerScissors {
step++;
step++;
/* add polar point index */
/* add polar point index */
newVal=good?step:-step;
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?