IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 25, 2010, 2:46:07 PM (16 years ago)
Author:
eugene
Message:

merge changes from eam_branches/ipp-20100823

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAMaskWeight.c

    r26893 r29544  
    476476}
    477477
    478 
    479 
     478// find any pixels which are not already masked (with maskTest) which are not valid and raise maskSet bits
     479bool pmReadoutMaskInvalid (const pmReadout *readout, psImageMaskType maskTest, psImageMaskType maskSet) {
     480
     481    if (!readout) return true;
     482
     483    psImage *image = readout->image;
     484    psImage *mask  = readout->mask;
     485    psImage *variance = readout->variance;
     486    for (int y = 0; y < image->numRows; y++) {
     487        for (int x = 0; x < image->numCols; x++) {
     488            if (mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskTest) continue;
     489            bool valid = false;
     490            valid = isfinite(image->data.F32[y][x]);
     491            if (valid && variance) {
     492                valid &= isfinite(variance->data.F32[y][x]);
     493            }
     494            if (valid) continue;
     495            mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] |= maskSet;
     496        }
     497    }
     498
     499    return true;
     500}
     501
     502// raise maskVal for any invalid pixels
    480503bool pmReadoutMaskNonfinite(pmReadout *readout, psImageMaskType maskVal)
    481504{
Note: See TracChangeset for help on using the changeset viewer.