IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14302


Ignore:
Timestamp:
Jul 18, 2007, 2:53:12 PM (19 years ago)
Author:
Paul Price
Message:

Adding protection for size of image in convolution. If the kernel
size is large, the edge of the image could get hit.

File:
1 edited

Legend:

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

    r14281 r14302  
    44 *  @author GLG, MHPCC
    55 *
    6  *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
    7  *  @date $Date: 2007-07-18 03:43:49 $
     6 *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
     7 *  @date $Date: 2007-07-19 00:53:12 $
    88 *
    99 *  Copyright 2004-2007 Institute for Astronomy, University of Hawaii
     
    991991#endif
    992992
    993             for (int y = j; y < j + fullSize; y++) {
    994                 for (int x = i; x < i + fullSize; x++) {
     993            for (int y = j; y < PS_MIN(j + fullSize, numRows); y++) {
     994                for (int x = i; x < PS_MIN(i + fullSize, numCols); x++) {
    995995                    convImage->data.F32[y][x] = background;
    996996
Note: See TracChangeset for help on using the changeset viewer.