IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13364


Ignore:
Timestamp:
May 11, 2007, 2:21:19 PM (19 years ago)
Author:
Paul Price
Message:

Confused columns and rows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/imcombine/pmSubtractionStamps.c

    r13340 r13364  
    6060    PS_ASSERT_INT_LARGER_THAN(image->numRows, (2 * footprint), NULL);
    6161
    62     int xNumStamps = image->numCols / spacing; // Number of stamps in x dimension
    63     int yNumStamps = image->numRows / spacing; // Number of stamps in y dimension
     62    int xNumStamps = image->numCols / spacing + 1; // Number of stamps in x dimension
     63    int yNumStamps = image->numRows / spacing + 1; // Number of stamps in y dimension
    6464
    6565    if (stamps) {
     
    9595
    9696                // Bounds of region to search for stamp
    97                 int yMin = footprint + j * (numCols - 2.0 * footprint) / yNumStamps;
    98                 int yMax = footprint + (j + 1) * (numCols - 2.0 * footprint) / yNumStamps - 1;
    99                 int xMin = footprint + i * (numRows - 2.0 * footprint) / xNumStamps;
    100                 int xMax = footprint + (i + 1) * (numRows - 2.0 * footprint) / xNumStamps - 1;
     97                int yMin = footprint + j * (numRows - 2.0 * footprint) / yNumStamps;
     98                int yMax = footprint + (j + 1) * (numRows - 2.0 * footprint) / yNumStamps - 1;
     99                int xMin = footprint + i * (numCols - 2.0 * footprint) / xNumStamps;
     100                int xMax = footprint + (i + 1) * (numCols - 2.0 * footprint) / xNumStamps - 1;
    101101                assert(yMax < image->numRows && xMax < image->numCols && yMin >= 0 && xMin >= 0);
    102102
Note: See TracChangeset for help on using the changeset viewer.