Changeset 19357 for trunk/psModules/src/imcombine/pmSubtraction.c
- Timestamp:
- Sep 4, 2008, 1:56:52 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/imcombine/pmSubtraction.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmSubtraction.c
r19344 r19357 446 446 447 447 // Get bounds of threshold region 448 // Start with the entire kernel, and keep reducing the size of the box until it drops belowthreshold449 int box = kernels->size; // Size of box with bad pixels450 for (double sumBox = sumKernel2;box > 0; box--) {448 // Start with the entire kernel, and keep reducing the size of the box until it sum goes above threshold 449 int box = kernels->size; // Size of box with bad pixels 450 for (double sumBox = 0.0; sumBox < threshold && box > 0; box--) { 451 451 for (int x = -box; x <= box; x++) { 452 sumBox -= PS_SQR(kernel->kernel[-box][x]) + PS_SQR(kernel->kernel[box][x]);452 sumBox += PS_SQR(kernel->kernel[-box][x]) + PS_SQR(kernel->kernel[box][x]); 453 453 } 454 454 for (int y = -box + 1; y <= box - 1; y++) { 455 455 // Note: not doing corners 456 sumBox -= PS_SQR(kernel->kernel[y][-box]) + PS_SQR(kernel->kernel[y][box]); 457 } 458 if (sumBox < threshold) { 459 break; 456 sumBox += PS_SQR(kernel->kernel[y][-box]) + PS_SQR(kernel->kernel[y][box]); 460 457 } 461 458 } … … 731 728 } 732 729 730 psLogMsg("psModules.imcombine", PS_LOG_INFO, "RMS deviation from %d stamps: %lf", numStamps, rms); 731 733 732 if (!isfinite(sigmaRej) || sigmaRej <= 0.0) { 734 733 // User just wanted to calculate and record the RMS for posterity 735 psLogMsg("psModules.imcombine", PS_LOG_INFO, "RMS deviation from %d stamps: %lf",736 numStamps, rms);737 734 return 0; 738 735 }
Note:
See TracChangeset
for help on using the changeset viewer.
