IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19648


Ignore:
Timestamp:
Sep 22, 2008, 2:12:30 PM (18 years ago)
Author:
Paul Price
Message:

Add masking to statistics.

File:
1 edited

Legend:

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

    r14935 r19648  
    55 *  @author EAM, IfA
    66 *
    7  *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2007-09-21 00:02:11 $
     7 *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2008-09-23 00:12:30 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    161161    psStats *stats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN);
    162162    stats->nSubsample = 10000;
    163     if (!psImageBackground(stats, NULL, readout->image, NULL, 0, rng)) {
     163    psMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask
     164    if (!psImageBackground(stats, NULL, readout->image, readout->mask, maskVal, rng)) {
    164165        psStats *statsAlt = psStatsAlloc(PS_STAT_SAMPLE_MEAN | PS_STAT_SAMPLE_STDEV);
    165166        stats->nSubsample = 10000;
    166         if (!psImageBackground(stats, NULL, readout->image, NULL, 0, rng)) {
     167        if (!psImageBackground(stats, NULL, readout->image, readout->mask, maskVal, rng)) {
    167168            psLogMsg("jpeg", PS_LOG_WARN, "Unable to measure statistics for image, writing blank jpeg\n");
    168169            mean = 0;
Note: See TracChangeset for help on using the changeset viewer.