IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28282


Ignore:
Timestamp:
Jun 10, 2010, 7:28:08 AM (16 years ago)
Author:
Paul Price
Message:

Add masking.

Location:
trunk/ppBackground/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppBackground/src/ppBackgroundCamera.c

    r28280 r28282  
    6868    output->save = true;
    6969
     70    pmFPAfile *outMask = pmFPAfileDefineOutput(data->config, output->fpa, "PPBACKGROUND.OUTPUT.MASK");
     71    if (!outMask) {
     72        psError(psErrorCodeLast(), false, "Unable to define output.");
     73        return false;
     74    }
     75    outMask->save = true;
     76
    7077#if 0
    7178    // Now the camera has been determined, we can read the recipe
  • trunk/ppBackground/src/ppBackgroundRestore.c

    r28280 r28282  
    2222        return false;
    2323    }
    24     psImage *image = ro->image;                             // Image to correct
     24    psImage *image = ro->image, *mask = ro->mask;           // Image to correct
    2525    int numCols = image->numCols, numRows = image->numRows; // Size of image
    2626
     
    5858        pmReadout *patternRO = pmFPAviewThisReadout(view, pattern->parent); // Readout with pattern
    5959        psImage *patternImage = patternRO->image; // Image with pattern
     60        psImage *patternMask = patternRO->mask;   // Mask for pattern
    6061        for (int y = 0; y < numRows; y++) {
    6162            for (int x = 0; x < numCols; x++) {
    6263                image->data.F32[y][x] += patternImage->data.F32[y][x];
     64                mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] |= patternMask->data.PS_TYPE_IMAGE_MASK_DATA[y][x];
    6365            }
    6466        }
Note: See TracChangeset for help on using the changeset viewer.