IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 4, 2009, 10:50:29 AM (17 years ago)
Author:
Paul Price
Message:

Wasn't determining range properly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/imageops/psImageCovariance.c

    r21281 r21285  
    117117    PS_ASSERT_ARRAY_NON_EMPTY(array, NULL);
    118118
    119     int xMin = INT_MAX, xMax = INT_MIN, yMin = INT_MAX, yMax = INT_MIN; // Range for covariance
     119    int xMin = INT_MAX, xMax = -INT_MIN, yMin = INT_MAX, yMax = -INT_MIN; // Range for covariance
    120120    int num = 0;                        // Number of good matrices to average
    121121    for (int i = 0; i < array->n; i++) {
     
    127127        xMax = PS_MAX(xMax, covar->xMax);
    128128        yMin = PS_MIN(yMin, covar->yMin);
    129         yMax = PS_MIN(yMax, covar->yMax);
     129        yMax = PS_MAX(yMax, covar->yMax);
    130130        num++;
    131131    }
Note: See TracChangeset for help on using the changeset viewer.