IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36710 for trunk/psModules


Ignore:
Timestamp:
Apr 30, 2014, 7:04:03 PM (12 years ago)
Author:
mhuber
Message:

adding option for minimum inputs per pixel in stack, default is 1

Location:
trunk/psModules/src/imcombine
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/imcombine/pmStack.c

    r36651 r36710  
    835835                          psImageMaskType goodMask, // Value for good pixels
    836836                          bool safe,           // Safe combination?
     837                          int nminpix,         // Minimum number of input per pixel
    837838                          float invTotalWeight    // Inverse of total weight for all inputs
    838839                          )
     
    854855    CHECKPIX(x, y, "bad vs good : %x %x %x\n", maskValue, badMask, blankMask);
    855856
    856     switch (num) {
     857    //MEH -- hackish adding of lower limit for input per pixel
     858    int numN = num;
     859    if (num < nminpix) {
     860        CHECKPIX(x, y, "Nmin (%d) inputs (%d) to combine, pixel %d,%d is manually set bad\n", nminpix, numN, x, y);
     861        numN = 0;
     862    }
     863    switch (numN) {
    857864      case 0: {
    858865          // Nothing to combine: it's bad
     
    15181525    bool useVariance,
    15191526    bool safe,
     1527    int nminpix,
    15201528    bool rejection)
    15211529{
     
    16921700            psImageMaskType goodMask = 0; // OR of mask bits in all good input pixels
    16931701            combineExtract(&num, &suspect, &badMask, &goodMask, buffer, combinedImage, combinedMask, combinedVariance, input, weights, exps, addVariance, reject, x, y, badMaskBits, suspectMaskBits);
    1694             combinePixels(combinedImage, combinedMask, combinedVariance, exp, expnum, expweight, num, buffer, x, y, blankMaskBits, badMask, goodMask, safe, totalExpWeight);
     1702            combinePixels(combinedImage, combinedMask, combinedVariance, exp, expnum, expweight, num, buffer, x, y, blankMaskBits, badMask, goodMask, safe, nminpix, totalExpWeight);
    16951703
    16961704            if (iter > 0) {
  • trunk/psModules/src/imcombine/pmStack.h

    r34842 r36710  
    6161                    bool useVariance,   ///< Use variance values for rejection?
    6262                    bool safe,          ///< Play safe with small numbers of input pixels (mask if N <= 2)?
     63                    int nminpix,        ///< Minimum number input per pixel to combine
    6364                    bool rejectInspect  ///< Reject pixels instead of marking them for inspection?
    6465    );
Note: See TracChangeset for help on using the changeset viewer.