IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19710


Ignore:
Timestamp:
Sep 23, 2008, 2:10:00 PM (18 years ago)
Author:
Paul Price
Message:

Need to be explicit about the dimensions since psImageBinning is not.

File:
1 edited

Legend:

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

    r19709 r19710  
    3131    psImage *outImage = out->image = psImageRecycle(out->image,  numColsOut, numRowsOut, PS_TYPE_F32);
    3232
     33    int xLast = numColsIn - 1, yLast = numRowsIn - 1; // Last index
    3334    int yStart = psImageBinningGetFineY(binning, 0); // Starting input y for binning
    3435    for (int yOut = 0; yOut < numRowsOut; yOut++) {
    3536        int yStop = psImageBinningGetFineY(binning, yOut + 1); // Stopping input y for binning
     37        yStop = PS_MIN(yStop, yLast);
    3638        int xStart = psImageBinningGetFineX(binning, 0); // Starting input x for binning
    3739        for (int xOut = 0; xOut < numColsOut; xOut++) {
    3840            int xStop = psImageBinningGetFineX(binning, xOut + 1); // Stopping input x for binning
     41            xStop = PS_MIN(xStop, xLast);
    3942
    4043            float sum = 0.0;            // Sum of pixels
Note: See TracChangeset for help on using the changeset viewer.