IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 29, 2006, 10:08:38 AM (20 years ago)
Author:
Paul Price
Message:

Fixing statistics for single overscan value.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/detrend/pmSubtractBias.c

    r9730 r10282  
    99#include "pmFPA.h"
    1010#include "pmSubtractBias.h"
    11 
    12 #define PM_SUBTRACT_BIAS_POLYNOMIAL_ORDER 2
    13 #define PM_SUBTRACT_BIAS_SPLINE_ORDER 3
    1411
    1512
     
    215212    }
    216213
     214    //    psTime *time = psTimeGetNow(PS_TIME_TAI); // The time now, used for reporting
     215
    217216    psImage *image = in->image;         // The input image
    218217
     
    245244                int index = pixels->n;  // Index
    246245                pixels = psVectorRealloc(pixels, pixels->n + overscan->numRows * overscan->numCols);
     246                pixels->n += overscan->numRows * overscan->numCols;
    247247                // XXX Reimplement with memcpy
    248248                for (int i = 0; i < overscan->numRows; i++) {
     
    256256
    257257            (void)psVectorStats(stats, pixels, NULL, NULL, 0);
     258            psFree(pixels);
    258259            double reduced = psStatsGetValue(stats, statistic); // Result of statistics
    259260            (void)psBinaryOp(image, image, "-", psScalarAlloc((float)reduced, PS_TYPE_F32));
Note: See TracChangeset for help on using the changeset viewer.