Changeset 13366 for trunk/psModules/src/imcombine/pmSubtraction.c
- Timestamp:
- May 11, 2007, 4:00:39 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/imcombine/pmSubtraction.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/imcombine/pmSubtraction.c
r13340 r13366 4 4 * @author GLG, MHPCC 5 5 * 6 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $7 * @date $Date: 2007-05-1 1 02:21:01$6 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2007-05-12 02:00:39 $ 8 8 * 9 9 * Copyright 2004-2007 Institute for Astronomy, University of Hawaii … … 148 148 PS_ASSERT_INT_NONNEGATIVE(footprint, false); 149 149 150 int kernelSize = kernels->size; // Half-size of kernel151 PS_ASSERT_INT_LARGER_THAN(footprint, kernelSize, false);152 153 150 // Image size 154 151 int numCols = reference->numCols; … … 372 369 2.0 * (float)(stamp->y - numRows/2.0) / (float)numRows); 373 370 374 for (int y = yStamp - footprint; y <= yStamp +footprint; y++) {375 for (int x = xStamp - footprint; y <= xStamp +footprint; x++) {371 for (int y = - footprint; y <= footprint; y++) { 372 for (int x = footprint; x <= footprint; x++) { 376 373 for (int k = 0; k < numKernels; k++) { 377 convolvedStamp->data.F32[y - yStamp][x - xStamp] += 378 convolvePixel(kernels, k, x, y, refImage, polyValues, imageWeighting); 374 convolvedStamp->data.F32[y + footprint][x + footprint] += 375 convolvePixel(kernels, k, xStamp + x, yStamp + y, refImage, polyValues, 376 imageWeighting); 379 377 } 380 378 } … … 382 380 psFree(polyValues); 383 381 384 psRegion region = psRegionSet(xStamp - footprint, xStamp + footprint ,385 yStamp - footprint, yStamp + footprint ); // Region of interest382 psRegion region = psRegionSet(xStamp - footprint, xStamp + footprint + 1, 383 yStamp - footprint, yStamp + footprint + 1); // Region of interest 386 384 psImage *inStamp = psImageSubset(inImage, region); // Image of stamp 387 385 assert(inStamp->numCols == convolvedStamp->numCols &&
Note:
See TracChangeset
for help on using the changeset viewer.
