IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41919


Ignore:
Timestamp:
Nov 19, 2021, 10:45:33 AM (5 years ago)
Author:
eugene
Message:

reset nGoodBits for each pixel, skip mask = 0 pixels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20211108/psModules/src/imcombine/pmStack.c

    r41909 r41919  
    15791579    int nGoodBits[16]; // accumulate the good pixel bits here for fuzzy logic
    15801580    psAssert (sizeof(psImageMaskType) == 2, "psImageMaskType is not the expected size");
    1581     memset (nGoodBits, 0, 16*sizeof(int));
    15821581
    15831582    for (int y = minInputRows; y < maxInputRows; y++) {
     
    15851584
    15861585            int nGood = 0;
     1586            memset (nGoodBits, 0, 16*sizeof(int));
    15871587            for (int i = 0; i < stackData->n; i++) {
    15881588
     
    16081608                // NOTE: since we have explicitly skipped the pixels with any bad bits, these are only
    16091609                // the suspect bits (nGoodBits is a bit of a misnomer: it is more like 'nSuspectBitsForGoodInputs'
     1610                // NOTE: skip the full bit-by-bit check if we know the mask byte is empty
    16101611                psImageMaskType value = 0x0001;
    1611                 for (int nbit = 0; nbit < 16; nbit ++) {
     1612                for (int nbit = 0; mask->data.PS_TYPE_IMAGE_MASK_DATA[yIn][xIn] && (nbit < 16); nbit ++) {
    16121613                    if (mask->data.PS_TYPE_IMAGE_MASK_DATA[yIn][xIn] & value) {
    16131614                        nGoodBits[nbit] ++;
     
    16981699                expmaps->image->data.F32[y][x] = sum;
    16991700            }
    1700             if (expmaps) { expmaps->mask->data.F32[y][x] = Ne - Ns; }
     1701            if (expmaps) { expmaps->mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] = Ne - Ns; }
    17011702        }
    17021703    }
Note: See TracChangeset for help on using the changeset viewer.