IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17263


Ignore:
Timestamp:
Apr 1, 2008, 8:11:22 AM (18 years ago)
Author:
Paul Price
Message:

Ensure background is set to zero.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackMatch.c

    r17262 r17263  
    190190    assert((*regions)->n == (*kernels)->n);
    191191
     192    // Ensure the background value is zero
     193    psStats *bg = psStatsAlloc(PS_STAT_ROBUST_MEDIAN); // Statistics for background
     194    if (!psImageBackground(bg, NULL, readout->image, readout->mask, maskBad, rng)) {
     195        psWarning("Can't measure background for image.");
     196        psErrorClear();
     197    } else {
     198        (void)psBinaryOp(readout->image, readout->image, "+",
     199                         psScalarAlloc(- psStatsGetValue(bg, PS_STAT_ROBUST_MEDIAN), PS_TYPE_F32));
     200    }
    192201
    193202    psFree(output);
Note: See TracChangeset for help on using the changeset viewer.